summaryrefslogtreecommitdiff
path: root/indra/llcharacter/lljoint.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-01-26 11:11:52 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-01-26 11:11:52 -0500
commite91a192301db37f99a4f5a817f3b4c47b448417a (patch)
tree92ca390554fe05d82a91e11bc78eeb618994d91d /indra/llcharacter/lljoint.cpp
parent5345d1e115fdf3fca7ea3e8330f1a23ad19257c8 (diff)
SL-315 WIP - added callstack info to joint debugging. Made joint debugging run-time configurable via debug setting DebugAvatarJoints
Diffstat (limited to 'indra/llcharacter/lljoint.cpp')
-rwxr-xr-xindra/llcharacter/lljoint.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 8fcab454dc..a314692edc 100755
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -32,6 +32,8 @@
#include "lljoint.h"
#include "llmath.h"
+#include "llcallstack.h"
+#include <boost/algorithm/string.hpp>
S32 LLJoint::sNumUpdates = 0;
S32 LLJoint::sNumTouches = 0;
@@ -313,7 +315,11 @@ const LLVector3& LLJoint::getPosition()
bool do_debug_joint(const std::string& name)
{
- return false;
+ if (std::find(LLJoint::s_debugJointNames.begin(), LLJoint::s_debugJointNames.end(),name) != LLJoint::s_debugJointNames.end())
+ {
+ return true;
+ }
+ return false;
}
//--------------------------------------------------------------------
@@ -325,7 +331,9 @@ void LLJoint::setPosition( const LLVector3& pos )
{
if (do_debug_joint(getName()))
{
+ LLCallStack cs;
LL_DEBUGS("Avatar") << " joint " << getName() << " set pos " << pos << LL_ENDL;
+ LL_DEBUGS("Avatar") << "STACK:\n" << "====================\n" << cs << "====================" << LL_ENDL;
}
}
mXform.setPosition(pos);
@@ -427,6 +435,23 @@ void LLJoint::updatePos(const std::string& av_info)
setPosition(pos);
}
+// init static
+LLJoint::debug_joint_name_t LLJoint::s_debugJointNames = debug_joint_name_t();
+
+//--------------------------------------------------------------------
+// setDebugJointNames
+//--------------------------------------------------------------------
+void LLJoint::setDebugJointNames(const debug_joint_name_t& names)
+{
+ s_debugJointNames = names;
+}
+void LLJoint::setDebugJointNames(const std::string& names_string)
+{
+ debug_joint_name_t names;
+ boost::split(names, names_string, boost::is_any_of(" :,"));
+ setDebugJointNames(names);
+}
+
//--------------------------------------------------------------------
// getWorldPosition()
//--------------------------------------------------------------------