Changeset 74 for trunk/VUT/GtpVisibility/include
- Timestamp:
- 05/01/05 23:29:27 (20 years ago)
- Location:
- trunk/VUT/GtpVisibility/include
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibility/include/CoherentHierarchicalCullingManager.h
r59 r74 17 17 { 18 18 public: 19 CoherentHierarchicalCullingManager(HierarchyInterface *hierarchyInterface);20 19 void RenderScene(); 21 20 }; -
trunk/VUT/GtpVisibility/include/CullingManager.h
r59 r74 12 12 { 13 13 public: 14 /** Constructor taking a scene traverser for a specific type of hierarchy as argument. 14 /** Default constructor. 15 @remark an appropriate hierarchy interface must be provided for the algorithms to 16 work on specific hierarchy 15 17 */ 16 CullingManager( HierarchyInterface *hierarchyInterface);18 CullingManager(); 17 19 /** Renders the scene using a specific occlusion culling algorithm, e.g., coherent 18 20 hierarchical culling or stop and wait. … … 24 26 */ 25 27 void SetHierarchyInterface(HierarchyInterface *hierarchyInterface); 28 /** Sets the threshold for the visibiliy culling algorithm. 29 @param visibilityThreshold number of visible pixels where an object 30 is still considered invisible. 31 */ 32 void SetVisibilityThreshold(unsigned int visibilityThreshold); 33 34 /** Returns number of frustum culled nodes. 35 */ 36 unsigned int GetNumFrustumCulledNodes(); 37 /** Returns number of occlusion query culled nodes. 38 */ 39 unsigned int GetNumQueryCulledNodes(); 26 40 27 41 protected: … … 29 43 unsigned int mNumQueryCulledNodes; 30 44 unsigned int mNumFrustumCulledNodes; 45 unsigned int mVisibilityThreshold; 31 46 32 unsigned int mVisibilityThreshold;33 47 HierarchyInterface *mHierarchyInterface; 34 48 }; -
trunk/VUT/GtpVisibility/include/FrustumCullingManager.h
r59 r74 12 12 { 13 13 public: 14 FrustumCullingManager(HierarchyInterface *hierarchyInterface);15 14 void RenderScene(); 16 15 }; -
trunk/VUT/GtpVisibility/include/HierarchyInterface.h
r65 r74 19 19 @returns true if node is leaf 20 20 */ 21 virtual bool IsLeaf(HierarchyNode *node) = 0;21 virtual bool IsLeaf(HierarchyNode *node) const = 0; 22 22 /** Traverses the given node. 23 23 @param node the hierarchy node … … 41 41 */ 42 42 void SetSceneRoot(HierarchyNode *root); 43 /** Get the root of the scene hierarchy. 44 @return the hierarchy root 45 */ 46 HierarchyNode *GetSceneRoot() const { 47 return mSceneRoot; 48 } 43 /** Get the root of the scene hierarchy. 44 @return the hierarchy root 45 */ 46 HierarchyNode *GetSceneRoot() const; 49 47 /** Sets the scene root and initialises this scene traverser for a traversal. 50 48 @param root current scene root … … 52 50 */ 53 51 void InitFrame(HierarchyNode *root); 54 55 52 /** Returns current frame id. 56 53 @returns frame id 57 54 */ 58 int GetFrameId();55 unsigned int GetFrameId() const; 59 56 /** Returns the current distance queue. 60 57 @returns current distance queue … … 66 63 @param node2 the second node to be compared 67 64 */ 68 virtual bool HasGreaterDistance(HierarchyNode *node1, HierarchyNode *node2) = 0;65 virtual bool HasGreaterDistance(HierarchyNode *node1, HierarchyNode *node2) const = 0; 69 66 /** Checks if the node is visible from the current view frustum. 70 67 @param node the current node … … 72 69 */ 73 70 virtual bool CheckFrustumVisible(HierarchyNode *node, bool &intersects) = 0; 71 /** Checks if the node is visible from the current view frustum. 72 @param node the current node 73 */ 74 bool CheckFrustumVisible(HierarchyNode *node); 74 75 /** Returns next available occlusion query or creates new one. 75 76 @return the next occlusion query … … 80 81 @returns if the node has renderable geometry 81 82 */ 82 virtual bool HasGeometry(HierarchyNode *node) = 0;83 virtual bool HasGeometry(HierarchyNode *node) const = 0; 83 84 /** Sets the visible flag for this node. 84 85 @param node the current node … … 88 89 /** Returns true if node has the visible flag set. See set 89 90 */ 90 virtual bool IsNodeVisible(HierarchyNode *node) = 0;91 virtual bool IsNodeVisible(HierarchyNode *node) const = 0; 91 92 /** Sets the last visited frame id for this node. 92 93 @param node the current node 93 94 @param frameId the current frame id 94 95 */ 95 virtual void SetLastVisited(HierarchyNode *node, const int frameId) = 0; 96 virtual void SetLastVisited(HierarchyNode *node, 97 const unsigned int frameId) = 0; 96 98 /** Returns frame id when this node was last visited by the traverser. See set 97 99 */ 98 virtual int LastVisited(HierarchyNode *node) = 0; 100 virtual unsigned int LastVisited(HierarchyNode *node) const = 0; 101 /** Returns number of traversed nodes. 102 */ 103 unsigned int GetNumTraversedNodes(); 104 /** Returns number of rendered nodes. 105 */ 106 unsigned int GetNumRenderedNodes(); 99 107 100 108 protected: … … 105 113 106 114 //--- statistics 107 unsigned int mNumSceneNodes;108 115 unsigned int mNumTraversedNodes; 109 unsigned int mNumRenderedGeometry;110 116 unsigned int mNumRenderedNodes; 111 117 -
trunk/VUT/GtpVisibility/include/StopAndWaitCullingManager.h
r59 r74 11 11 { 12 12 public: 13 StopAndWaitCullingManager(HierarchyInterface *hierarchyInterface);14 13 void RenderScene(); 15 14 }; -
trunk/VUT/GtpVisibility/include/VisibilityEnvironment.h
r71 r74 13 13 /** Different types of occlusion culling algorithms 14 14 */ 15 enum CullingManagerType {FRUSTUM_CULLING, STOP_AND_WAIT, COHERENT_HIERARCHICAL_CULLING}; 15 enum CullingManagerType {FRUSTUM_CULLING, 16 STOP_AND_WAIT_CULLING, 17 COHERENT_HIERARCHICAL_CULLING, 18 NUM_CULLING_MANAGERS}; 16 19 17 20 /** Loads an environment from disk. … … 21 24 } // namespace GtpVisibility 22 25 23 /** @}*/ // end of group Visibility24 25 26 #endif // VisibilityEnvironment_H -
trunk/VUT/GtpVisibility/include/VisibilityManager.h
r71 r74 41 41 void ApplyVisibilityCulling(); 42 42 43 /** Sets the threshold for the visibiliy culling algorithm. 44 @param visibilityThreshold number of visible pixels where an object 45 is still considered invisible. 46 @remark automatically sets the threshold of the current and of 47 new culling managers to this value. 48 */ 49 void SetVisibilityCullingThreshold(unsigned int threshold); 50 43 51 protected: 44 52 … … 48 56 VisibilityEnvironment *mVisibilityEnvironment; 49 57 VisibilityEnvironment::CullingManagerType mCullingManagerType; 58 59 unsigned int mVisibilityThreshold; 60 50 61 }; 51 62 } // namespace GtpVisibility
Note: See TracChangeset
for help on using the changeset viewer.