diff options
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/lleditingmotion.h | 18 | ||||
-rw-r--r-- | indra/llcharacter/lljoint.cpp | 8 | ||||
-rw-r--r-- | indra/llcharacter/lljoint.h | 16 | ||||
-rw-r--r-- | indra/llcharacter/llkeyframestandmotion.h | 28 | ||||
-rw-r--r-- | indra/llcharacter/llpose.h | 6 |
5 files changed, 48 insertions, 28 deletions
diff --git a/indra/llcharacter/lleditingmotion.h b/indra/llcharacter/lleditingmotion.h index 7b1c8bb059..80c1717a70 100644 --- a/indra/llcharacter/lleditingmotion.h +++ b/indra/llcharacter/lleditingmotion.h @@ -42,9 +42,11 @@ //----------------------------------------------------------------------------- // class LLEditingMotion //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLEditingMotion : public LLMotion { + LL_ALIGN_NEW public: // Constructor LLEditingMotion(const LLUUID &id); @@ -108,6 +110,13 @@ public: //------------------------------------------------------------------------- // joint states to be animated //------------------------------------------------------------------------- + LL_ALIGN_16(LLJoint mParentJoint); + LL_ALIGN_16(LLJoint mShoulderJoint); + LL_ALIGN_16(LLJoint mElbowJoint); + LL_ALIGN_16(LLJoint mWristJoint); + LL_ALIGN_16(LLJoint mTarget); + LLJointSolverRP3 mIKSolver; + LLCharacter *mCharacter; LLVector3 mWristOffset; @@ -117,17 +126,10 @@ public: LLPointer<LLJointState> mWristState; LLPointer<LLJointState> mTorsoState; - LLJoint mParentJoint; - LLJoint mShoulderJoint; - LLJoint mElbowJoint; - LLJoint mWristJoint; - LLJoint mTarget; - LLJointSolverRP3 mIKSolver; - static S32 sHandPose; static S32 sHandPosePriority; LLVector3 mLastSelectPt; -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLKEYFRAMEMOTION_H diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index dee642310e..d72282ab42 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -922,6 +922,13 @@ const LLMatrix4 &LLJoint::getWorldMatrix() return mXform.getWorldMatrix(); } +const LLMatrix4a& LLJoint::getWorldMatrix4a() +{ + updateWorldMatrixParent(); + + return mWorldMatrix; +} + //-------------------------------------------------------------------- // setWorldMatrix() @@ -1003,6 +1010,7 @@ void LLJoint::updateWorldMatrix() { sNumUpdates++; mXform.updateMatrix(FALSE); + mWorldMatrix.loadu(mXform.getWorldMatrix()); mDirtyFlags = 0x0; } } diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index 1b646b641f..63d99b9209 100644 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -38,6 +38,7 @@ #include "m4math.h" #include "llquaternion.h" #include "xform.h" +#include "llmatrix4a.h" const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15; // Need to set this to count of animate-able joints, @@ -85,8 +86,10 @@ inline bool operator!=(const LLVector3OverrideMap& a, const LLVector3OverrideMap //----------------------------------------------------------------------------- // class LLJoint //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLJoint { + LL_ALIGN_NEW public: // priority levels, from highest to lowest enum JointPriority @@ -114,16 +117,17 @@ public: SUPPORT_EXTENDED }; protected: - std::string mName; + // explicit transformation members + LL_ALIGN_16(LLMatrix4a mWorldMatrix); + LLXformMatrix mXform; + + std::string mName; SupportCategory mSupport; // parent joint LLJoint *mParent; - // explicit transformation members - LLXformMatrix mXform; - LLVector3 mDefaultPosition; LLVector3 mDefaultScale; @@ -259,6 +263,8 @@ public: const LLMatrix4 &getWorldMatrix(); void setWorldMatrix( const LLMatrix4& mat ); + const LLMatrix4a& getWorldMatrix4a(); + void updateWorldMatrixChildren(); void updateWorldMatrixParent(); @@ -296,6 +302,6 @@ public: // These are used in checks of whether a pos/scale override is considered significant. bool aboveJointPosThreshold(const LLVector3& pos) const; bool aboveJointScaleThreshold(const LLVector3& scale) const; -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLJOINT_H diff --git a/indra/llcharacter/llkeyframestandmotion.h b/indra/llcharacter/llkeyframestandmotion.h index c2634ecd6d..1aa5b187ba 100644 --- a/indra/llcharacter/llkeyframestandmotion.h +++ b/indra/llcharacter/llkeyframestandmotion.h @@ -37,9 +37,11 @@ //----------------------------------------------------------------------------- // class LLKeyframeStandMotion //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLKeyframeStandMotion : public LLKeyframeMotion { + LL_ALIGN_NEW public: // Constructor LLKeyframeStandMotion(const LLUUID &id); @@ -69,6 +71,18 @@ public: //------------------------------------------------------------------------- // Member Data //------------------------------------------------------------------------- + LLJoint mPelvisJoint; + + LLJoint mHipLeftJoint; + LLJoint mKneeLeftJoint; + LLJoint mAnkleLeftJoint; + LLJoint mTargetLeft; + + LLJoint mHipRightJoint; + LLJoint mKneeRightJoint; + LLJoint mAnkleRightJoint; + LLJoint mTargetRight; + LLCharacter *mCharacter; BOOL mFlipFeet; @@ -83,18 +97,6 @@ public: LLPointer<LLJointState> mKneeRightState; LLPointer<LLJointState> mAnkleRightState; - LLJoint mPelvisJoint; - - LLJoint mHipLeftJoint; - LLJoint mKneeLeftJoint; - LLJoint mAnkleLeftJoint; - LLJoint mTargetLeft; - - LLJoint mHipRightJoint; - LLJoint mKneeRightJoint; - LLJoint mAnkleRightJoint; - LLJoint mTargetRight; - LLJointSolverRP3 mIKLeft; LLJointSolverRP3 mIKRight; @@ -110,7 +112,7 @@ public: BOOL mTrackAnkles; S32 mFrameNum; -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLKEYFRAMESTANDMOTION_H diff --git a/indra/llcharacter/llpose.h b/indra/llcharacter/llpose.h index c004a0f3b7..1405f1e053 100644 --- a/indra/llcharacter/llpose.h +++ b/indra/llcharacter/llpose.h @@ -80,8 +80,10 @@ public: const S32 JSB_NUM_JOINT_STATES = 6; +LL_ALIGN_PREFIX(16) class LLJointStateBlender { + LL_ALIGN_NEW protected: LLPointer<LLJointState> mJointStates[JSB_NUM_JOINT_STATES]; S32 mPriorities[JSB_NUM_JOINT_STATES]; @@ -96,8 +98,8 @@ public: void resetCachedJoint(); public: - LLJoint mJointCache; -}; + LL_ALIGN_16(LLJoint mJointCache); +} LL_ALIGN_POSTFIX(16); class LLMotion; |