Changeset 107 for trunk/VUT/work
- Timestamp:
- 05/23/05 01:31:08 (20 years ago)
- Location:
- trunk/VUT/work
- Files:
-
- 4 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCulling/TestCulling.vcproj
r82 r107 72 72 <Tool 73 73 Name="VCCLCompilerTool" 74 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_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";../include;../../ GtpVisibility/include"74 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_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";../include;../../Ogre/include;../../GtpVisibility/include" 75 75 PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_RELEASE;WIN32;_STLP_RELEASE;GTP_VISIBILITY_MODIFIED_OGRE" 76 76 RuntimeLibrary="2" … … 83 83 <Tool 84 84 Name="VCLinkerTool" 85 AdditionalDependencies="OGREMain.LIB Plugin_OctreeSceneManager.lib CEGUIBase.lib OgreGUIRenderer.lib "85 AdditionalDependencies="OGREMain.LIB Plugin_OctreeSceneManager.lib CEGUIBase.lib OgreGUIRenderer.lib Plugin_VisibilitySceneManager.lib" 86 86 OutputFile="$(OGRE_PATH)/Samples/Common/bin/Release/TestCulling.exe" 87 87 LinkIncremental="1" 88 AdditionalLibraryDirectories=""$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$( OGRE_PATH)\Samples\Common\CEGUIRenderer\lib""88 AdditionalLibraryDirectories=""$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(GAMETOOLS_PATH)\trunk\VUT\Ogre\lib\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib"" 89 89 GenerateDebugInformation="TRUE" 90 90 SubSystem="2" … … 122 122 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> 123 123 <File 124 RelativePath=".\SceneContentGenerator.cpp">125 </File>126 <File127 124 RelativePath=".\TestCullingApplication.cpp"> 128 125 </File> … … 132 129 Filter="h;hpp;hxx;hm;inl;inc;xsd" 133 130 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 134 <File135 RelativePath=".\SceneContentGenerator.h">136 </File>137 131 <File 138 132 RelativePath=".\TestCullingApplication.h"> -
trunk/VUT/work/TestCulling/TestCullingApplication.cpp
r103 r107 14 14 #include <Ogre.h> 15 15 #include "TestCullingApplication.h" 16 #include " SceneContentGenerator.h"16 #include "OgreSceneContentGenerator.h" 17 17 18 18 #define WIN32_LEAN_AND_MEAN … … 212 212 if ( mRMouseDown ) 213 213 { 214 mCamera->yaw( -e->getRelX() * mRotateSpeed);215 mCamera->pitch( -e->getRelY() * mRotateSpeed);214 mCamera->yaw(-e->getRelX() * mRotateSpeed); 215 mCamera->pitch(-e->getRelY() * mRotateSpeed); 216 216 } 217 217 } -
trunk/VUT/work/TestCulling/TestCullingApplication.h
r100 r107 6 6 #include "ExampleApplication.h" 7 7 #include "VisibilityEnvironment.h" 8 #include " SceneContentGenerator.h"8 #include "OgreSceneContentGenerator.h" 9 9 10 10 Real timeDelay = 0; -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrain.vcproj
r105 r107 21 21 Name="VCCLCompilerTool" 22 22 Optimization="0" 23 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_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";..\..\GtpVisibility\include;..\ include;..\TestCulling"23 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_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";..\..\GtpVisibility\include;..\..\Ogre\include;..\include;..\TestCulling" 24 24 PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_DEBUG;WIN32;_STLP_DEBUG;PLUGIN_TERRAIN_IMPORTS;GTP_VISIBILITY_MODIFIED_OGRE" 25 25 MinimalRebuild="TRUE" … … 72 72 <Tool 73 73 Name="VCCLCompilerTool" 74 AdditionalIncludeDirectories=""$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\ReferenceApplication\ReferenceAppLayer\include";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";..\..\ GtpVisibility\include;..\include;..\TestCulling"74 AdditionalIncludeDirectories=""$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\ReferenceApplication\ReferenceAppLayer\include";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";..\..\Ogre\include;..\..\GtpVisibility\include;..\include;..\TestCulling" 75 75 PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_RELEASE;WIN32;_STLP_RELEASE;GTP_VISIBILITY_MODIFIED_OGRE" 76 76 RuntimeLibrary="2" … … 83 83 <Tool 84 84 Name="VCLinkerTool" 85 AdditionalDependencies="OGREMain.LIB Plugin_OctreeSceneManager.lib CEGUIBase.lib OgreGUIRenderer.lib"85 AdditionalDependencies="OGREMain.LIB CEGUIBase.lib OgreGUIRenderer.lib Plugin_OctreeSceneManager.lib Plugin_VisibilitySceneManager.lib" 86 86 OutputFile="$(OGRE_PATH)/Samples/Common/bin/Release/TestCullingTerrain.exe" 87 87 LinkIncremental="1" 88 AdditionalLibraryDirectories=""$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib" "88 AdditionalLibraryDirectories=""$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"$(GAMETOOLS_PATH)\trunk\VUT\Ogre\lib\$(ConfigurationName)"" 89 89 GenerateDebugInformation="TRUE" 90 90 SubSystem="2" … … 122 122 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> 123 123 <File 124 RelativePath="..\TestCulling\SceneContentGenerator.cpp">125 </File>126 <File127 RelativePath=".\TerrainContentGenerator.cpp">128 </File>129 <File130 124 RelativePath=".\TestCullingTerrainApplication.cpp"> 131 125 </File> … … 136 130 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 137 131 <File 138 RelativePath="..\TestCulling\SceneContentGenerator.h">139 </File>140 <File141 RelativePath=".\TerrainContentGenerator.h">142 </File>143 <File144 132 RelativePath=".\TestCullingTerrainApplication.h"> 145 133 </File> -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp
r106 r107 23 23 #define VIZ_VIEWPORT_Z_ORDER 10 24 24 25 const char* frame_outfile = "frame.out"; 26 const char* objects_outfile = "objects.out"; 27 25 28 /*******************************************************/ 26 29 /* TestCullingTerrainApplication implementation */ … … 45 48 * because then the camera is displayed correctly in the visualization 46 49 */ 47 48 50 mCamNode = mSceneMgr->getRootSceneNode()->createChildSceneNode( 49 51 "CamNode1", Vector3(707, 5000, 528)); … … 126 128 127 129 mTerrainContentGenerator = new TerrainContentGenerator(mSceneMgr); 128 mTerrainContentGenerator->SetMaxPos(Vector3(3000.0f, 5000.0f, 3000.0f)); 129 130 mTerrainContentGenerator->GenerateScene(1500, "robot.mesh"); 131 // mTerrainContentGenerator->GenerateScene(500, "ninja.mesh"); 130 131 // if no objects file generate yourself 132 if (!mTerrainContentGenerator->LoadObjects("objects.out")) 133 { 134 // the objects are generated on the whole terrain 135 // height is restricted to 50, so no objects appear on peaks 136 // => there is much occlusion 137 mTerrainContentGenerator->SetMaxPos(Vector3(3000.0f, 50.0f, 3000.0f)); 138 mTerrainContentGenerator->GenerateScene(1500, "robot"); 139 // mTerrainContentGenerator->GenerateScene(500, "ninja"); 140 } 132 141 133 142 // no limitations needed anymore: the user can set 134 143 // objects also on peaks of terrain 135 mTerrainContentGenerator->SetMax Height(5000);144 mTerrainContentGenerator->SetMaxPos(Vector3(3000.0f, 5000.0f, 3000.0f)); 136 145 } 137 146 //----------------------------------------------------------------------- … … 192 201 mCamNode(camNode), 193 202 mCullCamera(false), 194 mState(WALKTHROUGH), 195 mCurrentFrame(1) 203 mAppState(WALKTHROUGH), 204 mCurrentFrame(0), 205 mRecord(false), 206 mTimeElapsed(0) 196 207 { 197 208 // Reduce move speed … … 270 281 // Get results, create a node/entity on the position 271 282 mCurrentObject = mTerrainContentGenerator->GenerateSceneObject( 272 mouseRay.getOrigin(), mouseRay.getDirection(), "robot.mesh");283 mouseRay.getOrigin(), Vector3(0,0,0), "robot.mesh"); 273 284 274 285 mLMouseDown = true; … … 326 337 bool MouseQueryListener::frameStarted(const FrameEvent &evt) 327 338 { 328 switch (m State)339 switch (mAppState) 329 340 { 330 341 case REPLAY: 331 SetCurrentCameraPath(mCamNode); 332 mCamNode->setPosition(mCameraPath[mCurrentFrame].position); 333 mCamNode->setOrientation(mCameraPath[mCurrentFrame].orientation); 334 (mCurrentFrame++) % mCameraPath.size(); 342 setCurrentFrameInfo(evt.timeSinceLastFrame); 335 343 break; 336 344 case WALKTHROUGH: 345 if (mRecord) 346 { 347 addFrameInfo(mCamNode, evt.timeSinceLastFrame); 348 // print recording message 349 mWindow->setDebugText("Recording frame " + 350 StringConverter::toString(mFrameInfo.size() - 1)); 351 } 352 337 353 Clamp2Terrain(); 338 339 case RECORD:340 AddCameraPath(mCamNode);341 354 break; 342 355 default: 343 356 break; 344 }; 357 }; 345 358 346 359 if (mShowVisualization) … … 358 371 mVizCamera->setPosition(camPos.x, mVizCameraHeight, camPos.z); 359 372 360 // Point down -Z axis373 // point down -Z axis 361 374 mVizCamera->pitch(Radian(Degree(270.0))); 362 375 363 // Rotation arounnd X axis376 // rotation arounnd X axis 364 377 mVizCamera->yaw(Math::ATan2(-mCamera->getDerivedDirection().x, 365 378 -mCamera->getDerivedDirection().z)); 366 379 380 // move by a constant so view plane is on bottom of viewport 367 381 mVizCamera->moveRelative(Vector3(0, 800, 0)); 368 382 } … … 392 406 timeDelay -= evt.timeSinceLastFrame; 393 407 394 408 KEY_PRESSED(KC_SPACE, 0.3, nextAlgorithm()); 395 409 396 410 KEY_PRESSED(KC_O, 0.3, toggleUseOptimization()); … … 399 413 KEY_PRESSED(KC_1, 0.3, toggleShowViz()); 400 414 KEY_PRESSED(KC_2, 0.3, toggleRenderNodesForViz()); 415 401 416 KEY_PRESSED(KC_SUBTRACT, 0, changeThreshold(-10)); 402 417 KEY_PRESSED(KC_ADD, 0, changeThreshold(10)); 418 403 419 KEY_PRESSED(KC_3, 0, zoomVizCamera(50)); 404 420 KEY_PRESSED(KC_4, 0, zoomVizCamera(-50)); 405 KEY_PRESSED(KC_F1, 0, setState(RECORD)); 406 KEY_PRESSED(KC_F2, 0, setState(REPLAY)); 407 KEY_PRESSED(KC_F3, 0, setState(WALKTHROUGH)); 421 422 KEY_PRESSED(KC_F1, 0.3, nextAppState()); 423 KEY_PRESSED(KC_F2, 0.3, toggleRecord()); 424 KEY_PRESSED(KC_F3, 0.3, mTerrainContentGenerator->WriteObjects(objects_outfile)); 425 //KEY_PRESSED(KC_F3, 0.3, writeFrames()); 426 //KEY_PRESSED(KC_F4, 0.3, loadFrames()); 427 408 428 updateStats(); 409 429 410 return ExampleFrameListener::frameStarted(evt) && ExampleFrameListener::frameEnded(evt); 411 } 430 //return ExampleFrameListener::frameStarted(evt) && ExampleFrameListener::frameEnded(evt); 431 return ExampleFrameListener::frameEnded(evt); 432 } 433 //----------------------------------------------------------------------- 412 434 void MouseQueryListener::moveCamera() 413 435 { … … 417 439 } 418 440 //----------------------------------------------------------------------- 441 void MouseQueryListener::writeFrames() 442 { 443 std::ofstream ofstr(frame_outfile); 444 445 std::vector<frame_info>::const_iterator it, it_end; 446 447 it_end = mFrameInfo.end(); 448 for(it = mFrameInfo.begin(); it < it_end; ++it) 449 { 450 ofstr << StringConverter::toString((*it).position) << " " 451 << StringConverter::toString((*it).orientation) << " " 452 << StringConverter::toString((*it).timeElapsed) << "\n"; 453 } 454 ofstr.close(); 455 } 456 //----------------------------------------------------------------------- 457 void MouseQueryListener::loadFrames() 458 { 459 std::ifstream ifstr(frame_outfile); 460 char line[256]; 461 frame_info info; 462 463 // reset current values 464 mFrameInfo.clear(); 465 mCurrentFrame = 0; 466 467 while (!ifstr.eof()) 468 { 469 ifstr.getline(line, 256); 470 sscanf(line, "%f %f %f %f %f %f %f %f", &info.position.x, &info.position.y, &info.position.z, 471 &info.orientation.w, &info.orientation.x, &info.orientation.y, &info.orientation.z, 472 &info.timeElapsed); 473 474 mFrameInfo.push_back(info); 475 476 /* 477 std::stringstream d; 478 d << StringConverter::toString(info.position) << " " << StringConverter::toString(info.orientation); 479 LogManager::getSingleton().logMessage(d.str()); 480 */ 481 } 482 ifstr.close(); 483 } 484 //----------------------------------------------------------------------- 485 void MouseQueryListener::setAppState(int state) 486 { 487 mAppState = state; 488 } 489 //----------------------------------------------------------------------- 490 void MouseQueryListener::nextAppState() 491 { 492 mCurrentFrame = 0; 493 494 // if last state was replay state 495 if (mAppState == REPLAY) 496 { 497 // reset debug text and write frame info to file 498 mWindow->setDebugText(""); 499 writeFrames(); 500 501 //-- write out stats 502 std::stringstream d; 503 d << "Algorithm: " << mCurrentAlgorithmCaptions[mCurrentAlgorithm] << "\n" 504 << "avg. FPS: " << mWindow->getAverageFPS() << "\n" 505 << "best FPS: " << mWindow->getBestFPS() << "\n" 506 << "worst FPS: " << mWindow->getWorstFPS() << "\n" 507 << "best frame time: " << mWindow->getBestFrameTime() << "\n" 508 << "worst frame time: " << mWindow->getWorstFrameTime(); 509 510 LogManager::getSingleton().logMessage(d.str()); 511 } 512 513 //-- set the next státe 514 mAppState = (mAppState + 1) % STATE_NUM; 515 516 // replay recorded walkthrough 517 if (mAppState == REPLAY) 518 { 519 // no recording during replay 520 mRecord = false; 521 522 // load recorded walkthrough 523 if (mFrameInfo.size() == 0) 524 { 525 loadFrames(); 526 } 527 528 // if there are no recorded frames => set next state 529 if (mFrameInfo.size() == 0) 530 { 531 nextAppState(); 532 } 533 else 534 { 535 mWindow->setDebugText("Replay"); 536 537 // reset, because we measure fps stats during walkthrough 538 mWindow->resetStatistics(); 539 540 //-- initialise frame data 541 mTimeElapsed = 0; 542 543 mCamNode->setPosition(mFrameInfo[0].position); 544 mCamNode->setOrientation(mFrameInfo[0].orientation); 545 } 546 } 547 548 } 549 //----------------------------------------------------------------------- 550 void MouseQueryListener::toggleRecord() 551 { 552 mRecord = !mRecord; 553 554 // clear previous camera path 555 if (mRecord) 556 mFrameInfo.clear(); 557 else 558 mWindow->setDebugText(""); 559 } 560 //----------------------------------------------------------------------- 419 561 void MouseQueryListener::changeThreshold(int incr) 420 562 { … … 452 594 void MouseQueryListener::nextAlgorithm() 453 595 { 454 mCurrentAlgorithm = ++mCurrentAlgorithm%596 mCurrentAlgorithm = (mCurrentAlgorithm + 1) % 455 597 GtpVisibility::VisibilityEnvironment::NUM_CULLING_MANAGERS, 456 598 … … 586 728 } 587 729 //----------------------------------------------------------------------- 588 void MouseQueryListener:: AddCameraPath(SceneNode *camNode)730 void MouseQueryListener::addFrameInfo(SceneNode *camNode, Real timeElapsed) 589 731 { 590 732 frame_info info; 591 733 info.orientation = mCamNode->getOrientation(); 592 734 info.position = mCamNode->getPosition(); 593 mCameraPath.push_back(info); 594 } 595 //----------------------------------------------------------------------- 596 void MouseQueryListener::SetCurrentCameraPath(SceneNode *camNode) 597 { 598 mCamNode->setPosition(mCameraPath[mCurrentFrame].position); 599 mCamNode->setOrientation(mCameraPath[mCurrentFrame].orientation); 600 (mCurrentFrame++) % mCameraPath.size(); 735 info.timeElapsed = timeElapsed; 736 737 mFrameInfo.push_back(info); 738 } 739 //----------------------------------------------------------------------- 740 void MouseQueryListener::setCurrentFrameInfo(Real timeElapsed) 741 { 742 //-- find right frame relative to elapsed frame time 743 mTimeElapsed -= timeElapsed; 744 745 while ((mTimeElapsed <= 0) && (mCurrentFrame < (int)mFrameInfo.size() - 1)) 746 { 747 mTimeElapsed += mFrameInfo[mCurrentFrame ++].timeElapsed; 748 /*std::stringstream d; 749 d << StringConverter::toString(mTimeElapsed) << " " 750 << StringConverter::toString(timeElapsed) << " " 751 << StringConverter::toString(mFrameInfo[mCurrentFrame - 1].timeElapsed) 752 << " " << mCurrentFrame; 753 LogManager::getSingleton().logMessage(d.str());*/ 754 } 755 756 frame_info new_frame = mFrameInfo[mCurrentFrame]; 757 frame_info old_frame = mFrameInfo[mCurrentFrame - 1]; 758 759 //-- interpolate frames 760 Real factor = 1; 761 762 if (old_frame.timeElapsed > 0) 763 factor = mTimeElapsed / old_frame.timeElapsed; 764 765 Vector3 camPos = old_frame.position + factor * (new_frame.position - old_frame.position); 766 Quaternion camOrienation = Quaternion::Slerp(factor, old_frame.orientation, 767 new_frame.orientation, true); 768 769 mCamNode->setPosition(camPos); 770 mCamNode->setOrientation(camOrienation); 771 /* 772 std::stringstream d; 773 d << "old pos: " << StringConverter::toString(old_frame.position) << "\n" 774 << "interp pos: " << StringConverter::toString(camPos) << "\n" 775 << " new pos: " << StringConverter::toString(new_frame.position); 776 LogManager::getSingleton().logMessage(d.str());*/ 777 778 // stop replay after a full walkthrough 779 if (mCurrentFrame == (int)mFrameInfo.size() - 1) 780 { 781 nextAppState(); 782 } 601 783 } 602 784 … … 604 786 /* VisualizationRenderTargetListener implementation */ 605 787 /**************************************************************/ 606 788 //----------------------------------------------------------------------- 607 789 VisualizationRenderTargetListener::VisualizationRenderTargetListener(SceneManager *sceneMgr) 608 790 :RenderTargetListener(), mSceneMgr(sceneMgr) -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h
r106 r107 5 5 #include "CEGUIForwardRefs.h" 6 6 #include "ExampleApplication.h" 7 #include " TerrainContentGenerator.h"7 #include "OgreTerrainContentGenerator.h" 8 8 #include "VisibilityEnvironment.h" 9 9 #include <OgreRenderTargetListener.h> … … 32 32 Vector3 position; 33 33 Quaternion orientation; 34 Real timeElapsed; 34 35 } frame_info; 35 36 … … 84 85 void keyClicked(KeyEvent* e); 85 86 87 enum {WALKTHROUGH, REPLAY, STATE_NUM}; 88 86 89 void nextAlgorithm(); 87 void setAlgorithm(int algorithm);88 90 void changeThreshold(int incr); 89 91 void updateStats(); 92 90 93 void toggleUseOptimization(); 91 94 void toggleShowOctree(); … … 93 96 void toggleShowViz(); 94 97 void toggleRenderNodesForViz(); 98 void toggleRecord(); 99 95 100 void zoomVizCamera(int zoom); 101 102 void addFrameInfo(SceneNode *camNode, Real timeElapsed); 103 void setCurrentFrameInfo(Real timeElapsed); 104 105 void setAppState(int state); 106 void nextAppState(); 107 108 void setAlgorithm(int algorithm); 109 96 110 void moveCamera(); 97 void AddCameraPath(SceneNode *camNode); 98 void SetCurrentCameraPath(SceneNode *camNode); 99 100 enum {WALKTHROUGH, REPLAY} State; 101 111 112 void writeFrames(); 113 void loadFrames(); 102 114 103 115 protected: … … 124 136 OverlayElement *mQueriesIssuedInfo; 125 137 126 SceneNode *mCurrentObject; // The newly created object127 int mObjectCount; // The number of robots on the screen138 SceneNode *mCurrentObject; // the newly created object 139 int mObjectCount; // The number of objects on the screen 128 140 129 141 RayQueryExecutor *mRayQueryExecutor; … … 143 155 144 156 //std::deque<Vector3> mWalkList; // The list of points we are walking to 145 std::vector<frame_info> m CameraPath;157 std::vector<frame_info> mFrameInfo; 146 158 147 159 int mCurrentFrame; 148 160 // the current application state 149 int mState; 161 int mAppState; 162 bool mRecord; 163 Real mTimeElapsed; 150 164 }; 151 165
Note: See TracChangeset
for help on using the changeset viewer.