From a8a62201ba762e98dff92cf49033e577fc34d8d4 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:27 -0500 Subject: Second Life viewer sources 1.19.0.0 --- linden/indra/llcharacter/lljointstate.h | 40 ++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'linden/indra/llcharacter/lljointstate.h') 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 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -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; } + +protected: + // Destructor + virtual ~LLJointState() + { + } + }; #endif // LL_LLJOINTSTATE_H -- cgit v1.1