diff options
| author | callum_linden <none@none> | 2013-04-17 13:38:04 -0700 |
|---|---|---|
| committer | callum_linden <none@none> | 2013-04-17 13:38:04 -0700 |
| commit | 88eff41649b13f00f636e54e093fd5b8becf5f8c (patch) | |
| tree | f099a81df2c66e9940aa85ad1f47cc982a5eecc1 /indra/llcharacter/lljoint.cpp | |
| parent | 010c87788d5c698d6cfe5782ac02d9a3924124cf (diff) | |
| parent | fac6ee27f2d3277494f011271064b0e5e7e02554 (diff) | |
Merge with viewer-development
Diffstat (limited to 'indra/llcharacter/lljoint.cpp')
| -rw-r--r-- | indra/llcharacter/lljoint.cpp | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 19907933cb..09a7c11a22 100644 --- 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) |
