本文整理汇总了C++中ogre::SkeletonInstance::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ SkeletonInstance::getName方法的具体用法?C++ SkeletonInstance::getName怎么用?C++ SkeletonInstance::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::SkeletonInstance
的用法示例。
在下文中一共展示了SkeletonInstance::getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkMesh
void BoneCollisionManager::checkMesh(Ogre::String outFileName, Ogre::SceneNode* node)
{
std::ofstream file(outFileName.c_str());
if (file)
{
Ogre::Entity* ent = (Ogre::Entity*)node->getAttachedObject(0);
Ogre::SkeletonInstance* skeletonInst = ent->getSkeleton();
Ogre::Skeleton::BoneIterator boneI=skeletonInst->getBoneIterator();
//file<<"Creating bone length information from:\n";
file<<"Mesh name: "<<ent->getMesh()->getName()<<"\n";
file<<"Skeleton name: "<<skeletonInst->getName()<<"\n\n";
while(boneI.hasMoreElements())
{
Ogre::Bone* bone=boneI.getNext();
Ogre::String bName=bone->getName();
if (bone->getChild(0))
{
Ogre::Vector3 curr = bone->_getDerivedPosition();
Ogre::Vector3 next = bone->getChild(0)->_getDerivedPosition();
Ogre::Vector3 difference = next-curr;
//length of bone
Ogre::Real lenght = difference.length();
file<<bName<<":\nLength\t\t\t=\t"<<Ogre::StringConverter::toString(lenght,3)<<"\n"<<
"Position"<<"\t\t=\t"<<Ogre::StringConverter::toString(curr.x,1)<<", "<<
Ogre::StringConverter::toString(curr.y,1)<<", "<<
Ogre::StringConverter::toString(curr.z,1)<<"\n";
if (!bone->getParent())
file<<bName<<" is a Root Bone!\n\n";
else
file<<"\n\n";
}
}
}
}