本文整理汇总了C++中ogre::SceneManager::destroyLight方法的典型用法代码示例。如果您正苦于以下问题:C++ SceneManager::destroyLight方法的具体用法?C++ SceneManager::destroyLight怎么用?C++ SceneManager::destroyLight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::SceneManager
的用法示例。
在下文中一共展示了SceneManager::destroyLight方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _destroyAll
//-----------------------------------------------------------------------
void LightRenderer::_destroyAll(void)
{
if (!mParentTechnique)
return;
// Note: The created ChildSceneNodes are destroyed when the ParticleSystem is destroyed
vector<LightRendererVisualData*>::const_iterator it;
vector<LightRendererVisualData*>::const_iterator itEnd = mAllVisualData.end();
for (it = mAllVisualData.begin(); it != itEnd; ++it)
{
PU_DELETE_T(*it, LightRendererVisualData, MEMCATEGORY_SCENE_OBJECTS);
}
mAllVisualData.clear();
mVisualData.clear();
// Destroy the Lights. Do it like this, because it must be assured that the light still exists
// and has not already been destroyed.
Ogre::SceneManager* sceneManager = mParentTechnique->getParentSystem()->getSceneManager();
for (size_t i = 0; i < mQuota; i++)
{
if (sceneManager->hasLight(mLightName + StringConverter::toString(i)))
{
sceneManager->destroyLight(mLightName + StringConverter::toString(i));
}
}
mLights.clear();
// Reset the visual data in the pool
mParentTechnique->initVisualDataInPool();
}
示例2: ShutdownScene
void ReliefApp::ShutdownScene(void)
{
InfoLog << "ReliefApp::ShutdownScene" << std::endl;
Ogre::SceneManager* pSceneMgr = MagicCore::RenderSystem::GetSingleton()->GetSceneManager();
pSceneMgr->setAmbientLight(Ogre::ColourValue::Black);
pSceneMgr->destroyLight("SimpleLight");
MagicCore::RenderSystem::GetSingleton()->SetupCameraDefaultParameter();
MagicCore::RenderSystem::GetSingleton()->HideRenderingObject("RenderMesh");
MagicCore::RenderSystem::GetSingleton()->GetSceneManager()->getRootSceneNode()->resetToInitialState();
}
示例3: ShutdownScene
void DepthVideoApp::ShutdownScene(void)
{
Ogre::SceneManager* sceneManager = MagicCore::RenderSystem::Get()->GetSceneManager();
sceneManager->setAmbientLight(Ogre::ColourValue::Black);
sceneManager->destroyLight("DepthVideoApp_SimpleLight");
MagicCore::RenderSystem::Get()->HideRenderingObject("PointCloud_DepthVideoApp");
/*MagicCore::RenderSystem::Get()->SetupCameraDefaultParameter();
if (MagicCore::RenderSystem::Get()->GetSceneManager()->hasSceneNode("ModelNode"))
{
MagicCore::RenderSystem::Get()->GetSceneManager()->getSceneNode("ModelNode")->resetToInitialState();
}*/
}
示例4: ShutdownScene
void PointShopApp::ShutdownScene(void)
{
InfoLog << "PointShopApp::ShutdownScene" << std::endl;
Ogre::SceneManager* pSceneMgr = MagicCore::RenderSystem::GetSingleton()->GetSceneManager();
pSceneMgr->setAmbientLight(Ogre::ColourValue::Black);
pSceneMgr->destroyLight("SimpleLight");
MagicCore::RenderSystem::GetSingleton()->SetupCameraDefaultParameter();
MagicCore::RenderSystem::GetSingleton()->HideRenderingObject("RenderPointSet");
if (MagicCore::RenderSystem::GetSingleton()->GetSceneManager()->hasSceneNode("ModelNode"))
{
MagicCore::RenderSystem::GetSingleton()->GetSceneManager()->getSceneNode("ModelNode")->resetToInitialState();
}
ClearSceneData();
}
示例5:
~Impl()
{
if (skyX)
{
// Unload normal clouds
if (skyX->getCloudsManager())
{
skyX->getCloudsManager()->unregisterAll();
skyX->getCloudsManager()->removeAll();
}
// Unload volumetric clouds
if (skyX->getVCloudsManager())
skyX->getVCloudsManager()->remove();
skyX->remove();
Ogre::SceneManager *sm = skyX->getSceneManager();
if (sm)
{
if (sunlight)
sm->destroyLight(sunlight);
if (moonlight)
sm->destroyLight(moonlight);
sm->setAmbientLight(originalAmbientColor);
}
SAFE_DELETE(skyX); // Deletes controller
}
sunlight = 0;
moonlight = 0;
controller = 0;
cloudLayerBottom = 0;
cloudLayerTop = 0;
}
示例6: SetBackgoundColor
EC_OgreEnvironment::~EC_OgreEnvironment()
{
if (renderer_.expired())
return;
RendererPtr renderer = renderer_.lock();
SetBackgoundColor(Color(0, 0, 0));
DisableFog();
if (sunlight_)
{
Ogre::SceneManager *sceneManager = renderer->GetSceneManager();
sceneManager->destroyLight(sunlight_);
sunlight_ = 0;
}
#ifdef CAELUM
ShutdownCaelum();
#endif
#ifdef HYDRAX
ShutdownHydrax();
#endif
}