Changeset 82 for trunk/VUT/work
- Timestamp:
- 05/03/05 17:30:53 (20 years ago)
- Location:
- trunk/VUT/work
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCulling/SceneContentGenerator.cpp
r79 r82 73 73 currentObject->roll(Degree(rotation.z)); 74 74 75 return currentObject;76 77 75 /* 78 76 char msg[100]; 79 sprintf(msg, "pos: %3.3f %3.3f %3.3f, newpos: %3.3f %3.3f %3.3f\n", 80 position.x, position.y, position.z, queryResult.x, queryResult.y, queryResult.z); 81 77 sprintf(msg, "pos: %3.3f %3.3f %3.3f\n", position.x, position.y, position.z); 82 78 OutputDebugString(msg); 83 79 */ 80 81 return currentObject; 84 82 } 85 83 //----------------------------------------------------------------------- -
trunk/VUT/work/TestCulling/SceneContentGenerator.h
r79 r82 14 14 public: 15 15 SceneContentGenerator(SceneManager *sm); 16 16 virtual ~SceneContentGenerator() {}; 17 17 /** Generates scene object in a random fashion. 18 18 @param number of objects to generate … … 21 21 void GenerateScene(int numObjects, const String &objName); 22 22 /** Generates a new object in the scene using ray scene queries 23 and inserts it into scene hierarchy.23 and inserts it into thr scene hierarchy. 24 24 @param position position where the object is created 25 25 @param rotation rotation angle applied locally to object … … 27 27 @returns scene object if it was successfully created, NULL otherwise 28 28 */ 29 SceneNode *GenerateSceneObject(const Vector3 &position,29 virtual SceneNode *GenerateSceneObject(const Vector3 &position, 30 30 const Vector3 &rotation, const String &objName); 31 31 -
trunk/VUT/work/TestCulling/TestCulling.vcproj
r79 r82 122 122 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> 123 123 <File 124 RelativePath=". .\TestCullingTerrain\SceneContentGenerator.cpp">124 RelativePath=".\SceneContentGenerator.cpp"> 125 125 </File> 126 126 <File … … 133 133 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 134 134 <File 135 RelativePath=". .\TestCullingTerrain\SceneContentGenerator.h">135 RelativePath=".\SceneContentGenerator.h"> 136 136 </File> 137 137 <File -
trunk/VUT/work/TestCulling/TestCullingApplication.cpp
r79 r82 48 48 //l->setPosition(20,80,50); 49 49 50 SceneContentGenerator contentGenerator( );51 contentGenerator.GenerateScene(330 );50 SceneContentGenerator contentGenerator(mSceneMgr); 51 contentGenerator.GenerateScene(330, "robot.mesh"); 52 52 53 53 // Create a skybox -
trunk/VUT/work/TestCullingTerrain/TerrainContentGenerator.cpp
r81 r82 19 19 } 20 20 //----------------------------------------------------------------------- 21 bool RayQueryExecutor::executeRayQuery(Vector3 *result, const Vector3 &pos, const Vector3 &dir) 21 bool RayQueryExecutor::executeRayQuery(Vector3 *result, const Vector3 &pos, 22 const Vector3 &dir) 22 23 { 23 24 return executeRayQuery(result, Ray(pos, dir)); … … 52 53 { 53 54 mMinPos = Vector3(0.0f, 5000.0f, 0.0f); 54 mMaxPos = Vector3(1000.0f, 5000.0f, 1000.0f);55 mMaxPos = Vector3(1000.0f, 5000.0f, 1000.0f); 55 56 56 57 mMinAngle = Vector3(0.0f, 0.0f, 0.0f); … … 72 73 if (mRayQueryExecutor->executeRayQuery(&queryResult, position, Vector3::NEGATIVE_UNIT_Y)) 73 74 { 74 // reject if height too big75 // reject if height is too high 75 76 if(queryResult.y < mMaxHeight) 76 77 { -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrain.vcproj
r80 r82 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"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" 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" … … 122 122 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> 123 123 <File 124 RelativePath=". \SceneContentGenerator.cpp">124 RelativePath="..\TestCulling\SceneContentGenerator.cpp"> 125 125 </File> 126 126 <File … … 136 136 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 137 137 <File 138 RelativePath=". \SceneContentGenerator.h">138 RelativePath="..\TestCulling\SceneContentGenerator.h"> 139 139 </File> 140 140 <File -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp
r80 r82 25 25 TestCullingTerrainApplication::~TestCullingTerrainApplication() 26 26 { 27 delete m SceneContentGenerator;27 delete mTerrainContentGenerator; 28 28 } 29 29 //----------------------------------------------------------------------- … … 95 95 mSceneMgr->_renderScene(mCamera, mWindow->getViewport(0), true); 96 96 97 m SceneContentGenerator = new TerrainContentGenerator(mSceneMgr);98 m SceneContentGenerator->GenerateScene(300, "robot.mesh");97 mTerrainContentGenerator = new TerrainContentGenerator(mSceneMgr); 98 mTerrainContentGenerator->GenerateScene(300, "robot.mesh"); 99 99 // no limitations now: the user can set objects also on peaks 100 m SceneContentGenerator->SetMaxHeight(5000);100 mTerrainContentGenerator->SetMaxHeight(5000); 101 101 } 102 102 //----------------------------------------------------------------------- … … 119 119 { 120 120 mFrameListener= new MouseQueryListener(mWindow, mCamera, mSceneMgr, 121 mGUIRenderer, m SceneContentGenerator);121 mGUIRenderer, mTerrainContentGenerator); 122 122 mFrameListener->showDebugOverlay(true); 123 123 mRoot->addFrameListener(mFrameListener); … … 144 144 mRMouseDown = false; 145 145 mSceneMgr = sceneManager; 146 m SceneContentGenerator = sceneGenerator;146 mTerrainContentGenerator = sceneGenerator; 147 147 148 148 // Reduce move speed … … 207 207 208 208 // Get results, create a node/entity on the position 209 mCurrentObject = m SceneContentGenerator->GenerateSceneObject(209 mCurrentObject = mTerrainContentGenerator->GenerateSceneObject( 210 210 mouseRay.getOrigin(), mouseRay.getDirection(), "robot.mesh"); 211 211 -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h
r80 r82 86 86 87 87 RayQueryExecutor *mRayQueryExecutor; 88 TerrainContentGenerator *m SceneContentGenerator;88 TerrainContentGenerator *mTerrainContentGenerator; 89 89 }; 90 90 … … 111 111 Vector3 mMaxAngle; 112 112 113 TerrainContentGenerator *m SceneContentGenerator;113 TerrainContentGenerator *mTerrainContentGenerator; 114 114 115 115 private:
Note: See TracChangeset
for help on using the changeset viewer.