//----------------------------------------------------------------------------- // getJoint() //----------------------------------------------------------------------------- LLJoint *LLCharacter::getJoint( const std::string &name ) { LLJoint* joint = NULL; LLJoint *root = getRootJoint(); if (root) { joint = root->findJoint(name); } if (!joint) { llwarns << "Failed to find joint." << llendl; } return joint; }
//----------------------------------------------------------------------------- // dumpCharacter() //----------------------------------------------------------------------------- void LLCharacter::dumpCharacter( LLJoint* joint ) { // handle top level entry into recursion if (joint == NULL) { llinfos << "DEBUG: Dumping Character @" << this << llendl; dumpCharacter( getRootJoint() ); llinfos << "DEBUG: Done." << llendl; return; } // print joint info llinfos << "DEBUG: " << joint->getName() << " (" << (joint->getParent()?joint->getParent()->getName():std::string("ROOT")) << ")" << llendl; // recurse for (LLJoint::child_list_t::iterator iter = joint->mChildren.begin(); iter != joint->mChildren.end(); ++iter) { LLJoint* child_joint = *iter; dumpCharacter(child_joint); } }
void Skeleton::print() { printJoint(getRootJoint()); }