Changeset 26 for trunk/VUT/OcclusionCullingSceneManager/include
- Timestamp:
- 03/22/05 14:51:26 (20 years ago)
- Location:
- trunk/VUT/OcclusionCullingSceneManager/include
- Files:
-
- 1 added
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingSceneManager.h
r23 r26 5 5 #include "OgreSceneManager.h" 6 6 #include "OgrePrerequisites.h" 7 #include "OgreSolidHalfBoundingBox.h" 7 8 #include <queue> 8 9 … … 27 28 }; 28 29 30 typedef pair<SceneNode *, HardwareOcclusionQuery *> query_pair; 29 31 typedef priority_queue<SceneNode *, vector<SceneNode *>, myless<vector<SceneNode *>::value_type> > PriorityQueue; 30 typedef queue< SceneNode *> QueryQueue;32 typedef queue<query_pair> QueryQueue; 31 33 /** 32 34 Class which implements a scene mangager which uses occlusion queries for culling occluded objects … … 35 37 { 36 38 public: 37 enum {RENDER_CULL_FRUSTUM, RENDER_STOP_AND_WAIT, RENDER_COHERENT, NUM_RENDERMODES};38 39 39 OcclusionCullingSceneManager(); 40 40 ~OcclusionCullingSceneManager(); 41 41 42 /** Overriden from SceneManager. */ 42 43 enum {RENDER_CULL_FRUSTUM, RENDER_STOP_AND_WAIT, RENDER_COHERENT, NUM_RENDERMODES}; 44 45 /** Overriden from SceneManager. Renders the scene with the specified algorithm 46 /** 47 The algorithm is one of 48 RENDER_CULL_FRUSTUM: renders the scene with view frustum culling only 49 RENDER_STOP_AND_WAIT: renders the scene with the hierarchical stop and wait algorithm 50 RENDER_COHERENT: renders the scene with the coherent hierarchical algorithm 51 */ 43 52 void _renderVisibleObjects(void); 44 53 void _findVisibleObjects(Camera* cam, bool onlyShadowCasters); … … 64 73 void renderCoherentWithQueue(); 65 74 /** Issue a occlusion query for this node. */ 66 voidissueOcclusionQuery(SceneNode *node, bool wasVisible);75 HardwareOcclusionQuery *issueOcclusionQuery(SceneNode *node, bool wasVisible); 67 76 /** Pulls up the visibility from the child nodes. */ 68 77 void pullUpVisibility(SceneNode *node); 78 /** delete all previously defined occlusion queries */ 79 void deleteQueries(); 80 /** Renders bounding box of specified node. 81 @param the node which bounding box is to be rendered 82 */ 83 void renderBoundingBox(SceneNode *node); 84 /** Returns one half of the bounding box. 85 @param the half of the bouding box 86 */ 87 SolidHalfBoundingBox *getSolidHalfBoundingBox(int half); 88 /** sets the type of the algorithm 89 @param algorithm type 90 */ 91 void setAlgorithmType(int type); 92 93 int getAlgorithmType(); 69 94 70 void deleteQueries(); 71 72 /** we use a priority queue rather than a renderstack */ 95 // we use a priority queue rather than a renderstack 73 96 PriorityQueue *mDistanceQueue; 74 97 75 98 unsigned int mFrameId; 76 99 unsigned int mVisibilityThreshold; … … 80 103 81 104 std::vector<HardwareOcclusionQuery *> mOcclusionQueries; 105 // two halfes of a aabb 106 SolidHalfBoundingBox *mHalfBoundingBox[2]; 107 int mAlgorithmType; 82 108 }; 83 109
Note: See TracChangeset
for help on using the changeset viewer.