1 | #ifndef _OcclusionCullingSceneManager_H__
|
---|
2 | #define _OcclusionCullingSceneManager_H__
|
---|
3 |
|
---|
4 | #include "OgreSceneNode.h"
|
---|
5 | #include "OgreSceneManager.h"
|
---|
6 | #include "OgreOcclusionCullingSceneTraverser.h"
|
---|
7 | #include "OgrePrerequisites.h"
|
---|
8 | #include "OgreSolidHalfBoundingBox.h"
|
---|
9 | #include <queue>
|
---|
10 |
|
---|
11 | using namespace std; |
---|
12 | |
---|
13 | namespace Ogre { |
---|
14 |
|
---|
15 | /**
|
---|
16 | Class which implements a scene mangager which uses occlusion queries for culling occluded objects
|
---|
17 | */
|
---|
18 | class OcclusionCullingSceneManager : public SceneManager
|
---|
19 | {
|
---|
20 | public:
|
---|
21 | OcclusionCullingSceneManager();
|
---|
22 | ~OcclusionCullingSceneManager();
|
---|
23 |
|
---|
24 | /** Overriden from SceneManager. Renders the scene with the specified algorithm |
---|
25 | /** |
---|
26 | The algorithm is one of |
---|
27 | RENDER_CULL_FRUSTUM: renders the scene with view frustum culling only |
---|
28 | RENDER_STOP_AND_WAIT: renders the scene with the hierarchical stop and wait algorithm |
---|
29 | RENDER_COHERENT: renders the scene with the coherent hierarchical algorithm |
---|
30 | */
|
---|
31 | void _renderVisibleObjects(void);
|
---|
32 | void _findVisibleObjects(Camera* cam, bool onlyShadowCasters);
|
---|
33 | void _updateSceneGraph(Camera* cam);
|
---|
34 |
|
---|
35 | /** Sets the given option for the SceneManager
|
---|
36 | @remarks
|
---|
37 | Options are:
|
---|
38 | "Algorithm", int *;
|
---|
39 | */
|
---|
40 | virtual bool setOption( const String &, const void * );
|
---|
41 | /** Gets the given option for the Scene Manager.
|
---|
42 | @remarks
|
---|
43 | See setOption
|
---|
44 | */
|
---|
45 | virtual bool getOption( const String &, void * );
|
---|
46 |
|
---|
47 | bool getOptionValues( const String & key, StringVector &refValueList );
|
---|
48 | bool getOptionKeys( StringVector &refKeys );
|
---|
49 |
|
---|
50 | protected:
|
---|
51 |
|
---|
52 | OcclusionCullingSceneTraverser *mOcclusionCullingSceneTraverser;
|
---|
53 | };
|
---|
54 |
|
---|
55 | }
|
---|
56 | #endif // OCCLUSIONCULLINGSCENEMANAGER_H |
---|