[59] | 1 | #ifndef _VisibilitySceneManager_H__
|
---|
| 2 | #define _VisibilitySceneManager_H__
|
---|
| 3 |
|
---|
| 4 | #include "OgreSceneNodeHierarchyInterface.h"
|
---|
| 5 | #include "VisibilityManager.h"
|
---|
| 6 |
|
---|
| 7 | #include <OgreSceneNode.h>
|
---|
| 8 | #include <OgreSceneManager.h>
|
---|
| 9 | #include <OgrePrerequisites.h>
|
---|
| 10 |
|
---|
| 11 | namespace Ogre {
|
---|
| 12 |
|
---|
| 13 | /**
|
---|
| 14 | This class implements the default scene manager, using occlusion queries for
|
---|
| 15 | visibility culling.
|
---|
| 16 | */
|
---|
[115] | 17 | class VisibilitySceneManager: public SceneManager
|
---|
[59] | 18 | {
|
---|
| 19 | public:
|
---|
| 20 | VisibilitySceneManager(GtpVisibility::VisibilityManager *visManager);
|
---|
| 21 | ~VisibilitySceneManager();
|
---|
| 22 |
|
---|
| 23 | /** Overriden from SceneManager. Renders the scene using occlusion culling.
|
---|
| 24 | @remark the type of algorithm is specified by the occlusion culling manager type
|
---|
| 25 | using by the visibility manager.
|
---|
| 26 | */
|
---|
| 27 | void _renderVisibleObjects();
|
---|
| 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 | virtual bool setOption(const String &, const void *);
|
---|
| 37 | /** Gets the given option for the Scene VisibilityManager.
|
---|
| 38 | @remarks
|
---|
| 39 | See setOption
|
---|
| 40 | */
|
---|
| 41 | virtual bool getOption(const String &, void *);
|
---|
| 42 |
|
---|
| 43 | bool getOptionValues(const String & key, StringVector &refValueList);
|
---|
| 44 | bool getOptionKeys( StringVector &refKeys );
|
---|
| 45 |
|
---|
| 46 | /** Sets the visibility manager.
|
---|
| 47 | @param visManager the visibility manager
|
---|
| 48 | */
|
---|
| 49 | void setVisibilityManager(GtpVisibility::VisibilityManager *visManager);
|
---|
| 50 | /** See set.
|
---|
| 51 | */
|
---|
| 52 | GtpVisibility::VisibilityManager *getVisibilityManager();
|
---|
| 53 |
|
---|
| 54 | protected:
|
---|
| 55 |
|
---|
| 56 | SceneNodeHierarchyInterface *mHierarchyInterface;
|
---|
| 57 | GtpVisibility::VisibilityManager *mVisibilityManager;
|
---|
[103] | 58 |
|
---|
[115] | 59 | bool mUseDepthPass;
|
---|
[103] | 60 | bool mShowVisualization;
|
---|
[112] | 61 |
|
---|
| 62 | bool mVisualizeCulledNodes;
|
---|
[59] | 63 | };
|
---|
| 64 | } // namespace Ogre
|
---|
| 65 | #endif // VisibilitySceneManager_H |
---|