本文整理汇总了C++中ObjectFactory::destroyInstance方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectFactory::destroyInstance方法的具体用法?C++ ObjectFactory::destroyInstance怎么用?C++ ObjectFactory::destroyInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectFactory
的用法示例。
在下文中一共展示了ObjectFactory::destroyInstance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: frameEnded
bool ObjectManager::frameEnded(const Ogre::FrameEvent& evt)
{
// Step the world and then synchronise the scene nodes with it,
// we could get this to do this automatically, but we
// can't be sure of what order the frame listeners will fire in
if (mStepper->step(evt.timeSinceLastFrame))
{
std::vector<Object*>::iterator eraseIter = eraseQueue.begin();
while (eraseIter != eraseQueue.end())
{
ObjectFactory* factory = this->getObjectFactory((*eraseIter)->getTypeName());
assert(factory != NULL);
factory->destroyInstance(*eraseIter);
eraseIter++;
}
eraseQueue.clear();
mWorld->synchronise();
std::map<std::string, Object*>::iterator iter = objects.begin();
while (iter != objects.end())
{
if (iter->second != NULL)
{
iter->second->update(evt.timeSinceLastFrame);
}
iter++;
}
}
return true;
}