本文整理汇总了C++中ogre::MovableObject::getVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ MovableObject::getVisible方法的具体用法?C++ MovableObject::getVisible怎么用?C++ MovableObject::getVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::MovableObject
的用法示例。
在下文中一共展示了MovableObject::getVisible方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mLightning
MapCameraLightningInstance::MapCameraLightningInstance(MapCameraLightning& lightning)
: mLightning(lightning)
{
Ogre::SceneManager::MovableObjectIterator iterator = lightning.getSceneManager().getMovableObjectIterator(Ogre::LightFactory::FACTORY_TYPE_NAME);
while (iterator.hasMoreElements()) {
Ogre::MovableObject* light = iterator.getNext();
if (light && light != mLightning.getLight()) {
if (light->getVisible()) {
mVisibleLights.push_back(light);
light->setVisible(false);
}
}
}
mLightning.getLight()->setVisible(true);
mAmbientColour = mLightning.getSceneManager().getAmbientLight();
mLightning.getSceneManager().setAmbientLight(mLightning.getLight()->getDiffuseColour());
}
示例2: renderTextures
void ImpostorTexture::renderTextures(bool force)
{
#ifdef IMPOSTOR_FILE_SAVE
TexturePtr renderTexture;
#else
TexturePtr renderTexture(texture);
//if we're not using a file image we need to set up a resource loader, so that the texture is regenerated if it's ever unloaded (such as switching between fullscreen and the desktop in win32)
loader = std::auto_ptr<ImpostorTextureResourceLoader>(new ImpostorTextureResourceLoader(*this));
#endif
RenderTexture *renderTarget;
Camera *renderCamera;
Viewport *renderViewport;
SceneNode *camNode;
//Set up RTT texture
uint32 textureSize = ImpostorPage::impostorResolution;
if (renderTexture.isNull()) {
renderTexture = TextureManager::getSingleton().createManual(getUniqueID("ImpostorTexture"), "Impostors",
TEX_TYPE_2D, textureSize * IMPOSTOR_YAW_ANGLES, textureSize * IMPOSTOR_PITCH_ANGLES, 0, PF_A8R8G8B8, TU_RENDERTARGET, loader.get());
}
renderTexture->setNumMipmaps(MIP_UNLIMITED);
//Set up render target
renderTarget = renderTexture->getBuffer()->getRenderTarget();
renderTarget->setAutoUpdated(false);
//Set up camera
camNode = sceneMgr->getSceneNode("ImpostorPage::cameraNode");
renderCamera = sceneMgr->createCamera(getUniqueID("ImpostorCam"));
camNode->attachObject(renderCamera);
renderCamera->setLodBias(1000.0f);
renderViewport = renderTarget->addViewport(renderCamera);
renderViewport->setOverlaysEnabled(false);
renderViewport->setClearEveryFrame(true);
renderViewport->setShadowsEnabled(false);
renderViewport->setBackgroundColour(ImpostorPage::impostorBackgroundColor);
//Set up scene node
SceneNode* node = sceneMgr->getSceneNode("ImpostorPage::renderNode");
Ogre::SceneNode* oldSceneNode = entity->getParentSceneNode();
if (oldSceneNode) {
oldSceneNode->detachObject(entity);
}
node->attachObject(entity);
node->setPosition(-entityCenter);
//Set up camera FOV
const Real objDist = entityRadius * 100;
const Real nearDist = objDist - (entityRadius + 1);
const Real farDist = objDist + (entityRadius + 1);
renderCamera->setAspectRatio(1.0f);
renderCamera->setFOVy(Math::ATan(entityDiameter / objDist));
renderCamera->setNearClipDistance(nearDist);
renderCamera->setFarClipDistance(farDist);
//Disable mipmapping (without this, masked textures look bad)
MaterialManager *mm = MaterialManager::getSingletonPtr();
FilterOptions oldMinFilter = mm->getDefaultTextureFiltering(FT_MIN);
FilterOptions oldMagFilter = mm->getDefaultTextureFiltering(FT_MAG);
FilterOptions oldMipFilter = mm->getDefaultTextureFiltering(FT_MIP);
mm->setDefaultTextureFiltering(FO_POINT, FO_LINEAR, FO_NONE);
//Disable fog
FogMode oldFogMode = sceneMgr->getFogMode();
ColourValue oldFogColor = sceneMgr->getFogColour();
Real oldFogDensity = sceneMgr->getFogDensity();
Real oldFogStart = sceneMgr->getFogStart();
Real oldFogEnd = sceneMgr->getFogEnd();
sceneMgr->setFog(Ogre::FOG_EXP2, Ogre::ColourValue(0,0,0,0), 0.0f, 0.0f, 0.0f); //Ember change
//We need to disable all lightning and render it full bright
Ogre::ColourValue oldAmbientColour = sceneMgr->getAmbientLight();
sceneMgr->setAmbientLight(ColourValue::White);
std::vector<Ogre::MovableObject*> lightStore;
Ogre::SceneManager::MovableObjectIterator lightIterator = sceneMgr->getMovableObjectIterator(Ogre::LightFactory::FACTORY_TYPE_NAME);
while (lightIterator.hasMoreElements()) {
Ogre::MovableObject* light = lightIterator.getNext();
if (light) {
if (light->getVisible()) {
lightStore.push_back(light);
light->setVisible(false);
}
}
}
// Get current status of the queue mode
Ogre::SceneManager::SpecialCaseRenderQueueMode OldSpecialCaseRenderQueueMode = sceneMgr->getSpecialCaseRenderQueueMode();
//Only render the entity
sceneMgr->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_INCLUDE);
sceneMgr->addSpecialCaseRenderQueue(group->geom->getRenderQueue() + 1);
uint8 oldRenderQueueGroup = entity->getRenderQueueGroup();
entity->setRenderQueueGroup(group->geom->getRenderQueue() + 1);
bool oldVisible = entity->getVisible();
entity->setVisible(true);
float oldMaxDistance = entity->getRenderingDistance();
entity->setRenderingDistance(0);
//.........这里部分代码省略.........
示例3: getVisible
bool getVisible(void) const { return mOgreObject ? mOgreObject->getVisible() : false; }