diff options
author | Dave SIMmONs <simon@lindenlab.com> | 2011-05-24 10:51:09 -0700 |
---|---|---|
committer | Dave SIMmONs <simon@lindenlab.com> | 2011-05-24 10:51:09 -0700 |
commit | 3dfb4944ed916f9a251078a2614a854b9de0315d (patch) | |
tree | 251a82d2511132632d12e36c8e8be0d7bf5b11cf /indra/llcharacter/lljoint.cpp | |
parent | 1a5b3b0a9091a72fd5e5fb395f7f0c97b0fd502c (diff) | |
parent | e5752934be74a84e6ec0ff8cb96974bd1e9060ec (diff) |
Merge latest from lindenlab/viewer-development
Diffstat (limited to 'indra/llcharacter/lljoint.cpp')
-rw-r--r-- | indra/llcharacter/lljoint.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 5d750c6c96..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; } @@ -235,6 +236,42 @@ void LLJoint::setPosition( const LLVector3& pos ) //-------------------------------------------------------------------- +// setPosition() +//-------------------------------------------------------------------- +void LLJoint::setDefaultFromCurrentXform( void ) +{ + mDefaultXform = mXform; + touch(MATRIX_DIRTY | POSITION_DIRTY); + +} + +//-------------------------------------------------------------------- +// storeCurrentXform() +//-------------------------------------------------------------------- +void LLJoint::storeCurrentXform( const LLVector3& pos ) +{ + mOldXform = mXform; + mResetAfterRestoreOldXform = true; + setPosition( pos ); +} +//-------------------------------------------------------------------- +// restoreOldXform() +//-------------------------------------------------------------------- +void LLJoint::restoreOldXform( void ) +{ + mResetAfterRestoreOldXform = false; + mXform = mOldXform; +} +//-------------------------------------------------------------------- +// restoreOldXform() +//-------------------------------------------------------------------- +void LLJoint::restoreToDefaultXform( void ) +{ + mXform = mDefaultXform; + setPosition( mXform.getPosition() ); +} + +//-------------------------------------------------------------------- // getWorldPosition() //-------------------------------------------------------------------- LLVector3 LLJoint::getWorldPosition() @@ -522,3 +559,4 @@ void LLJoint::clampRotation(LLQuaternion old_rot, LLQuaternion new_rot) } // End + |