コード例 #1
0
ファイル: water.cpp プロジェクト: christianboutin/Shmoulette
void ReflectionTextureListener::postRenderTargetUpdate(const RenderTargetEvent& evt)
{
    // Show plane and objects below the water
	

    mWater->setVisible(true);
	std::vector<Ogre::MovableObject*>::iterator i, iend;
	iend = belowWaterEnts.end();
    for (i = belowWaterEnts.begin(); i != iend; ++i)
    {
        (*i)->setVisible(true);
    }
	belowWaterEnts.clear();

	/*Ogre::SceneManager::MovableObjectIterator it = Level::getSingleton()->getSceneManager()->getMovableObjectIterator("Entity");
	while(it.hasMoreElements()){
		Ogre::MovableObject *m = it.getNext();	
		if (m->getParentSceneNode()->_getDerivedPosition().y < mWater->getSceneNode()->_getDerivedPosition().y){
			m->setVisible(true);
		}
	}*/
	

	Ogre::Camera* cam = Level::getSingleton()->getCurrentSegment()->getActiveCamera()->getCamera();
	cam->disableReflection();
}
コード例 #2
0
ファイル: Water.cpp プロジェクト: junrw/ember-gsoc2012
 void postRenderTargetUpdate(const RenderTargetEvent& evt)
 {
   // Show plane and objects below the water
   pPlaneEnt->setVisible(true);
   std::vector<Entity*>::iterator i, iend;
   iend = belowWaterEnts.end();
   for (i = belowWaterEnts.begin(); i != iend; ++i) {
     (*i)->setVisible(true);
   }
   theCam->disableReflection();
 }