source: trunk/VUT/Ogre/include/OgreVisibilityTerrainSceneManager.h @ 115

Revision 115, 2.5 KB checked in by mattausch, 19 years ago (diff)

added depth pass algorithm + delayed transparent object rendering (so depth ordering is right)

Line 
1#ifndef _VisibilityTerrainSceneManager_H__
2#define _VisibilityTerrainSceneManager_H__
3
4#include <OgreSceneNode.h>
5#include <OgreOctreeSceneManager.h>
6#include <OgreTerrainSceneManager.h>
7#include <OgreOctreeSceneQuery.h>
8#include <OgreOctreeNode.h>
9#include <OgreOctreeCamera.h>
10#include <OgrePrerequisites.h>
11
12#include "OgreOctreeHierarchyInterface.h"
13#include "VisibilityManager.h"
14
15namespace Ogre {
16
17/**
18        This class extends the terrain scene manager,
19        using occlusion queries for visibility culling.
20*/
21class VisibilityTerrainSceneManager: public TerrainSceneManager
22{
23public:
24        VisibilityTerrainSceneManager(GtpVisibility::VisibilityManager *visManager);
25        ~VisibilityTerrainSceneManager();
26
27        void _renderVisibleObjects(void);
28        void _findVisibleObjects(Camera* cam, bool onlyShadowCasters);
29        void _updateSceneGraph(Camera* cam);
30
31        /** Sets the given option for the SceneManager
32                @remarks Options are: "Algorithm", int *;                       
33        */
34       
35        virtual bool setOption( const String &, const void * );
36        /** Gets the given option for the Scene VisibilityManager.
37            @remarks
38                See setOption
39        */
40        virtual bool getOption( const String &, void * );
41
42        bool getOptionValues( const String & key, StringVector &refValueList );
43        bool getOptionKeys( StringVector &refKeys );
44
45        /** Sets the visibility manager
46                @param visManager the visibility manager
47        */
48        void setVisibilityManager(GtpVisibility::VisibilityManager *visManager);
49        /** See set
50        */
51        GtpVisibility::VisibilityManager *getVisibilityManager();
52
53        /** Render a set of objects, see renderSingleObject for param definitions
54                Override so we can handle delayed rendering of transparent objects
55        */
56        virtual void renderObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs,
57            bool doLightIteration, const LightList* manualLightList = 0);
58
59        /** Writes out stats into the Ogre log file.
60        */
61        void WriteLog();
62
63        /** Override pass so we can do the z-fail pass */
64        Pass* setPass(Pass* pass);
65
66protected:
67        /** Creates material for depth pass, e.g., a pass that only fills the depth buffer */
68        void CreateDepthPass();
69        void ShowVisualization(Camera *cam);
70        OctreeHierarchyInterface *mHierarchyInterface;
71        GtpVisibility::VisibilityManager *mVisibilityManager;
72
73        bool mShowVisualization;
74        bool mSkipTransparents;
75        bool mVisualizeCulledNodes;
76
77        bool mRenderNodesForViz;
78        bool mRenderNodesContentForViz;
79        bool mDelayRenderTransparents;
80        bool mUseDepthPass;
81        bool mIsDepthPass;
82
83        Pass *mDepthPass;
84};
85
86} // namespace Ogre
87
88#endif // CullingTerrainSceneManager_H
Note: See TracBrowser for help on using the repository browser.