Changeset 130 for trunk/VUT/GtpVisibility
- Timestamp:
- 06/14/05 02:50:05 (20 years ago)
- Location:
- trunk/VUT/GtpVisibility
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibility/include/CoherentHierarchicalCullingManager.h
r74 r130 8 8 namespace GtpVisibility 9 9 { 10 11 typedef std::pair<HierarchyNode *, OcclusionQuery *> QueryPair;12 typedef std::queue<QueryPair> QueryQueue;13 10 14 11 /** Renders the scene with the coherent hierarchical culling algorithm. -
trunk/VUT/GtpVisibility/include/HierarchyInterface.h
r112 r130 3 3 4 4 #include "DistanceQueue.h" 5 #include "VisibilityMesh.h" 5 6 6 7 namespace GtpVisibility { 7 8 8 9 enum CullingType {QUERY_CULLED, FRUSTUM_CULLED}; 10 11 typedef std::vector<HierarchyNode *> HierarchyNodeList; 12 typedef std::vector<GtpVisibility::Mesh *> GeometryList; 13 typedef std::pair<HierarchyNode *, OcclusionQuery *> QueryPair; 14 typedef std::queue<QueryPair> QueryQueue; 9 15 10 16 /** Class which implements a hierarchy interface for a scene hierarchy. … … 26 32 */ 27 33 virtual void TraverseNode(HierarchyNode *node) = 0; 28 /** Renders current scene node.29 @param node current scenenode to be rendered34 /** Renders current hierarchy node. 35 @param node current hierarchy node to be rendered 30 36 */ 31 37 virtual void RenderNode(HierarchyNode *node) = 0; … … 119 125 CullingType type) = NULL; 120 126 127 /** Returns vector of previously rendered hierarchy nodes. 128 */ 129 std::vector<HierarchyNode *> *GetRenderedNodes(); 130 /** Returns vector of previoulsy rendered geometry. 131 */ 132 133 /** Issue a occlusion query for this mesh. 134 @param node the current mesh 135 @returns occlusion query for this node 136 */ 137 virtual GtpVisibility::OcclusionQuery *IssueOcclusionQuery(GtpVisibility::Mesh *mesh) = 0; 138 139 /** Returns geometry of hierarchy node. 140 */ 141 virtual void GetGeometry(GtpVisibility::HierarchyNode *node, 142 GeometryList *geometryList, 143 bool includeChildren) = 0; 144 145 146 /** Renders geometry. 147 */ 148 virtual void RenderGeometry(GtpVisibility::Mesh *geom) = 0; 149 121 150 protected: 122 151 … … 128 157 //--- statistics 129 158 unsigned int mNumTraversedNodes; 130 unsigned int mNumRenderedNodes;131 159 132 160 DistanceQueue *mDistanceQueue; … … 134 162 HierarchyNode *mPreviousNode; 135 163 136 164 std::vector<HierarchyNode *> mRenderedNodes; 137 165 }; 138 166 } // namespace GtpVisibility -
trunk/VUT/GtpVisibility/include/QueryManager.h
r113 r130 11 11 namespace GtpVisibility { 12 12 13 typedef std::vector<OcclusionQuery *> QueryList; 14 13 15 /** This abstract class defines interface for a specific visibility query 14 16 algorithm. The interface supports two from point visibility queries and … … 23 25 public: 24 26 /** Constructor taking a hierarchy interface as an argument. This allows to operate 25 on mdifferent hierarchy types, while reusing the implementation of the query methods.27 on different hierarchy types, while reusing the implementation of the query methods. 26 28 */ 27 29 QueryManager(HierarchyInterface *hierarchyInterface); … … 81 83 ); 82 84 83 /** Sets the scene traverser.84 @remark the scene traverserdepends on the type of hierarchyInterface the scene consists of.85 /** Sets the hierarchy interface. 86 @remark the traversal depends on the type of hierarchyInterface the scene consists of. 85 87 */ 86 void Set SceneTraverser(HierarchyInterface *hierarchyInterface);88 void SetHierarchyInterface(HierarchyInterface *hierarchyInterface); 87 89 88 90 protected: -
trunk/VUT/GtpVisibility/include/VisibilityInfo.h
r71 r130 16 16 NodeInfo(HierarchyNode *node,const float v): mNode(node), mVisibility(v) {} 17 17 18 float GetVisibiliy() const {return mVisibility;} 19 18 20 protected: 19 21 /** pointer to the scene node */ … … 31 33 public: 32 34 MeshInfo(Mesh *mesh, const float v): mMesh(mesh), mVisibility(v) {} 35 36 float GetVisibiliy() const {return mVisibility;} 33 37 34 38 protected: -
trunk/VUT/GtpVisibility/include/VisibilityManager.h
r114 r130 55 55 */ 56 56 void SetUseChcOptimization(bool useOptimization); 57 /** Sets pointer to a query manager. 58 */ 59 void SetQueryManager(QueryManager *queryManager); 60 /** see set 61 */ 62 QueryManager *GetQueryManager(); 57 63 58 64 protected: -
trunk/VUT/GtpVisibility/include/VisibilityMesh.h
r71 r130 2 2 #define _VisibilityMesh_H__ 3 3 4 #include "OgreMesh.h" 4 //#include <OgreMesh.h> 5 #include <OgreEntity.h> 5 6 6 7 namespace GtpVisibility { 7 typedef Ogre:: MeshMesh;8 typedef Ogre::Entity Mesh; 8 9 } 9 10 -
trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj
r120 r130 64 64 PreprocessorDefinitions="WIN32;NDEBUG;_LIB" 65 65 RuntimeLibrary="2" 66 RuntimeTypeInfo="TRUE" 66 67 UsePrecompiledHeader="0" 67 68 WarningLevel="3" … … 107 108 </File> 108 109 <File 109 RelativePath="..\include\DistanceQueue.h">110 </File>111 <File112 110 RelativePath="..\src\DummyPreprocessingManager.cpp"> 113 111 </File> … … 148 146 </File> 149 147 <File 148 RelativePath="..\include\DistanceQueue.h"> 149 </File> 150 <File 151 RelativePath="..\include\DummyQueryManager.h"> 152 </File> 153 <File 150 154 RelativePath="..\include\FrustumCullingManager.h"> 151 155 </File> -
trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp
r119 r130 48 48 49 49 if (!mHierarchyInterface->CheckFrustumVisible(node, intersects)) 50 { //if (mHierarchyInterface->mIsShadowPass)50 { 51 51 mNumFrustumCulledNodes ++; 52 52 -
trunk/VUT/GtpVisibility/src/HierarchyInterface.cpp
r120 r130 7 7 //----------------------------------------------------------------------- 8 8 HierarchyInterface::HierarchyInterface(): 9 mFrameId(0), mNumTraversedNodes(0), m NumRenderedNodes(0),10 m SceneRoot(0), mPreviousNode(0), mCurrentTestIdx(0), mUseOptimization(false)9 mFrameId(0), mNumTraversedNodes(0), mSceneRoot(0), 10 mPreviousNode(0), mCurrentTestIdx(0), mUseOptimization(false) 11 11 //, mIsShadowPass(false) 12 12 { … … 26 26 void HierarchyInterface::InitFrame(HierarchyNode *root) 27 27 { 28 mFrameId ++;28 ++ mFrameId; 29 29 mCurrentTestIdx = 0; 30 30 mNumTraversedNodes = 0; 31 m NumRenderedNodes = 0;31 mRenderedNodes.clear(); 32 32 33 33 SetSceneRoot(root); … … 63 63 unsigned int HierarchyInterface::GetNumRenderedNodes() 64 64 { 65 return mNumRenderedNodes;65 return (unsigned int)mRenderedNodes.size(); 66 66 } 67 67 //----------------------------------------------------------------------- 68 68 void HierarchyInterface::SetUseOptimization(bool useOptimization) 69 69 { 70 70 mUseOptimization = useOptimization; 71 71 } 72 //----------------------------------------------------------------------- 73 std::vector<HierarchyNode *> *HierarchyInterface::GetRenderedNodes() 74 { 75 return &mRenderedNodes; 76 } 72 77 73 78 } // namespace GtpVisibility -
trunk/VUT/GtpVisibility/src/QueryManager.cpp
r71 r130 5 5 6 6 QueryManager::QueryManager(HierarchyInterface *hierarchyInterface) 7 :mHierarchyInterface(hierarchyInterface) 7 8 { 8 9 } -
trunk/VUT/GtpVisibility/src/VisibilityManager.cpp
r114 r130 83 83 return mCullingManagerType; 84 84 } 85 85 //----------------------------------------------------------------------- 86 void VisibilityManager::SetQueryManager(QueryManager *queryManager) 87 { 88 mQueryManager = queryManager; 89 } 90 //----------------------------------------------------------------------- 91 QueryManager *VisibilityManager::GetQueryManager() 92 { 93 return mQueryManager; 94 } 86 95 } // namespace GtpVisibility
Note: See TracChangeset
for help on using the changeset viewer.