A few more rigging related things added in. Also fixed vertex weights

This commit is contained in:
Shyotl
2011-08-01 03:53:25 -05:00
parent 2aa4aa78e2
commit 0bd444de5f
7 changed files with 172 additions and 42 deletions

View File

@@ -38,13 +38,18 @@
#include "llviewerobjectlist.h"
#include "llvovolume.h"
#include "llvolume.h"
#include "llvolumeoctree.h"
#include "llviewercamera.h"
#include "llface.h"
#include "llfloatertools.h"
#include "llviewercontrol.h"
#include "llagent.h"
#include "llviewerregion.h"
#include "llcamera.h"
#include "pipeline.h"
#if MESH_ENABLED
#include "llmeshrepository.h"
#endif //MESH_ENABLED
#include "llrender.h"
#include "lloctree.h"
#include "llvoavatar.h"
@@ -3467,7 +3472,31 @@ public:
if (vobj)
{
LLVector3 intersection;
if (vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mBinormal))
bool skip_check = false;
#if MESH_ENABLED
if (vobj->isAvatar())
{
LLVOAvatar* avatar = (LLVOAvatar*) vobj;
if (avatar->isSelf() && gFloaterTools->getVisible())
{
LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mBinormal);
if (hit)
{
mEnd = intersection;
if (mIntersection)
{
*mIntersection = intersection;
}
mHit = hit->mDrawable;
skip_check = true;
}
}
}
#endif //MESH_ENABLED
if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mBinormal))
{
mEnd = intersection; // shorten ray so we only find CLOSER hits
if (mIntersection)