Changeset 2306 for GTP/trunk/Lib/Vis/OnlineCullingCHC/include
- Timestamp:
- 04/02/07 11:50:36 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/HierarchyInterface.h
r2292 r2306 58 58 virtual OcclusionQuery *IssueNodeOcclusionQuery(HierarchyNode *node, 59 59 const bool wasVisible = false) = 0; 60 /** Sets the root of the scene hierarchy.61 @param root the hierarchy root62 */63 void SetHierarchyRoot(HierarchyNode *root);64 /** Get the root of the scene hierarchy.65 @return the hierarchy root66 */67 HierarchyNode *GetHierarchyRoot() const;68 /** Sets the scene root and initialises this hierarchy interface for a traversal.69 @remark also resets the statistics evaluated in the last traversal70 */71 void InitTraversal();72 /** Returns current frame id.73 @returns frame id74 */75 unsigned int GetFrameId() const;76 /** Returns a pointer to the distance queue.77 @returns current distance queue.78 @remark the distance queue stores hierarchy nodes in a front-to-back order79 */80 DistanceQueue *GetQueue();81 82 60 /** Returns distance of the node to the view plane. 83 61 @param node the hierarchy node … … 90 68 virtual bool CheckFrustumVisible(HierarchyNode *node, 91 69 bool &intersects) = 0; 92 /** Checks if the node is visible from the current view frustum. 93 @param node the current node 94 */ 95 bool CheckFrustumVisible(HierarchyNode *node); 96 /** Returns next available occlusion query or creates new one. 97 @return the next occlusion query 98 */ 99 virtual OcclusionQuery *GetNextOcclusionQuery() = 0; 70 100 71 /** Returns true if there is renderable geometry attached to this node 101 72 @param node the current node … … 118 89 virtual void SetLastVisited(HierarchyNode *node, 119 90 const unsigned int frameId) const = 0; 91 92 93 virtual void DetermineFullVisibility(GtpVisibility::HierarchyNode *node) const = 0; 94 95 virtual HierarchyNode *GetRandomLeaf(HierarchyNode *root) = 0; 96 virtual bool IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const = 0; 97 98 virtual void CollectLeaves(HierarchyNode *root, HierarchyNodeContainer &nodes) = 0; 99 100 virtual void RenderNodeRecursive(HierarchyNode *node) = 0; 101 120 102 /** Returns frame id when this node was last visited by the traverser. See set 121 103 */ 122 104 virtual unsigned int LastVisited(HierarchyNode *node) const = 0; 123 /** Returns number of traversed nodes.124 */125 unsigned int GetNumTraversedNodes();126 /** Returns number of rendered nodes.127 */128 unsigned int GetNumRenderedNodes();129 105 130 //bool mIsShadowPass;131 132 106 /** Visualization of a culled node, dependent on the culling type. 133 107 @param node the hierarchy node to be visualized … … 137 111 CullingType type) const = 0; 138 112 139 /** Returns vector of visible hierarchy nodes from previous render. 113 /** Sets the root of the scene hierarchy. 114 @param root the hierarchy root 140 115 */ 141 std::vector<HierarchyNode *> *GetVisibleNodes(); 142 /** Returns vector of previoulsy rendered geometry. 116 void SetHierarchyRoot(HierarchyNode *root); 117 /** Get the root of the scene hierarchy. 118 @return the hierarchy root 143 119 */ 144 120 HierarchyNode *GetHierarchyRoot() const; 145 121 146 122 /** This is an optimization when issuing the occlusion test. … … 153 129 void TestGeometryForVisibleLeaves(bool testGeometry); 154 130 131 /** Sets the scene root and initialises this hierarchy interface for a traversal. 132 @remark also resets the statistics evaluated in the last traversal 133 */ 134 void InitTraversal(); 135 /** Returns current frame id. 136 @returns frame id 137 */ 138 unsigned int GetFrameId() const; 139 /** Returns a pointer to the distance queue. 140 @returns current distance queue. 141 @remark the distance queue stores hierarchy nodes in a front-to-back order 142 */ 143 DistanceQueue *GetQueue(); 155 144 156 virtual void DetermineFullVisibility(GtpVisibility::HierarchyNode *node) const = 0; 145 /** Checks if the node is visible from the current view frustum. 146 @param node the current node 147 */ 148 bool CheckFrustumVisible(HierarchyNode *node); 157 149 158 virtual HierarchyNode *GetRandomLeaf(HierarchyNode *root) = 0; 159 virtual bool IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const = 0; 150 /** Returns number of traversed nodes. 151 */ 152 unsigned int GetNumTraversedNodes(); 153 /** Returns number of rendered nodes. 154 */ 155 unsigned int GetNumRenderedNodes(); 160 156 161 virtual void CollectLeaves(HierarchyNode *root, HierarchyNodeContainer &nodes) = 0; 157 /** Returns vector of visible hierarchy nodes from previous render. 158 */ 159 std::vector<HierarchyNode *> *GetVisibleNodes(); 162 160 163 virtual void RenderNodeRecursive(HierarchyNode *node) = 0; 161 virtual void PullUpLastVisited(GtpVisibility::HierarchyNode *node, const int frameId) const = 0; 162 virtual void DetermineVisibilityRatio(GtpVisibility::HierarchyNode *node) const = 0; 163 virtual float GetNodeVisibilityRatio(GtpVisibility::HierarchyNode *node) const = 0; 164 164 165 165 protected: … … 185 185 /// buffer for a node pointer 186 186 HierarchyNode *mSavedNode; 187 187 188 /// list of rendered hierarchy nodes (e.g., useful for exact visibility queries) 188 189 std::vector<HierarchyNode *> mVisibleNodes;
Note: See TracChangeset
for help on using the changeset viewer.