本文整理汇总了C++中ogre::Camera::enableReflection方法的典型用法代码示例。如果您正苦于以下问题:C++ Camera::enableReflection方法的具体用法?C++ Camera::enableReflection怎么用?C++ Camera::enableReflection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::Camera
的用法示例。
在下文中一共展示了Camera::enableReflection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: preRenderTargetUpdate
void preRenderTargetUpdate(const RenderTargetEvent& evt)
{
// Hide plane and objects below the water
pPlaneEnt->setVisible(false);
std::vector<Entity*>::iterator i, iend;
iend = belowWaterEnts.end();
for (i = belowWaterEnts.begin(); i != iend; ++i) {
(*i)->setVisible(false);
}
theCam->enableReflection(reflectionPlane);
}
示例2: preRenderTargetUpdate
void ReflectionTextureListener::preRenderTargetUpdate(const RenderTargetEvent& evt)
{
// Hide plane and objects below the water
mWater->setVisible(false);
/*list<Ogre::Entity*> entList = Level::getSingleton()->getEntityList();
list<Ogre::Entity*>::iterator it;
for (it = entList.begin();it != entList.end();it++){
if ((*it)->isVisible()){
Ogre::AxisAlignedBox box = (*it)->getWorldBoundingBox();
if (box.getMinimum().y < mWater->getSceneNode()->_getDerivedPosition().y){
(*it)->setVisible(false);
belowWaterEnts.push_back((*it));
}
}
}*/
/*std::vector<Entity*>::iterator i, iend;
iend = belowWaterEnts.end();
for (i = belowWaterEnts.begin(); i != iend; ++i)
{
(*i)->setVisible(false);
}*/
Ogre::SceneManager::MovableObjectIterator it = Level::getSingleton()->getSceneManager()->getMovableObjectIterator("Entity");
while(it.hasMoreElements()){
Ogre::MovableObject *m = it.getNext();
if (m->isVisible() && m->getParentSceneNode()->_getDerivedPosition().y < mWater->getSceneNode()->_getDerivedPosition().y){
m->setVisible(false);
belowWaterEnts.push_back(m);
}
}
Ogre::Camera* cam = Level::getSingleton()->getCurrentSegment()->getActiveCamera()->getCamera();
cam->enableReflection(mWater->getReflectionPlane());
}