Changeset 22 for trunk/VUT/OcclusionCullingSceneManager/include
- Timestamp:
- 03/21/05 01:59:03 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/OcclusionCullingSceneManager/include/OgreOcclusionCullingSceneManager.h
r21 r22 28 28 29 29 typedef priority_queue<SceneNode *, vector<SceneNode *>, myless<vector<SceneNode *>::value_type> > PriorityQueue; 30 30 typedef queue<SceneNode *> QueryQueue; 31 31 /** 32 32 Class which implements a scene mangager which uses occlusion queries for culling occluded objects … … 36 36 public: 37 37 enum {RENDER_CULL_FRUSTUM, RENDER_STOP_AND_WAIT, RENDER_COHERENT, NUM_RENDERMODES}; 38 38 39 39 OcclusionCullingSceneManager(); 40 ~OcclusionCullingSceneManager(); 40 41 41 42 /** Overriden from SceneManager. */ 42 43 void _renderVisibleObjects(void); 43 44 void _findVisibleObjects(Camera* cam, bool onlyShadowCasters); 44 45 void _updateSceneGraph(Camera* cam); 46 45 47 protected: 48 enum {MODE_QUERY, MODE_RENDER}; 46 49 50 int isLeaf(SceneNode *node); 51 int countSceneNodes(SceneNode *node); 47 52 void renderZPass(); 48 53 void traverseNode(SceneNode *node); 49 void renderSceneNode(SceneNode *node); 50 void switchMode(bool switch2QueryMode); 54 /** Renders current node */ 55 void render(SceneNode *node); 56 /** Sets rendering mode, e.g. query mode or render mode*/ 57 void setRenderingMode(int mode); 51 58 59 /** Renders the scene with view frustum culling only. */ 60 void renderCullFrustum(); 61 /** Renders the scene with the hierarchical stop and wait algorithm. */ 52 62 void renderStopAndWait(); 53 /** renders the scene with view frustum culling only */ 54 void renderCullFrustum(); 63 /** Renders the scene with the coherent hierarchical algorithm and the query queye. */ 64 void renderCoherentWithQueue(); 65 /** Issue a occlusion query for this node. */ 66 void issueOcclusionQuery(SceneNode *node, bool wasVisible); 67 /** Pulls up the visibility from the child nodes. */ 68 void pullUpVisibility(SceneNode *node); 55 69 56 void issueOcclusionQuery(SceneNode *node, bool wasVisible);70 void deleteQueries(); 57 71 58 72 /** we use a priority queue rather than a renderstack */ 59 73 PriorityQueue *mDistanceQueue; 60 // RenderQueue* mDistanceQueue;61 74 62 int mFrameID; 63 int mVisibilityThreshold; 75 unsigned int mFrameID; 76 unsigned int mVisibilityThreshold; 77 unsigned int mNumSceneNodes; 64 78 int mCurrentTestIdx; 65 bool mIsQueryMode;66 79 int mQueryMode; 80 67 81 std::vector<HardwareOcclusionQuery *> mOcclusionQueries; 68 82 };
Note: See TracChangeset
for help on using the changeset viewer.