Changeset 2555 for GTP/trunk/Lib/Vis/OnlineCullingCHC/include
- Timestamp:
- 10/05/07 15:36:52 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/CoherentHierarchicalCullingManager.h
r2455 r2555 70 70 71 71 bool mTestGeometryForVisibleLeaves; 72 73 QueryQueue mQueryQueue; 72 74 }; 73 75 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/CoherentHierarchicalCullingPlusPlusManager.h
r2553 r2555 1 #ifndef _ BatchedQueriesCullingManager_H__2 #define _ BatchedQueriesCullingManager_H__1 #ifndef _CoherentHierarchicalCullingPlusPlusManager_H__ 2 #define _CoherentHierarchicalCullingPlusPlusManager_H__ 3 3 4 #include "C oherentHierarchicalCullingManager.h"4 #include "CullingManager.h" 5 5 #include "HierarchyInterface.h" 6 6 … … 11 11 /** Renders the scene with the coherent hierarchical culling algorithm. 12 12 */ 13 class BatchedQueriesCullingManager : public CoherentHierarchicalCullingManager13 class CoherentHierarchicalCullingPlusPlusManager: public CullingManager 14 14 { 15 15 public: 16 BatchedQueriesCullingManager();16 CoherentHierarchicalCullingPlusPlusManager(); 17 17 /** Constructor taking the assumed visibility into account, i.e., the estimation 18 18 for how many frames the current visibility is considered to be valid 19 19 */ 20 BatchedQueriesCullingManager(const unsigned int assumedVisibility);20 CoherentHierarchicalCullingPlusPlusManager(const unsigned int assumedVisibility); 21 21 22 22 void RenderScene(); 23 23 24 void SetMaxPending(int maxPending); 24 /** Sets assumed visibility (i.e., an estimation for 25 how many frames the visibility is considered to be valid). 26 @param assumedVisibility indicates for how many frames the 27 same visibility is be assumed. 28 if 0, the visibility is tested deterministically for each frame. 29 */ 30 void SetAssumedVisibility(const unsigned int assumedVisibility); 31 /** This is an optimization when issuing the occlusion test. 32 The test is done with actual geometry rather than the bounding 33 box of leave nodes previously marked as visible. 34 35 @param testGeometry if this optimization should be used 36 @remark this option is only useful for the coherent hierarchical culling algorithm 37 */ 38 void SetTestGeometryForVisibleLeaves(const bool testGeometry); 39 /** See TestGeometryForVisibleLeaves 40 */ 41 bool GetTestGeometryForVisibleLeaves(); 42 25 43 26 44 protected: 27 45 28 void IssueMultipleQueries(PendingQueue &pendingQueue, QueryQueue &queryQueue); 46 /** Decides if node is considered to be visible depeding on the 47 assumed visibility factor. 48 @returns if node is considered to be visible 49 */ 50 bool DecideVisible(HierarchyNode *node) const; 29 51 30 /** maximal pending nodes.52 /** Skip query for this node. 31 53 */ 32 int mMaxPending; 54 void SkipQuery(HierarchyNode *node) const; 55 56 /** If this node is still valid for traversal in this frame. 57 It is possible that the parent was tested invisible before 58 so this node can be skipped. 59 */ 60 bool NodeInvalid(HierarchyNode *node) const; 61 62 void AssignAssumedVisibility(GtpVisibility::HierarchyNode *node); 63 64 void IssueBatchedQuery(HierarchyNodeContainer &nodes); 65 66 inline void IssueQuery(HierarchyNode *node, const bool testGeometry); 67 68 69 ////////////////////// 70 71 /** number of steps the visibility is assumed to be valid. 72 */ 73 unsigned int mAssumedVisibility; 74 75 bool mTestGeometryForVisibleLeaves; 76 77 QueryQueue mQueryQueue; 78 79 std::queue<HierarchyNode *> mVisibleNodes; 80 HierarchyNodeContainer mInvisibleNodes; 81 82 int mMaxInvisibleNodesSize; 33 83 }; 34 84 35 85 } // namespace GtpVisibility 36 86 37 #endif // BatchedQueriesCullingManager_H87 #endif // CoherentHierarchicalCullingPlusPlusManager_H -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/HierarchyInterface.h
r2543 r2555 164 164 */ 165 165 virtual void DecNodeAssumedVisible(HierarchyNode *node) = 0; 166 167 virtual void AddToQueue(GtpVisibility::HierarchyNode *node) = 0; 168 169 virtual void RenderQueue() = 0; 170 171 virtual void TraverseNode2(GtpVisibility::HierarchyNode *node) = 0; 166 172 167 173 protected: -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityEnvironment.h
r2289 r2555 22 22 */ 23 23 enum CullingManagerType {COHERENT_HIERARCHICAL_CULLING, 24 COHERENT_HIERARCHICAL_CULLING_PLUSPLUS, 25 STOP_AND_WAIT_CULLING, 24 26 FRUSTUM_CULLING, 25 RANDOM_UPDATE_CULLING, 26 STOP_AND_WAIT_CULLING, 27 NUM_CULLING_MANAGERS}; 27 NUM_CULLING_MANAGERS}; 28 28 29 29
Note: See TracChangeset
for help on using the changeset viewer.