本文整理汇总了C++中ogre::SceneManager::destroyManualObject方法的典型用法代码示例。如果您正苦于以下问题:C++ SceneManager::destroyManualObject方法的具体用法?C++ SceneManager::destroyManualObject怎么用?C++ SceneManager::destroyManualObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::SceneManager
的用法示例。
在下文中一共展示了SceneManager::destroyManualObject方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resetPathfinding
void NavigationMesh::resetPathfinding()
{
mOpenList.clear();
for( CellVector::iterator i = mCells.begin(); i != mCells.end(); i++ )
{
i->path = -1; // Not strictly required.
i->parent = 0; // Or this either.
i->isOpen = false;
i->isClosed = false;
}
Ogre::Root *root = Ogre::Root::getSingletonPtr();
Ogre::SceneManager* mgr = root->getSceneManager( "SceneManagerInstance" );
mgr->destroyManualObject( "debugDrawClassification" );
mgr->destroyManualObject( "debugDraw" );
}
示例2:
EC_Ruler::~EC_Ruler()
{
// OgreRendering module might be already deleted. If so, the cloned entity is also already deleted.
// In this case, just set pointer to 0.
if (!renderer_.expired())
{
Ogre::SceneManager *sceneMgr = renderer_.lock()->GetSceneManager();
sceneMgr->destroyManualObject(rulerObject);
if(gridObject)
sceneMgr->destroyManualObject(gridObject);
}
else
{
rulerObject = 0;
gridObject = 0;
sceneNode_ = 0;
}
}
示例3:
EC_SelectionBox::~EC_SelectionBox()
{
if (selectionBox_)
{
OgreWorldPtr world = world_.lock();
if (world)
{
Ogre::SceneManager* sceneMgr = world->GetSceneManager();
sceneMgr->destroyManualObject(selectionBox_);
selectionBox_ = 0;
}
}
}
示例4: setShow
void NavigationMesh::setShow( bool show )
{
Ogre::Root *root = Ogre::Root::getSingletonPtr();
Ogre::SceneManager* mgr = root->getSceneManager( "SceneManagerInstance" );
Ogre::ManualObject* debug;
Ogre::SceneNode* debugNode;
mShow = show;
if( mgr->hasSceneNode( "debugDrawNode2" ) )
{
debugNode = mgr->getSceneNode( "debugDrawNode2" );
}
else
{
debugNode = mgr->getRootSceneNode()->createChildSceneNode( "debugDrawNode2" );
debugNode->translate( 0, 1, 0 ); // Move up slightly to see lines better.
}
if( mgr->hasManualObject( "debugDraw2" ) )
debug = mgr->getManualObject( "debugDraw2" );
else
{
debug = mgr->createManualObject( "debugDraw2" );
debugNode->attachObject( debug );
debug->setQueryFlags( 0 );
debug->setRenderQueueGroup( Ogre::RENDER_QUEUE_OVERLAY );
}
if( !mShow )
{
mgr->destroyManualObject( debug );
return;
}
for( CellVector::iterator i = mCells.begin(); i != mCells.end(); i++ )
{
i->debugDrawCell( debug, "debug/yellow", "debug/blue" );
}
return;
}