diff options
author | Graham Madarasz (Graham) <graham@lindenlab.com> | 2013-03-08 15:31:37 -0800 |
---|---|---|
committer | Graham Madarasz (Graham) <graham@lindenlab.com> | 2013-03-08 15:31:37 -0800 |
commit | f061b2b90e34d74b9c6db3606babb0402473a24d (patch) | |
tree | feae72bd1acefaa7437250035ec0c32be02c731c /indra/llcharacter/lleditingmotion.cpp | |
parent | 4b67d34c7e31e7dcc8185061e4a0b02c5da6560a (diff) |
Optimize interp code to elim hundreds of divides per frame and fix jitter bugs.
Diffstat (limited to 'indra/llcharacter/lleditingmotion.cpp')
-rw-r--r-- | indra/llcharacter/lleditingmotion.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index 0d0b85ba60..35508e0a87 100644 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -38,8 +38,6 @@ // Constants //----------------------------------------------------------------------------- const LLQuaternion EDIT_MOTION_WRIST_ROTATION(F_PI_BY_TWO * 0.7f, LLVector3(1.0f, 0.0f, 0.0f)); -const F32 TARGET_LAG_HALF_LIFE = 0.1f; // half-life of IK targeting -const F32 TORSO_LAG_HALF_LIFE = 0.2f; const F32 MAX_TIME_DELTA = 2.f; //max two seconds a frame for calculating interpolation S32 LLEditingMotion::sHandPose = LLHandMotion::HAND_POSE_RELAXED_R; @@ -232,7 +230,7 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) mIKSolver.solve(); // use blending... - F32 slerp_amt = LLCriticalDamp::getInterpolant(TARGET_LAG_HALF_LIFE); + F32 slerp_amt = LLCriticalDamp::getInterpolant(InterpDeltaTargetLagHalfLife); shoulderRot = slerp(slerp_amt, mShoulderJoint.getRotation(), shoulderRot); elbowRot = slerp(slerp_amt, mElbowJoint.getRotation(), elbowRot); @@ -258,3 +256,4 @@ void LLEditingMotion::onDeactivate() // End + |