Changeset 146 for trunk/VUT/work
- Timestamp:
- 06/22/05 11:04:20 (20 years ago)
- Location:
- trunk/VUT/work/TestCullingTerrain
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp
r145 r146 54 54 mTerrainContentGenerator(sceneGenerator), 55 55 mVisibilityThreshold(0), 56 mAssumedVisibility(0), 56 57 mCurrentAlgorithm(GtpVisibility::VisibilityEnvironment::COHERENT_HIERARCHICAL_CULLING), 57 58 //mCurrentAlgorithm(GtpVisibility::VisibilityEnvironment::FRUSTUM_CULLING), … … 109 110 mAlgorithmInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/AlgorithmInfo"); 110 111 mThresholdInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/ThresholdInfo"); 111 112 mUseOptimizationInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/UseOptimizationInfo"); 113 mUseDepthPassInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/UseDepthPassInfo"); 114 mAssumedVisibilityInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/AssumedVisibilityInfo"); 115 112 116 mFrustumCulledNodesInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/FrustumCulledNodesInfo"); 113 117 mQueryCulledNodesInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/QueryCulledNodesInfo"); … … 116 120 mRenderedNodesInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/RenderedNodesInfo"); 117 121 mObjectsInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/ObjectsInfo"); 118 mUseOptimizationInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/UseOptimizationInfo");119 mUseDepthPassInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/UseDepthPassInfo");120 122 mQueriesIssuedInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/QueriesIssuedInfo"); 121 123 … … 131 133 mUseDepthPassInfo->setCaption(": false"); 132 134 mQueriesIssuedInfo->setCaption(": 0"); 135 mAssumedVisibilityInfo->setCaption(": 0"); 133 136 134 137 … … 596 599 } 597 600 //----------------------------------------------------------------------- 601 void TerrainFrameListener::changeAssumedVisibility(int incr) 602 { 603 mAssumedVisibility += incr; 604 if(mAssumedVisibility < 0) mAssumedVisibility = 0; 605 606 char str[100]; sprintf(str,": %d", mAssumedVisibility); 607 608 mSceneMgr->setOption("AssumedVisibility", &mAssumedVisibility); 609 mAssumedVisibilityInfo->setCaption(str); 610 } 611 //----------------------------------------------------------------------- 598 612 void TerrainFrameListener::zoomVizCamera(int zoom) 599 613 { … … 869 883 break; 870 884 885 case KC_8: 886 changeAssumedVisibility(-1); 887 break; 888 case KC_9: 889 changeAssumedVisibility(1); 890 break; 871 891 case KC_LSHIFT: 872 892 mShiftPressed = true; -
trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.h
r144 r146 107 107 void nextAppState(); 108 108 void changeThreshold(int incr); 109 109 void changeAssumedVisibility(int incr); 110 110 void toggleUseOptimization(); 111 111 void toggleShowOctree(); … … 136 136 int mCurrentAlgorithm; 137 137 int mVisibilityThreshold; 138 int mAssumedVisibility; 138 139 // the current frame number 139 140 int mCurrentFrame; … … 149 150 OverlayElement *mAlgorithmInfo; 150 151 OverlayElement *mThresholdInfo; 152 OverlayElement *mAssumedVisibilityInfo; 151 153 OverlayElement *mFrustumCulledNodesInfo; 152 154 OverlayElement *mQueryCulledNodesInfo;
Note: See TracChangeset
for help on using the changeset viewer.