本文整理汇总了C++中ogre::SceneManager::destroyAllEntities方法的典型用法代码示例。如果您正苦于以下问题:C++ SceneManager::destroyAllEntities方法的具体用法?C++ SceneManager::destroyAllEntities怎么用?C++ SceneManager::destroyAllEntities使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::SceneManager
的用法示例。
在下文中一共展示了SceneManager::destroyAllEntities方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
//.........这里部分代码省略.........
// This is often use to change the general feeling of a whole scene.
Ogre::ColourValue lAmbientColour(0.1f, 0.7f, 0.3f, 0.3f);
lFirstPass->setAmbient(lAmbientColour);
// specular colour, is the colour of the 'little light reflection'
// that you can see on some object. For example, my bald head skin
// reflect the sun. This make a 'round of specular lighting'.
// Set this to black if you don't want to see it.
Ogre::ColourValue lSpecularColour(0.2f, 1.0f, 0.6f, 0.6f);
lFirstPass->setSpecular(lSpecularColour);
// Shininess is the 'inverse of specular color splattering' coefficient.
// If this is big (e.g : 64) you get a very tiny dot with a quite strong color (on round surface).
// If this is 0, you get a simple color layer (the dot has become very wide).
Ogre::Real lShininess = 34.0f;
lFirstPass->setShininess(lShininess);
}
//end material tests
//System Creator
std::string systemDefinition[10] = {"15000,0,0,false,false,false,700000,0", "300,0,0,false,false,barren,2500,1",
"300,x,y,false,co2,barren,6000,2", "300,x,y,h2o,n2/o2,gaia,6300,3", "300,x,y,false,co2,mars,3400,4",
"300,x,y,false,h2/he,gasgiant,71000,5", "300,x,y,false,h2/he,gasgiant,60000,6", "300,x,y,false,h2/he,gasgiant,25001,7",
"300,x,y,false,h2/he,gasgiant,25000,8", "300,x,y,false,n-ice,ice,1100,9"};
StarSystem sol = StarSystem::StarSystem(sceneMgr, systemDefinition);
//Star Creator
/*
{
int x = 0;
int y = 0;
int kelvin = 15000;
CelestialBody newstar = CelestialBody::CelestialBody(kelvin, 100, systemNode, sceneMgr, x, y);
}
// Spectrum testing and multi star generation.
int time = 200;
int x = -500;
int y = 500;
for ( int count = 1; count <= time; count++){
int kelvin = count * (40000/time);
Star newstar = Star::Star(kelvin, 100, systemNode, sceneMgr, x, y);
x += 20;
if (count % 10 == 0) {
y -= 20;
x = -500;
}
}
*/
// I move the SceneNode back 15 so that it is visible to the camera.
float PositionOffset = 0.0;
float distance = -2000.0;
systemNode->translate(0, PositionOffset, distance);
camera->lookAt(Ogre::Vector3(0,0,distance));
while (sim->getCurrentState() != SHUTDOWN) {
sol.rotateOrbits();
handler->capture();
ogre->renderOneFrame();
// run the message pump (uncomment for Eihort)
Ogre::WindowEventUtilities::messagePump();
}
{
window->removeAllViewports();
}
{
sceneMgr->destroyAllCameras();
sceneMgr->destroyAllManualObjects();
sceneMgr->destroyAllEntities();
sceneMgr->destroyAllLights();
systemNode->removeAndDestroyAllChildren();
}
{
Ogre::ResourceGroupManager& lRgMgr = Ogre::ResourceGroupManager::getSingleton();
lRgMgr.destroyResourceGroup(lNameOfResourceGroup);
}
// clean up after ourselves
delete pDlg;
delete handler;
delete sim;
delete ogre;
return 0;
}