diff options
author | Richard Linden <none@none> | 2013-10-08 11:59:24 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-10-08 11:59:24 -0700 |
commit | 80dfbbaacd82179e54163ed48b1bc444e3becbd5 (patch) | |
tree | da3858b58b5ec9c34d6eefa60c4fe87fc5743249 /indra/llcharacter/lljointsolverrp3.cpp | |
parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) | |
parent | 2eeee8a9491398697a8f3167bc4f715a3970fc3a (diff) |
merge from viewer-release
Diffstat (limited to 'indra/llcharacter/lljointsolverrp3.cpp')
-rwxr-xr-x | indra/llcharacter/lljointsolverrp3.cpp | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp index 1331900791..69a7e3dc6e 100755 --- a/indra/llcharacter/lljointsolverrp3.cpp +++ b/indra/llcharacter/lljointsolverrp3.cpp @@ -135,8 +135,6 @@ void LLJointSolverRP3::setTwist( F32 twist ) //----------------------------------------------------------------------------- void LLJointSolverRP3::solve() { -// llinfos << llendl; -// llinfos << "LLJointSolverRP3::solve()" << llendl; //------------------------------------------------------------------------- // setup joints in their base rotations @@ -152,15 +150,15 @@ void LLJointSolverRP3::solve() LLVector3 cPos = mJointC->getWorldPosition(); LLVector3 gPos = mJointGoal->getWorldPosition(); -// llinfos << "bPosLocal = " << mJointB->getPosition() << llendl; -// llinfos << "cPosLocal = " << mJointC->getPosition() << llendl; -// llinfos << "bRotLocal = " << mJointB->getRotation() << llendl; -// llinfos << "cRotLocal = " << mJointC->getRotation() << llendl; - -// llinfos << "aPos : " << aPos << llendl; -// llinfos << "bPos : " << bPos << llendl; -// llinfos << "cPos : " << cPos << llendl; -// llinfos << "gPos : " << gPos << llendl; + LL_DEBUGS("JointSolver") << "LLJointSolverRP3::solve()" << LL_NEWLINE + << "bPosLocal = " << mJointB->getPosition() << LL_NEWLINE + << "cPosLocal = " << mJointC->getPosition() << LL_NEWLINE + << "bRotLocal = " << mJointB->getRotation() << LL_NEWLINE + << "cRotLocal = " << mJointC->getRotation() << LL_NEWLINE + << "aPos : " << aPos << LL_NEWLINE + << "bPos : " << bPos << LL_NEWLINE + << "cPos : " << cPos << LL_NEWLINE + << "gPos : " << gPos << LL_ENDL; //------------------------------------------------------------------------- // get the poleVector in world space @@ -184,11 +182,6 @@ void LLJointSolverRP3::solve() LLVector3 acVec = cPos - aPos; LLVector3 agVec = gPos - aPos; -// llinfos << "abVec : " << abVec << llendl; -// llinfos << "bcVec : " << bcVec << llendl; -// llinfos << "acVec : " << acVec << llendl; -// llinfos << "agVec : " << agVec << llendl; - //------------------------------------------------------------------------- // compute needed lengths of those vectors //------------------------------------------------------------------------- @@ -196,16 +189,19 @@ void LLJointSolverRP3::solve() F32 bcLen = bcVec.magVec(); F32 agLen = agVec.magVec(); -// llinfos << "abLen : " << abLen << llendl; -// llinfos << "bcLen : " << bcLen << llendl; -// llinfos << "agLen : " << agLen << llendl; - //------------------------------------------------------------------------- // compute component vector of (A->B) orthogonal to (A->C) //------------------------------------------------------------------------- LLVector3 abacCompOrthoVec = abVec - acVec * ((abVec * acVec)/(acVec * acVec)); -// llinfos << "abacCompOrthoVec : " << abacCompOrthoVec << llendl; + LL_DEBUGS("JointSolver") << "abVec : " << abVec << LL_NEWLINE + << "bcVec : " << bcVec << LL_NEWLINE + << "acVec : " << acVec << LL_NEWLINE + << "agVec : " << agVec << LL_NEWLINE + << "abLen : " << abLen << LL_NEWLINE + << "bcLen : " << bcLen << LL_NEWLINE + << "agLen : " << agLen << LL_NEWLINE + << "abacCompOrthoVec : " << abacCompOrthoVec << LL_ENDL; //------------------------------------------------------------------------- // compute the normal of the original ABC plane (and store for later) @@ -273,13 +269,17 @@ void LLJointSolverRP3::solve() LLQuaternion bRot(theta - abbcAng, abbcOrthoVec); -// llinfos << "abbcAng : " << abbcAng << llendl; -// llinfos << "abbcOrthoVec : " << abbcOrthoVec << llendl; -// llinfos << "agLenSq : " << agLenSq << llendl; -// llinfos << "cosTheta : " << cosTheta << llendl; -// llinfos << "theta : " << theta << llendl; -// llinfos << "bRot : " << bRot << llendl; -// llinfos << "theta abbcAng theta-abbcAng: " << theta*180.0/F_PI << " " << abbcAng*180.0f/F_PI << " " << (theta - abbcAng)*180.0f/F_PI << llendl; + LL_DEBUGS("JointSolver") << "abbcAng : " << abbcAng << LL_NEWLINE + << "abbcOrthoVec : " << abbcOrthoVec << LL_NEWLINE + << "agLenSq : " << agLenSq << LL_NEWLINE + << "cosTheta : " << cosTheta << LL_NEWLINE + << "theta : " << theta << LL_NEWLINE + << "bRot : " << bRot << LL_NEWLINE + << "theta abbcAng theta-abbcAng: " + << theta*180.0/F_PI << " " + << abbcAng*180.0f/F_PI << " " + << (theta - abbcAng)*180.0f/F_PI + << LL_ENDL; //------------------------------------------------------------------------- // compute rotation that rotates new A->C to A->G @@ -293,9 +293,9 @@ void LLJointSolverRP3::solve() LLQuaternion cgRot; cgRot.shortestArc( acVec, agVec ); -// llinfos << "bcVec : " << bcVec << llendl; -// llinfos << "acVec : " << acVec << llendl; -// llinfos << "cgRot : " << cgRot << llendl; + LL_DEBUGS("JointSolver") << "bcVec : " << bcVec << LL_NEWLINE + << "acVec : " << acVec << LL_NEWLINE + << "cgRot : " << cgRot << LL_ENDL; // update A->B and B->C with rotation from C to G abVec = abVec * cgRot; @@ -353,18 +353,16 @@ void LLJointSolverRP3::solve() pRot.shortestArc( abcNorm, apgNorm ); } -// llinfos << "abcNorm = " << abcNorm << llendl; -// llinfos << "apgNorm = " << apgNorm << llendl; -// llinfos << "pRot = " << pRot << llendl; - //------------------------------------------------------------------------- // compute twist rotation //------------------------------------------------------------------------- LLQuaternion twistRot( mTwist, agVec ); -// llinfos << "twist : " << mTwist*180.0/F_PI << llendl; -// llinfos << "agNormVec: " << agNormVec << llendl; -// llinfos << "twistRot : " << twistRot << llendl; + LL_DEBUGS("JointSolver") << "abcNorm = " << abcNorm << LL_NEWLINE + << "apgNorm = " << apgNorm << LL_NEWLINE + << "pRot = " << pRot << LL_NEWLINE + << "twist : " << mTwist*180.0/F_PI << LL_NEWLINE + << "twistRot : " << twistRot << LL_ENDL; //------------------------------------------------------------------------- // compute rotation of A |