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

Revision 114, 2.3 KB checked in by mattausch, 19 years ago (diff)
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);
58protected:
59       
60        /** Writes out stats into the Ogre log file
61        */
62        void WriteLog();
63
64        OctreeHierarchyInterface *mHierarchyInterface;
65        GtpVisibility::VisibilityManager *mVisibilityManager;
66
67        bool mUseVisibilityCulling;
68        bool mShowVisualization;
69        bool mRenderTransparentObjects;
70        bool mVisualizeCulledNodes;
71
72        bool mRenderNodesForViz;
73        bool mRenderNodesContentForViz;
74};
75
76} // namespace Ogre
77
78#endif // CullingTerrainSceneManager_H
Note: See TracBrowser for help on using the repository browser.