aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcharacter/lljointstate.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcharacter/lljointstate.h40
1 files changed, 22 insertions, 18 deletions
diff --git a/linden/indra/llcharacter/lljointstate.h b/linden/indra/llcharacter/lljointstate.h
index ef74150..15dfd6d 100644
--- a/linden/indra/llcharacter/lljointstate.h
+++ b/linden/indra/llcharacter/lljointstate.h
@@ -12,12 +12,12 @@
12 * ("GPL"), unless you have obtained a separate licensing agreement 12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlife.com/developers/opensource/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 * 16 *
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlife.com/developers/opensource/flossexception 20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 21 *
22 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
@@ -36,11 +36,12 @@
36// Header Files 36// Header Files
37//----------------------------------------------------------------------------- 37//-----------------------------------------------------------------------------
38#include "lljoint.h" 38#include "lljoint.h"
39#include "llmemory.h"
39 40
40//----------------------------------------------------------------------------- 41//-----------------------------------------------------------------------------
41// class LLJointState 42// class LLJointState
42//----------------------------------------------------------------------------- 43//-----------------------------------------------------------------------------
43class LLJointState 44class LLJointState : public LLRefCount
44{ 45{
45public: 46public:
46 enum BlendPhase 47 enum BlendPhase
@@ -85,13 +86,9 @@ public:
85 mPriority = LLJoint::USE_MOTION_PRIORITY; 86 mPriority = LLJoint::USE_MOTION_PRIORITY;
86 } 87 }
87 88
88 // Destructor
89 virtual ~LLJointState()
90 {
91 }
92
93 // joint that this state is applied to 89 // joint that this state is applied to
94 LLJoint *getJoint() { return mJoint; } 90 LLJoint* getJoint() { return mJoint; }
91 const LLJoint* getJoint() const { return mJoint; }
95 BOOL setJoint( LLJoint *joint ) { mJoint = joint; return mJoint != NULL; } 92 BOOL setJoint( LLJoint *joint ) { mJoint = joint; return mJoint != NULL; }
96 93
97 // transform type (bitwise flags can be combined) 94 // transform type (bitwise flags can be combined)
@@ -103,26 +100,33 @@ public:
103 ROT = 2, 100 ROT = 2,
104 SCALE = 4, 101 SCALE = 4,
105 }; 102 };
106 U32 getUsage() { return mUsage; } 103 U32 getUsage() const { return mUsage; }
107 void setUsage( U32 usage ) { mUsage = usage; } 104 void setUsage( U32 usage ) { mUsage = usage; }
108 F32 getWeight() { return mWeight; } 105 F32 getWeight() const { return mWeight; }
109 void setWeight( F32 weight ) { mWeight = weight; } 106 void setWeight( F32 weight ) { mWeight = weight; }
110 107
111 // get/set position 108 // get/set position
112 const LLVector3& getPosition() { return mPosition; } 109 const LLVector3& getPosition() const { return mPosition; }
113 void setPosition( const LLVector3& pos ) { llassert(mUsage & POS); mPosition = pos; } 110 void setPosition( const LLVector3& pos ) { llassert(mUsage & POS); mPosition = pos; }
114 111
115 // get/set rotation 112 // get/set rotation
116 const LLQuaternion& getRotation() { return mRotation; } 113 const LLQuaternion& getRotation() const { return mRotation; }
117 void setRotation( const LLQuaternion& rot ) { llassert(mUsage & ROT); mRotation = rot; } 114 void setRotation( const LLQuaternion& rot ) { llassert(mUsage & ROT); mRotation = rot; }
118 115
119 // get/set scale 116 // get/set scale
120 const LLVector3& getScale() { return mScale; } 117 const LLVector3& getScale() const { return mScale; }
121 void setScale( const LLVector3& scale ) { llassert(mUsage & SCALE); mScale = scale; } 118 void setScale( const LLVector3& scale ) { llassert(mUsage & SCALE); mScale = scale; }
122 119
123 // get/set priority 120 // get/set priority
124 LLJoint::JointPriority getPriority() { return mPriority; } 121 LLJoint::JointPriority getPriority() const { return mPriority; }
125 void setPriority( const LLJoint::JointPriority priority ) { mPriority = priority; } 122 void setPriority( LLJoint::JointPriority priority ) { mPriority = priority; }
123
124protected:
125 // Destructor
126 virtual ~LLJointState()
127 {
128 }
129
126}; 130};
127 131
128#endif // LL_LLJOINTSTATE_H 132#endif // LL_LLJOINTSTATE_H