本文整理汇总了C++中Bone::getChildIterator方法的典型用法代码示例。如果您正苦于以下问题:C++ Bone::getChildIterator方法的具体用法?C++ Bone::getChildIterator怎么用?C++ Bone::getChildIterator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bone
的用法示例。
在下文中一共展示了Bone::getChildIterator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddBoneVisualizer
void Actor::AddBoneVisualizer()
{
SkeletonInstance* pSkeletonInstance = _pBodyEntity->getSkeleton();
if (!pSkeletonInstance)
{
return;
}
Skeleton::BoneIterator it = pSkeletonInstance->getBoneIterator();
while (it.hasMoreElements())
{
Bone* pBone = it.getNext();
Bone::ChildNodeIterator cit = pBone->getChildIterator();
int iCount = 0;
while (cit.hasMoreElements())
{
Node* pChild = cit.getNext();
iCount++;
String strName = pBone->getName() + "_" + pChild->getName();
Ogre::Entity* ent = OgreFramework::getSingletonPtr()->m_pSceneMgr->createEntity(strName, "bone.mesh");
TagPoint* pTag = _pBodyEntity->attachObjectToBone(pBone->getName(), ent);
ent->setVisible(_bShowBone);
_Entitys.push_back(ent);
_BoneVisuals[pTag] = pChild;
}
if (iCount == 0)
{
Ogre::Entity* ent = OgreFramework::getSingletonPtr()->m_pSceneMgr->createEntity(pBone->getName(), "bone.mesh");
TagPoint* pTag = _pBodyEntity->attachObjectToBone(pBone->getName(), ent);
ent->setVisible(_bShowBone);
_Entitys.push_back(ent);
_BoneVisuals[pTag] = 0;
}
}
_UpdateBoneVisualizer();
}