summaryrefslogtreecommitdiff
path: root/indra/llcharacter/lljointstate.h
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2007-12-07 20:27:13 +0000
committerSteven Bennetts <steve@lindenlab.com>2007-12-07 20:27:13 +0000
commitb01d567a5d9e2b5dd28bcc7b3f474fabd93e7a2f (patch)
treec45377783f53f033d43a4d06d36bbeb2a7f7e79b /indra/llcharacter/lljointstate.h
parenta64f283477ea4db09c8b515ab94709e1fb5c82af (diff)
EFFECTIVE MERGE: merge release@73232 maint-viewer-2@75100 -> maint-viewer-2-merge
EFFECTIVE MERGE: merge -r 74370 library-update -> maint-viewer-2-merge ACTUAL MERGE: release@75267 maint-viewer-2-merge@75293 -> release
Diffstat (limited to 'indra/llcharacter/lljointstate.h')
-rw-r--r--indra/llcharacter/lljointstate.h36
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