summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorTofu Buzzard <no-email>2011-02-16 11:45:20 -0800
committerTofu Buzzard <no-email>2011-02-16 11:45:20 -0800
commit8921bdf0577c1282d5aa9cd920f0b57b77d95682 (patch)
treef4c2a6b55703a40ec104ace5792cf80b5bef3fac /indra/llcharacter
parent681d64de0261235cbafe6b9b082344241b6fbf54 (diff)
parent8bbbcd9c22010a259d42d23c517e04fe7afd41fd (diff)
merge
Diffstat (limited to 'indra/llcharacter')
-rw-r--r--indra/llcharacter/lljoint.cpp4
-rw-r--r--indra/llcharacter/lljoint.h11
2 files changed, 14 insertions, 1 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index d68abcef5a..19907933cb 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -50,6 +50,7 @@ LLJoint::LLJoint()
mUpdateXform = TRUE;
mJointNum = -1;
touch();
+ mResetAfterRestoreOldXform = false;
}
@@ -250,6 +251,7 @@ void LLJoint::setDefaultFromCurrentXform( void )
void LLJoint::storeCurrentXform( const LLVector3& pos )
{
mOldXform = mXform;
+ mResetAfterRestoreOldXform = true;
setPosition( pos );
}
//--------------------------------------------------------------------
@@ -257,6 +259,7 @@ void LLJoint::storeCurrentXform( const LLVector3& pos )
//--------------------------------------------------------------------
void LLJoint::restoreOldXform( void )
{
+ mResetAfterRestoreOldXform = false;
mXform = mOldXform;
}
//--------------------------------------------------------------------
@@ -556,3 +559,4 @@ void LLJoint::clampRotation(LLQuaternion old_rot, LLQuaternion new_rot)
}
// End
+
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index cbfca588b0..dc3c58cf64 100644
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -88,6 +88,8 @@ public:
U32 mDirtyFlags;
BOOL mUpdateXform;
+ BOOL mResetAfterRestoreOldXform;
+
// describes the skin binding pose
LLVector3 mSkinOffset;
@@ -181,10 +183,17 @@ public:
void restoreOldXform( void );
void restoreToDefaultXform( void );
void setDefaultFromCurrentXform( void );
-
void storeCurrentXform( const LLVector3& pos );
+
+ //Accessor for the joint id
LLUUID getId( void ) { return mId; }
+ //Setter for the joints id
void setId( const LLUUID& id ) { mId = id;}
+
+ //If the old transform flag has been set, then the reset logic in avatar needs to be aware(test) of it
+ const BOOL doesJointNeedToBeReset( void ) const { return mResetAfterRestoreOldXform; }
+ //Setter for joint reset flag
+ void setJointToBeReset( BOOL val ) { mResetAfterRestoreOldXform = val; }
};
#endif // LL_LLJOINT_H