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 |
|
---|
15 | namespace Ogre {
|
---|
16 |
|
---|
17 | /**
|
---|
18 | This class extends the terrain scene manager,
|
---|
19 | using occlusion queries for visibility culling.
|
---|
20 | */
|
---|
21 | class VisibilityTerrainSceneManager: public TerrainSceneManager
|
---|
22 | {
|
---|
23 | public:
|
---|
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
|
---|
33 | Options are:
|
---|
34 | "Algorithm", int *;
|
---|
35 | */
|
---|
36 |
|
---|
37 | virtual bool setOption( const String &, const void * );
|
---|
38 | /** Gets the given option for the Scene VisibilityManager.
|
---|
39 | @remarks
|
---|
40 | See setOption
|
---|
41 | */
|
---|
42 | virtual bool getOption( const String &, void * );
|
---|
43 |
|
---|
44 | bool getOptionValues( const String & key, StringVector &refValueList );
|
---|
45 | bool getOptionKeys( StringVector &refKeys );
|
---|
46 |
|
---|
47 | /** Sets the visibility manager.
|
---|
48 | @param visManager the visibility manager
|
---|
49 | */
|
---|
50 | void setVisibilityManager(GtpVisibility::VisibilityManager *visManager);
|
---|
51 | /** See set.
|
---|
52 | */
|
---|
53 | GtpVisibility::VisibilityManager *getVisibilityManager();
|
---|
54 |
|
---|
55 | protected:
|
---|
56 |
|
---|
57 | OctreeHierarchyInterface *mHierarchyInterface;
|
---|
58 | GtpVisibility::VisibilityManager *mVisibilityManager;
|
---|
59 | };
|
---|
60 |
|
---|
61 | //} // namespace GtpVisibility
|
---|
62 | } // namespace Ogre
|
---|
63 |
|
---|
64 | #endif // CullingTerrainSceneManager_H |
---|