Changeset 112 for trunk/VUT/GtpVisibility
- Timestamp:
- 05/25/05 18:28:46 (20 years ago)
- Location:
- trunk/VUT/GtpVisibility
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibility/include/CullingManager.h
r87 r112 43 43 /** basic initializations on beginning of each frame, e.g., 44 44 resets statistics. 45 @param visualizeCulledNodes 45 46 */ 46 void InitFrame(); 47 void InitFrame(bool visualizeCulledNodes); 48 49 /** Some visualization of culled nodes are shown, depending 50 on the type of hierarchy. 51 @param showVisualization if true, culled nodes are visualized 52 */ 53 void SetVisualizeCulledNodes(bool visualizeCulledNodes); 47 54 48 55 protected: … … 54 61 55 62 HierarchyInterface *mHierarchyInterface; 63 bool mVisualizeCulledNodes; 56 64 }; 57 65 } // namespace GtpVisibility -
trunk/VUT/GtpVisibility/include/HierarchyInterface.h
r111 r112 5 5 6 6 namespace GtpVisibility { 7 8 enum CullingType {QUERY_CULLED, FRUSTUM_CULLED}; 7 9 8 10 /** Class which implements a hierarchy interface for a scene hierarchy. … … 109 111 */ 110 112 void SetUseOptimization(bool useOptimization); 113 //bool mIsShadowPass; 111 114 112 bool mDummy; 115 /** Visualization of a culled node, dependent on the culling type. 116 @param type can be one of FRUSTUM_CULLED, QUERY_CULLED 117 */ 118 virtual void VisualizeCulledNode(HierarchyNode *node, 119 CullingType type) = NULL; 113 120 114 121 protected: -
trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp
r111 r112 8 8 { 9 9 //InitFrame(); 10 11 10 QueryQueue queryQueue; 12 11 unsigned int visiblePixels = 0; … … 30 29 } 31 30 else 32 { 33 if (mHierarchyInterface->mDummy) 31 { //if (mHierarchyInterface->mIsShadowPass) 34 32 mNumQueryCulledNodes ++; 33 34 if(mVisualizeCulledNodes) 35 { 36 mHierarchyInterface->VisualizeCulledNode(node, QUERY_CULLED); 37 } 35 38 } 36 39 } … … 45 48 46 49 if (!mHierarchyInterface->CheckFrustumVisible(node, intersects)) 47 { if (mHierarchyInterface->mDummy)50 {//if (mHierarchyInterface->mIsShadowPass) 48 51 mNumFrustumCulledNodes ++; 52 53 if(mVisualizeCulledNodes) 54 { 55 mHierarchyInterface->VisualizeCulledNode(node, QUERY_CULLED); 56 } 49 57 } 50 58 else -
trunk/VUT/GtpVisibility/src/CullingManager.cpp
r87 r112 6 6 CullingManager::CullingManager(): 7 7 mHierarchyInterface(NULL), mVisibilityThreshold(0), mNumQueryCulledNodes(0), 8 mNumFrustumCulledNodes(0), mNumQueriesIssued(0) 8 mNumFrustumCulledNodes(0), mNumQueriesIssued(0), 9 mVisualizeCulledNodes(false) 9 10 { 10 11 } … … 35 36 } 36 37 //----------------------------------------------------------------------- 37 void CullingManager::InitFrame() 38 void CullingManager::SetVisualizeCulledNodes(bool visualizeCulledNodes) 39 { 40 mVisualizeCulledNodes = visualizeCulledNodes; 41 } 42 //----------------------------------------------------------------------- 43 void CullingManager::InitFrame(bool visualizeCulledNodes) 38 44 { 39 45 mNumFrustumCulledNodes = mNumQueryCulledNodes = mNumQueriesIssued = 0; 46 mVisualizeCulledNodes = visualizeCulledNodes; 40 47 } 41 48 } // namespace GtpVisibility -
trunk/VUT/GtpVisibility/src/FrustumCullingManager.cpp
r111 r112 11 11 while (!mHierarchyInterface->GetQueue()->empty()) 12 12 { 13 if (mHierarchyInterface->mDummy)14 Ogre::LogManager::getSingleton().logMessage("shadow pass");15 // elseOgre::LogManager::getSingleton().logMessage("no shadow pass");16 13 HierarchyNode *node = mHierarchyInterface->GetQueue()->top(); 17 14 mHierarchyInterface->GetQueue()->pop(); … … 22 19 23 20 if (!mHierarchyInterface->CheckFrustumVisible(node)) 24 { if (mHierarchyInterface->mDummy)21 {//if (mHierarchyInterface->mIsShadowPass) 25 22 mNumFrustumCulledNodes ++; 26 23 } -
trunk/VUT/GtpVisibility/src/HierarchyInterface.cpp
r111 r112 8 8 HierarchyInterface::HierarchyInterface(): 9 9 mFrameId(0), mNumTraversedNodes(0), mNumRenderedNodes(0), 10 mSceneRoot(0), mPreviousNode(0), mCurrentTestIdx(0), mUseOptimization(true) ,11 mDummy(false)10 mSceneRoot(0), mPreviousNode(0), mCurrentTestIdx(0), mUseOptimization(true) 11 //, mIsShadowPass(false) 12 12 { 13 13 mDistanceQueue = new DistanceQueue(GreaterDistance<HierarchyNode *>(this)); -
trunk/VUT/GtpVisibility/src/StopAndWaitCullingManager.cpp
r111 r112 21 21 22 22 if (!mHierarchyInterface->CheckFrustumVisible(node, intersects)) 23 { if (mHierarchyInterface->mDummy)23 {//if (mHierarchyInterface->mIsShadowPass) 24 24 mNumFrustumCulledNodes ++; 25 25 } … … 46 46 } 47 47 else 48 { 49 if (mHierarchyInterface->mDummy) 48 { //if (mHierarchyInterface->mIsShadowPass) 50 49 mNumQueryCulledNodes ++; 51 50 }
Note: See TracChangeset
for help on using the changeset viewer.