diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-09-27 17:29:22 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-09-27 17:29:22 -0400 |
commit | e6297ab3d6262014d3b501703154437bea523be1 (patch) | |
tree | 266a9936ed7240a4cf28d1d21cf850e9fa9e5138 /indra/llappearance | |
parent | 996861e21bf165d73ebd80eae50ad1e8f61ee55d (diff) |
SL-451 - support for getJoint() by number, use in initSkinningMatrixPalette()
Diffstat (limited to 'indra/llappearance')
-rw-r--r-- | indra/llappearance/llavatarappearance.cpp | 16 | ||||
-rw-r--r-- | indra/llappearance/llavatarappearance.h | 1 |
2 files changed, 10 insertions, 7 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index af14e3418b..ebeab22dcc 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -187,7 +187,11 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) : mHeadOffset(), mRoot(NULL), mWearableData(wearable_data), - mNextJointNum(0) + mNextJointNum(0), + mNumBones(0), + mNumCollisionVolumes(0), + mCollisionVolumes(NULL), + mIsBuilt(FALSE) { llassert_always(mWearableData); mBakedTextureDatas.resize(LLAvatarAppearanceDefines::BAKED_NUM_INDICES); @@ -200,11 +204,6 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) : mBakedTextureDatas[i].mMaskTexName = 0; mBakedTextureDatas[i].mTextureIndex = LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::bakedToLocalTextureIndex((LLAvatarAppearanceDefines::EBakedTextureIndex)i); } - - mIsBuilt = FALSE; - - mNumCollisionVolumes = 0; - mCollisionVolumes = NULL; } // virtual @@ -667,14 +666,16 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent if (info->mIsJoint) { joint->setSkinOffset( info->mPivot ); + joint->setJointNum(joint_num); joint_num++; } else // collision volume { + joint->setJointNum(mNumBones+volume_num); volume_num++; } + mNextJointNum++; - joint->setJointNum(mNextJointNum++); // setup children LLAvatarBoneInfo::child_list_t::const_iterator iter; @@ -699,6 +700,7 @@ BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num ) { clearSkeleton(); mSkeleton = avatar_joint_list_t(num,NULL); + mNumBones = num; } return TRUE; diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index 6938ca2dea..77795f3bf6 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -352,6 +352,7 @@ protected: // Collision volumes //-------------------------------------------------------------------- public: + S32 mNumBones; S32 mNumCollisionVolumes; LLAvatarJointCollisionVolume* mCollisionVolumes; protected: |