diff options
| author | Debi King (Dessie) <dessie@lindenlab.com> | 2011-06-09 14:06:04 -0400 |
|---|---|---|
| committer | Debi King (Dessie) <dessie@lindenlab.com> | 2011-06-09 14:06:04 -0400 |
| commit | 3c539c498a328696c9aa3cd8f00519d9ad0a40e8 (patch) | |
| tree | 49ec2d995791cf43842fbe0764f5e5fe124a95d8 /indra/llcharacter/lljoint.cpp | |
| parent | ffe8417a0410a554e22210c83feadeea76d0ab8a (diff) | |
| parent | d5041f5fb0850f71474f0b6a37e15ef322c509a7 (diff) | |
reconciled .hgtags
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 + |
