Changeset 2101 for GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE
- Timestamp:
- 02/08/07 11:42:53 (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
r1816 r2101 260 260 261 261 // init view cell parameters 262 mSceneMgr->setOption("UseViewCells", &mUseViewCells);262 //mSceneMgr->setOption("UseViewCells", &mUseViewCells); 263 263 mSceneMgr->setOption("UseVisibilityFilter", &mUseVisibilityFilter); 264 264 … … 1221 1221 1222 1222 // load on demand 1223 if (mUseViewCells && !mViewCellsLoaded) 1224 { 1223 if (mUseViewCells)// && !mViewCellsLoaded) 1224 { 1225 LogManager::getSingleton().logMessage("using view cells"); 1225 1226 mLoadingOverlay->show(); 1226 1227 … … 1230 1231 1231 1232 if (!mViewCellsLoaded) 1232 { 1233 std::stringstream d; 1234 d << "loading view cells failed"; 1235 LogManager::getSingleton().logMessage(d.str()); 1236 } 1237 1233 LogManager::getSingleton().logMessage("loading view cells failed"); 1234 else 1235 LogManager::getSingleton().logMessage("view cells successfully loaded"); 1236 1238 1237 mLoadingOverlay->hide(); 1239 1238 } -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj
r1953 r2101 82 82 OptimizeForWindowsApplication="TRUE" 83 83 AdditionalIncludeDirectories=""$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";..\..\Ogre\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\include;..\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include" 84 PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_RELEASE;WIN32;_STLP_RELEASE;GTP_VISIBILITY_MODIFIED_OGRE "84 PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_RELEASE;WIN32;_STLP_RELEASE;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE" 85 85 RuntimeLibrary="2" 86 86 RuntimeTypeInfo="TRUE" … … 231 231 <Tool 232 232 Name="VCCLCompilerTool" 233 Optimization="3" 234 GlobalOptimizations="TRUE" 235 InlineFunctionExpansion="2" 236 EnableIntrinsicFunctions="TRUE" 237 FavorSizeOrSpeed="1" 238 OmitFramePointers="TRUE" 239 EnableFiberSafeOptimizations="TRUE" 240 OptimizeForProcessor="3" 241 OptimizeForWindowsApplication="TRUE" 233 242 AdditionalIncludeDirectories=""$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";..\..\Ogre\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\include;..\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include;"$(LIBXML_HOME)\include";d:\work\Collada\include" 234 243 PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_RELEASE;WIN32;_STLP_RELEASE;GTP_VISIBILITY_MODIFIED_OGRE" 235 RuntimeLibrary="2" 244 StringPooling="TRUE" 245 RuntimeLibrary="2" 246 EnableEnhancedInstructionSet="2" 236 247 RuntimeTypeInfo="TRUE" 237 248 UsePrecompiledHeader="0" … … 246 257 OutputFile="$(OGRE_PATH)/Samples/Common/bin/Release/TestCullingTerrain.exe" 247 258 LinkIncremental="1" 248 AdditionalLibraryDirectories=""$(OGRE_PATH)\Dependencies\Lib\ $(ConfigurationName)";"$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"..\..\Ogre\lib\$(ConfigurationName)";..\..\..\..\..\Lib\Vis\OnlineCullingCHC\lib;"..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\lib\$(ConfigurationName)";"..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)";..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib"259 AdditionalLibraryDirectories=""$(OGRE_PATH)\Dependencies\Lib\Release";"$(OGRE_PATH)\OgreMain\Lib\Release";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\Release";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";..\..\Ogre\lib\Release;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\lib;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\lib\Release;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\Release;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib" 249 260 GenerateDebugInformation="TRUE" 250 261 SubSystem="2" 251 262 OptimizeReferences="2" 252 263 EnableCOMDATFolding="2" 264 OptimizeForWindows98="1" 253 265 TargetMachine="1"/> 254 266 <Tool -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp
r1816 r2101 192 192 } 193 193 194 val = config.getSetting("ViewCells");194 /* val = config.getSetting("ViewCells"); 195 195 196 196 if (!val.empty()) … … 218 218 mInitialPosition.z = atof( val.c_str()); 219 219 220 221 val = config.getSetting("OnlineCullingAlgorithm");220 */ 221 /* val = config.getSetting("OnlineCullingAlgorithm"); 222 222 223 223 if (!val.empty()) … … 248 248 // setup scene 249 249 250 if (!LoadScene(mFilename))251 {252 LogManager::getSingleton().logMessage("error loading scene");253 }254 255 250 // set camera position accordingly 256 251 mCamNode->setPosition(mInitialPosition); 252 */ 257 253 } 258 254 //----------------------------------------------------------------------- … … 286 282 * because then the camera is displayed correctly in the visualization 287 283 */ 284 //Vector3 viewPoint(707, 5000, 528); 285 Vector3 viewPoint(830, 300, -540); 286 std::stringstream d; d << "here3: " << viewPoint; 287 Ogre::LogManager::getSingleton().logMessage(d.str()); 288 288 mCamNode = mSceneMgr->getRootSceneNode()-> 289 createChildSceneNode("CamNode1", Vector3(707, 5000, 528));289 createChildSceneNode("CamNode1", viewPoint); 290 290 291 291 mCamNode->setOrientation(Quaternion(-0.3486, 0.0122, 0.9365, 0.0329)); … … 457 457 loadConfig("terrainCulling.cfg"); 458 458 459 if (!LoadScene(mFilename)) 460 LogManager::getSingleton().logMessage("error loading scene"); 461 462 459 463 ///////////////////////////////////// 460 464 … … 481 485 mSunLight->setSpecularColour(1, 1, 1); 482 486 483 // -- Fog 487 //-- Fog 488 484 489 // NB it's VERY important to set this before calling setWorldGeometry 485 490 // because the vertex program picked will be different … … 492 497 493 498 // terrain creation 494 if (msShowHillyTerrain) 495 { 496 std::string terrain_cfg("terrain.cfg"); 497 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE 498 terrain_cfg = mResourcePath + terrain_cfg; 499 #endif 499 if (1)//||msShowHillyTerrain) 500 { 501 mSceneMgr->getOption("ShowTerrain", &msShowHillyTerrain); 502 std::string terrain_cfg("terrainCulling.cfg"); 500 503 mSceneMgr->setWorldGeometry(terrain_cfg); 504 501 505 } 502 506 … … 555 559 void TestCullingTerrainApplication::generateScene(int num, int objectType) 556 560 { 557 float val = TerrainFrameListener::msObjectScales[objectType];561 const float val = TerrainFrameListener::msObjectScales[objectType]; 558 562 Vector3 scale(val, val, val); 559 563 const float maxHeight = 75; … … 564 568 mTerrainContentGenerator->SetMaxPos(Vector3(mTerrainMaxPos.x, maxHeight, mTerrainMaxPos.z)); 565 569 566 //std::stringstream d; d << "objscale: " << scale[0];567 //Ogre::LogManager::getSingleton().logMessage(d.str());568 569 570 mTerrainContentGenerator->SetScale(scale); 570 571 mTerrainContentGenerator->SetOffset(TerrainFrameListener::msObjectTerrainOffsets[objectType]); … … 576 577 EntityList *entList = mTerrainContentGenerator->GetGeneratedEntities(); 577 578 579 ///////////// 578 580 //-- add animation state for new robots (located at the end of the list) 581 579 582 for (int i = (int)entList->size() - num; i < (int)entList->size(); ++i) 580 583 { … … 800 803 bool TestCullingTerrainApplication::LoadViewCells(const String &filename) 801 804 { 802 LogManager::getSingleton().logMessage("loading view cells"); 803 804 //-- the actual loading happens here 805 return mSceneMgr->setOption("LoadViewCells", filename.c_str()); 805 // if not already loaded, 806 // the scene manager will load the view cells 807 return mSceneMgr->setOption("UseViewCells", filename.c_str()); 806 808 } 807 809
Note: See TracChangeset
for help on using the changeset viewer.