Ogre::Skeleton::hasBone(sName)
Posted: Sat Jan 26, 2008 2:15 pm
Hi all =)
a efficient test if a skeleton has a bone with a specific name would be good.
Ogre::Skeleton::getBone(sName) throws an exception if the bone with that name doesn't exist, and this clutters the Ogre.log
suggested implementation :
EDIT : fixed returntype to bool
a efficient test if a skeleton has a bone with a specific name would be good.
Ogre::Skeleton::getBone(sName) throws an exception if the bone with that name doesn't exist, and this clutters the Ogre.log
suggested implementation :
Code: Select all
bool Skeleton::hasBone(const String& name) const { return mBoneListByName.find(name) != mBoneListByName.end(); }