Changeset 2305 for GTP/trunk/App/Demos/Vis/HillyTerrain
- Timestamp:
- 04/02/07 11:50:12 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp
r2290 r2305 11 11 #include "TestCullingTerrainApplication.h" 12 12 #include <string> 13 13 14 14 15 //-- captions for overlays … … 521 522 setCurrentFrameInfo(evt.timeSinceLastFrame); 522 523 523 // HACK for demo: save new frame rates for different methods on the 524 // same walkthrough 524 // HACK for demo: save new frame rates for the same walkthrough 525 525 if (mSavePrecomputedFps) 526 526 { … … 758 758 bool TerrainFrameListener::processUnbufferedMouseInput(const FrameEvent& evt) 759 759 { 760 /* Rotation factors, may not be used if the second mouse button is pressed. */ 761 762 /* If the second mouse button is pressed, then the mouse movement results in 763 sliding the camera, otherwise we rotate. */ 760 // Rotation factors, may not be used if the second mouse button is pressed. 761 // If the second mouse button is pressed, then the mouse movement results in 762 // sliding the camera, otherwise we rotate. 764 763 if (mInputDevice->getMouseButton(1)) 765 764 { … … 1499 1498 break; 1500 1499 case KC_7: 1501 mTerrainContentGenerator->WriteObjects(objects_out_filename); 1500 { 1501 // generate new objects 1502 const int numObjects = 500; 1503 mApplication->generateScene(numObjects, mCurrentObjectType); 1504 } 1502 1505 break; 1503 1506 case KC_8: … … 1550 1553 1551 1554 case KC_F8: 1552 { 1553 // generate new objects 1554 const int objNum = 500; 1555 mApplication->generateScene(objNum, mCurrentObjectType); 1556 } 1557 break; 1555 1556 mTerrainContentGenerator->WriteObjects(objects_out_filename); 1557 break; 1558 1558 1559 case KC_F9: 1559 1560 mUseAnimation = !mUseAnimation; -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.h
r2168 r2305 42 42 void Reset() 43 43 { 44 mAccFps = mBestFps = mWorstFps = mAccTris = mAccQueryCulledNodes = mAccFrustumCulledNodes = mFrameCount = mAccRenderedNodes = 0; 44 mAccFps = 0; 45 mBestFps = 0; 46 mWorstFps = 0; 47 mAccTris = 0; 48 mAccQueryCulledNodes = 0; 49 mAccFrustumCulledNodes = 0; 50 mFrameCount = mAccRenderedNodes = 0; 45 51 } 46 52 47 void UpdateFrame(int currentFps, int bestFps, int worstFps, int renderedTris, int renderedNodes, int queryCulledNodes, int frustumCulledNodes) 53 void UpdateFrame(int currentFps, 54 int bestFps, 55 int worstFps, 56 int renderedTris, 57 int renderedNodes, 58 int queryCulledNodes, 59 int frustumCulledNodes) 48 60 { 49 61 mAccFps += currentFps; -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp
r2290 r2305 173 173 void TestCullingTerrainApplication::loadConfig(const String& filename) 174 174 { 175 // TODO matt176 175 // Set up the options 177 176 ConfigFile config; … … 191 190 LogManager::getSingleton().logMessage(d.str()); 192 191 } 193 194 /* val = config.getSetting("ViewCells");195 196 if (!val.empty())197 {198 mViewCellsFilename = val.c_str();199 std::stringstream d; d << "view cells file name: " << mViewCellsFilename;200 LogManager::getSingleton().logMessage(d.str());201 }202 203 mInitialPosition = Vector3::UNIT_SCALE;204 205 val = config.getSetting("ViewX");206 207 if (!val.empty())208 mInitialPosition.x = atof( val.c_str() );209 210 val = config.getSetting("ViewY");211 212 if (!val.empty())213 mInitialPosition.y = atof(val.c_str());214 215 val = config.getSetting("ViewZ");216 217 if (!val.empty())218 mInitialPosition.z = atof( val.c_str());219 */220 221 /* val = config.getSetting("OnlineCullingAlgorithm");222 223 if (!val.empty())224 {225 if (val == "CHC")226 {227 mAlgorithm =228 GtpVisibility::VisibilityEnvironment::COHERENT_HIERARCHICAL_CULLING;229 }230 else if (val == "SWC")231 {232 mAlgorithm =233 GtpVisibility::VisibilityEnvironment::STOP_AND_WAIT_CULLING;234 }235 else if (val == "VFC")236 {237 mAlgorithm =238 GtpVisibility::VisibilityEnvironment::FRUSTUM_CULLING;239 }240 else // default rendering241 {242 mAlgorithm =243 GtpVisibility::VisibilityEnvironment::NUM_CULLING_MANAGERS;244 }245 }246 247 /////////////248 // setup scene249 250 // set camera position accordingly251 mCamNode->setPosition(mInitialPosition);252 */253 192 } 254 193 //----------------------------------------------------------------------- … … 348 287 if (daeDoc->doImport(daeName)) 349 288 { 350 LogManager::getSingleton().logMessage(" yuppi");289 LogManager::getSingleton().logMessage("loading collada"); 351 290 /** 352 291 * build up scene
Note: See TracChangeset
for help on using the changeset viewer.