summaryrefslogtreecommitdiff
path: root/indra/llcharacter/lljoint.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-05-30 23:51:33 +0000
committerMonty Brandenberg <monty@lindenlab.com>2013-05-30 23:51:33 +0000
commitaf8c2bc94868e056908b4ae2fc285925cd68b56b (patch)
tree2fc5e74073317ecc3e7b8e64b7c3784e88ba5099 /indra/llcharacter/lljoint.cpp
parent2df0a2494691ebfdd305e6a5ee280dd758a1b337 (diff)
parentdcfb18373eca7986a73d8b9a1d34970cc0a23ed9 (diff)
Merge. Pull viewer-release to get the new version scheme changes.
Diffstat (limited to 'indra/llcharacter/lljoint.cpp')
-rwxr-xr-x[-rw-r--r--]indra/llcharacter/lljoint.cpp30
1 files changed, 21 insertions, 9 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 19907933cb..09a7c11a22 100644..100755
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -40,7 +40,9 @@ S32 LLJoint::sNumTouches = 0;
// LLJoint()
// Class Constructor
//-----------------------------------------------------------------------------
-LLJoint::LLJoint()
+
+
+void LLJoint::init()
{
mName = "unnamed";
mParent = NULL;
@@ -48,7 +50,20 @@ LLJoint::LLJoint()
mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f));
mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY;
mUpdateXform = TRUE;
- mJointNum = -1;
+}
+
+LLJoint::LLJoint() :
+ mJointNum(-1)
+{
+ init();
+ touch();
+ mResetAfterRestoreOldXform = false;
+}
+
+LLJoint::LLJoint(S32 joint_num) :
+ mJointNum(joint_num)
+{
+ init();
touch();
mResetAfterRestoreOldXform = false;
}
@@ -58,15 +73,12 @@ LLJoint::LLJoint()
// LLJoint()
// Class Constructor
//-----------------------------------------------------------------------------
-LLJoint::LLJoint(const std::string &name, LLJoint *parent)
+LLJoint::LLJoint(const std::string &name, LLJoint *parent) :
+ mJointNum(0)
{
- mName = "unnamed";
- mParent = NULL;
- mXform.setScaleChildOffset(TRUE);
- mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f));
- mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY;
+ init();
mUpdateXform = FALSE;
- mJointNum = 0;
+ // *TODO: mResetAfterRestoreOldXform is not initialized!!!
setName(name);
if (parent)