#ifndef _VisibilityOctreeSceneManager_H__ #define _VisibilityOctreeSceneManager_H__ #include #include #include #include #include #include "OgreOctreeHierarchyInterface.h" #include "VisibilityManager.h" namespace Ogre { /** This class extends the octree scene manager, using occlusion queries for visibility culling. */ class VisibilityOctreeSceneManager: public OctreeSceneManager { public: VisibilityOctreeSceneManager(GtpVisibility::VisibilityManager *visManager); ~VisibilityOctreeSceneManager(); void _renderVisibleObjects(); void _findVisibleObjects(Camera* cam, bool onlyShadowCasters); void _updateSceneGraph(Camera* cam ); /** Sets the given option for the SceneManager @remarks Options are: "Algorithm", int *; */ virtual bool setOption(const String &, const void *); /** Gets the given option for the Scene VisibilityManager. @remarks See setOption */ virtual bool getOption(const String &, void *); bool getOptionValues(const String & key, StringVector &refValueList); bool getOptionKeys(StringVector &refKeys); /** Sets the visibility manager. @param visManager the visibility manager */ void setVisibilityManager(GtpVisibility::VisibilityManager *visManager); /** See set. */ GtpVisibility::VisibilityManager *getVisibilityManager(); /** Render a set of objects, see renderSingleObject for param definitions Override so we can handle delayed rendering of transparent objects */ virtual void renderObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs, bool doLightIteration, const LightList* manualLightList = 0); /** Writes out stats into the Ogre log file. */ void WriteLog(); /** Override pass so we can do the z-fail pass */ Pass* setPass(Pass* pass); protected: /** Creates material for depth pass, e.g., a pass that only fills the depth buffer */ void CreateDepthPass(); void ShowVisualization(Camera *cam); OctreeHierarchyInterface *mHierarchyInterface; GtpVisibility::VisibilityManager *mVisibilityManager; bool mShowVisualization; bool mSkipTransparents; bool mVisualizeCulledNodes; bool mRenderNodesForViz; bool mRenderNodesContentForViz; bool mDelayRenderTransparents; bool mUseDepthPass; bool mIsDepthPass; Pass *mDepthPass; }; } // namespace Ogre #endif // VisibilityOctreeSceneManager_H