From cc798a53119d5e504911de25bbf97717a9f4adab Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 13 Jan 2022 13:16:01 -0800 Subject: SL-16606: Don't spam logging with debug joint info. --- indra/llcharacter/lljointsolverrp3.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp index cd25511881..f3d5e2e324 100644 --- a/indra/llcharacter/lljointsolverrp3.cpp +++ b/indra/llcharacter/lljointsolverrp3.cpp @@ -35,6 +35,11 @@ #define F_EPSILON 0.00001f +#if LL_RELEASE + #define DEBUG_JOINT_SOLVER 0 +#else + #define DEBUG_JOINT_SOLVER 1 +#endif //----------------------------------------------------------------------------- // Constructor @@ -150,6 +155,7 @@ void LLJointSolverRP3::solve() LLVector3 cPos = mJointC->getWorldPosition(); LLVector3 gPos = mJointGoal->getWorldPosition(); +#if DEBUG_JOINT_SOLVER LL_DEBUGS("JointSolver") << "LLJointSolverRP3::solve()" << LL_NEWLINE << "bPosLocal = " << mJointB->getPosition() << LL_NEWLINE << "cPosLocal = " << mJointC->getPosition() << LL_NEWLINE @@ -159,6 +165,7 @@ void LLJointSolverRP3::solve() << "bPos : " << bPos << LL_NEWLINE << "cPos : " << cPos << LL_NEWLINE << "gPos : " << gPos << LL_ENDL; +#endif //------------------------------------------------------------------------- // get the poleVector in world space @@ -194,6 +201,7 @@ void LLJointSolverRP3::solve() //------------------------------------------------------------------------- LLVector3 abacCompOrthoVec = abVec - acVec * ((abVec * acVec)/(acVec * acVec)); +#if DEBUG_JOINT_SOLVER LL_DEBUGS("JointSolver") << "abVec : " << abVec << LL_NEWLINE << "bcVec : " << bcVec << LL_NEWLINE << "acVec : " << acVec << LL_NEWLINE @@ -202,6 +210,7 @@ void LLJointSolverRP3::solve() << "bcLen : " << bcLen << LL_NEWLINE << "agLen : " << agLen << LL_NEWLINE << "abacCompOrthoVec : " << abacCompOrthoVec << LL_ENDL; +#endif //------------------------------------------------------------------------- // compute the normal of the original ABC plane (and store for later) @@ -269,6 +278,7 @@ void LLJointSolverRP3::solve() LLQuaternion bRot(theta - abbcAng, abbcOrthoVec); +#if DEBUG_JOINT_SOLVER LL_DEBUGS("JointSolver") << "abbcAng : " << abbcAng << LL_NEWLINE << "abbcOrthoVec : " << abbcOrthoVec << LL_NEWLINE << "agLenSq : " << agLenSq << LL_NEWLINE @@ -280,6 +290,7 @@ void LLJointSolverRP3::solve() << abbcAng*180.0f/F_PI << " " << (theta - abbcAng)*180.0f/F_PI << LL_ENDL; +#endif //------------------------------------------------------------------------- // compute rotation that rotates new A->C to A->G @@ -293,9 +304,11 @@ void LLJointSolverRP3::solve() LLQuaternion cgRot; cgRot.shortestArc( acVec, agVec ); +#if DEBUG_JOINT_SOLVER LL_DEBUGS("JointSolver") << "bcVec : " << bcVec << LL_NEWLINE << "acVec : " << acVec << LL_NEWLINE << "cgRot : " << cgRot << LL_ENDL; +#endif // update A->B and B->C with rotation from C to G abVec = abVec * cgRot; @@ -358,11 +371,13 @@ void LLJointSolverRP3::solve() //------------------------------------------------------------------------- LLQuaternion twistRot( mTwist, agVec ); +#if DEBUG_JOINT_SOLVER 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; +#endif //------------------------------------------------------------------------- // compute rotation of A -- cgit v1.2.3