本文整理汇总了C++中ogre::MovableObject::detachFromParent方法的典型用法代码示例。如果您正苦于以下问题:C++ MovableObject::detachFromParent方法的具体用法?C++ MovableObject::detachFromParent怎么用?C++ MovableObject::detachFromParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::MovableObject
的用法示例。
在下文中一共展示了MovableObject::detachFromParent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeDrawnNavmesh
void OgreRecast::removeDrawnNavmesh(unsigned int tileRef)
{
Ogre::String name = "RecastMOWalk_"+Ogre::StringConverter::toString(tileRef);
Ogre::LogManager::getSingletonPtr()->logMessage("Removing tile: "+name);
Ogre::String entName = "";
if(OgreRecast::STATIC_GEOM_DEBUG) {
m_pSceneMgr->destroyManualObject(name);
entName = "ent_"+name;
name = "mesh_"+name;
m_pSceneMgr->destroyMovableObject(entName, "Entity");
Ogre::MeshManager::getSingletonPtr()->remove(name);
name = "RecastMONeighbour_"+Ogre::StringConverter::toString(tileRef);
m_pSceneMgr->destroyManualObject(name);
entName = "ent_"+name;
name = "mesh_"+name;
m_pSceneMgr->destroyMovableObject(entName, "Entity");
Ogre::MeshManager::getSingletonPtr()->remove(name);
name = "RecastMOBoundary_"+Ogre::StringConverter::toString(tileRef);
m_pSceneMgr->destroyManualObject(name);
entName = "ent_"+name;
name = "mesh_"+name;
m_pSceneMgr->destroyMovableObject(entName, "Entity");
Ogre::MeshManager::getSingletonPtr()->remove(name);
// Set dirty flag to trigger rebuild next update
m_rebuildSg = true;
} else {
try {
Ogre::MovableObject *o = m_pRecastSN->getAttachedObject(name);
o->detachFromParent();
m_pSceneMgr->destroyManualObject(name);
name = "RecastMONeighbour_"+Ogre::StringConverter::toString(tileRef);
o = m_pRecastSN->getAttachedObject(name);
o->detachFromParent();
m_pSceneMgr->destroyManualObject(name);
name = "RecastMOBoundary_"+Ogre::StringConverter::toString(tileRef);
o = m_pRecastSN->getAttachedObject(name);
o->detachFromParent();
m_pSceneMgr->destroyManualObject(name);
} catch (Ogre::Exception e) {
// This is possible if the tile contained no polygons (hence it was not drawn)
}
}
}
示例2: movableobject_detach_from_parent
///void detachFromParent(void);
void movableobject_detach_from_parent(MovableObjectHandle handle)
{
Ogre::MovableObject* obj = static_cast<Ogre::MovableObject*>(handle);
obj->detachFromParent();
}