summaryrefslogtreecommitdiff
path: root/indra/llcharacter/lljoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter/lljoint.cpp')
-rw-r--r--indra/llcharacter/lljoint.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 5d750c6c96..d68abcef5a 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -235,6 +235,40 @@ 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;
+ setPosition( pos );
+}
+//--------------------------------------------------------------------
+// restoreOldXform()
+//--------------------------------------------------------------------
+void LLJoint::restoreOldXform( void )
+{
+ mXform = mOldXform;
+}
+//--------------------------------------------------------------------
+// restoreOldXform()
+//--------------------------------------------------------------------
+void LLJoint::restoreToDefaultXform( void )
+{
+ mXform = mDefaultXform;
+ setPosition( mXform.getPosition() );
+}
+
+//--------------------------------------------------------------------
// getWorldPosition()
//--------------------------------------------------------------------
LLVector3 LLJoint::getWorldPosition()