diff options
Diffstat (limited to 'indra/llcharacter/lljointstate.h')
-rw-r--r-- | indra/llcharacter/lljointstate.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/indra/llcharacter/lljointstate.h b/indra/llcharacter/lljointstate.h index 202232243b..a1723b6dd9 100644 --- a/indra/llcharacter/lljointstate.h +++ b/indra/llcharacter/lljointstate.h @@ -36,11 +36,12 @@ // Header Files //----------------------------------------------------------------------------- #include "lljoint.h" +#include "llmemory.h" //----------------------------------------------------------------------------- // class LLJointState //----------------------------------------------------------------------------- -class LLJointState +class LLJointState : public LLRefCount { public: enum BlendPhase @@ -85,13 +86,9 @@ public: mPriority = LLJoint::USE_MOTION_PRIORITY; } - // Destructor - virtual ~LLJointState() - { - } - // joint that this state is applied to - LLJoint *getJoint() { return mJoint; } + LLJoint* getJoint() { return mJoint; } + const LLJoint* getJoint() const { return mJoint; } BOOL setJoint( LLJoint *joint ) { mJoint = joint; return mJoint != NULL; } // transform type (bitwise flags can be combined) @@ -103,26 +100,33 @@ public: ROT = 2, SCALE = 4, }; - U32 getUsage() { return mUsage; } - void setUsage( U32 usage ) { mUsage = usage; } - F32 getWeight() { return mWeight; } + U32 getUsage() const { return mUsage; } + void setUsage( U32 usage ) { mUsage = usage; } + F32 getWeight() const { return mWeight; } void setWeight( F32 weight ) { mWeight = weight; } // get/set position - const LLVector3& getPosition() { return mPosition; } + const LLVector3& getPosition() const { return mPosition; } void setPosition( const LLVector3& pos ) { llassert(mUsage & POS); mPosition = pos; } // get/set rotation - const LLQuaternion& getRotation() { return mRotation; } + const LLQuaternion& getRotation() const { return mRotation; } void setRotation( const LLQuaternion& rot ) { llassert(mUsage & ROT); mRotation = rot; } // get/set scale - const LLVector3& getScale() { return mScale; } - void setScale( const LLVector3& scale ) { llassert(mUsage & SCALE); mScale = scale; } + const LLVector3& getScale() const { return mScale; } + void setScale( const LLVector3& scale ) { llassert(mUsage & SCALE); mScale = scale; } // get/set priority - LLJoint::JointPriority getPriority() { return mPriority; } - void setPriority( const LLJoint::JointPriority priority ) { mPriority = priority; } + LLJoint::JointPriority getPriority() const { return mPriority; } + void setPriority( LLJoint::JointPriority priority ) { mPriority = priority; } + +private: + // Destructor + virtual ~LLJointState() + { + } + }; #endif // LL_LLJOINTSTATE_H |