Changeset 82 for trunk/VUT/work


Ignore:
Timestamp:
05/03/05 17:30:53 (20 years ago)
Author:
mattausch
Message:

worked on the demos

Location:
trunk/VUT/work
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/work/TestCulling/SceneContentGenerator.cpp

    r79 r82  
    7373        currentObject->roll(Degree(rotation.z)); 
    7474 
    75         return currentObject; 
    76          
    7775        /* 
    7876        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); 
    8278        OutputDebugString(msg); 
    8379        */ 
     80 
     81        return currentObject; 
    8482} 
    8583//----------------------------------------------------------------------- 
  • trunk/VUT/work/TestCulling/SceneContentGenerator.h

    r79 r82  
    1414public: 
    1515        SceneContentGenerator(SceneManager *sm); 
    16          
     16        virtual ~SceneContentGenerator() {}; 
    1717        /** Generates scene object in a random fashion. 
    1818                @param number of objects to generate 
     
    2121        void GenerateScene(int numObjects, const String &objName); 
    2222        /** 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. 
    2424                @param position position where the object is created 
    2525                @param rotation rotation angle applied locally to object 
     
    2727                @returns scene object if it was successfully created, NULL otherwise 
    2828        */ 
    29         SceneNode *GenerateSceneObject(const Vector3 &position,  
     29        virtual SceneNode *GenerateSceneObject(const Vector3 &position,  
    3030                const Vector3 &rotation, const String &objName); 
    3131 
  • trunk/VUT/work/TestCulling/TestCulling.vcproj

    r79 r82  
    122122                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> 
    123123                        <File 
    124                                 RelativePath="..\TestCullingTerrain\SceneContentGenerator.cpp"> 
     124                                RelativePath=".\SceneContentGenerator.cpp"> 
    125125                        </File> 
    126126                        <File 
     
    133133                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 
    134134                        <File 
    135                                 RelativePath="..\TestCullingTerrain\SceneContentGenerator.h"> 
     135                                RelativePath=".\SceneContentGenerator.h"> 
    136136                        </File> 
    137137                        <File 
  • trunk/VUT/work/TestCulling/TestCullingApplication.cpp

    r79 r82  
    4848        //l->setPosition(20,80,50); 
    4949 
    50         SceneContentGenerator contentGenerator(); 
    51         contentGenerator.GenerateScene(330); 
     50        SceneContentGenerator contentGenerator(mSceneMgr); 
     51        contentGenerator.GenerateScene(330, "robot.mesh"); 
    5252 
    5353        // Create a skybox 
  • trunk/VUT/work/TestCullingTerrain/TerrainContentGenerator.cpp

    r81 r82  
    1919} 
    2020//----------------------------------------------------------------------- 
    21 bool RayQueryExecutor::executeRayQuery(Vector3 *result, const Vector3 &pos, const Vector3 &dir) 
     21bool RayQueryExecutor::executeRayQuery(Vector3 *result, const Vector3 &pos,  
     22                                                                           const Vector3 &dir) 
    2223{ 
    2324        return executeRayQuery(result, Ray(pos, dir)); 
     
    5253{ 
    5354        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); 
    5556 
    5657        mMinAngle = Vector3(0.0f, 0.0f, 0.0f); 
     
    7273        if (mRayQueryExecutor->executeRayQuery(&queryResult, position, Vector3::NEGATIVE_UNIT_Y)) 
    7374        { 
    74                 // reject if height too big 
     75                // reject if height is too high 
    7576                if(queryResult.y < mMaxHeight) 
    7677                { 
  • trunk/VUT/work/TestCullingTerrain/TestCullingTerrain.vcproj

    r80 r82  
    2121                                Name="VCCLCompilerTool" 
    2222                                Optimization="0" 
    23                                 AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Dependencies\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;../../GtpVisibility/include;../include" 
     23                                AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Dependencies\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\Dependencies\include\CEGUI&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include&quot;;&quot;$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include&quot;;..\..\GtpVisibility\include;..\include;..\TestCulling" 
    2424                                PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_DEBUG;WIN32;_STLP_DEBUG;PLUGIN_TERRAIN_IMPORTS;GTP_VISIBILITY_MODIFIED_OGRE" 
    2525                                MinimalRebuild="TRUE" 
     
    122122                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> 
    123123                        <File 
    124                                 RelativePath=".\SceneContentGenerator.cpp"> 
     124                                RelativePath="..\TestCulling\SceneContentGenerator.cpp"> 
    125125                        </File> 
    126126                        <File 
     
    136136                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 
    137137                        <File 
    138                                 RelativePath=".\SceneContentGenerator.h"> 
     138                                RelativePath="..\TestCulling\SceneContentGenerator.h"> 
    139139                        </File> 
    140140                        <File 
  • trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp

    r80 r82  
    2525TestCullingTerrainApplication::~TestCullingTerrainApplication() 
    2626{ 
    27         delete mSceneContentGenerator; 
     27        delete mTerrainContentGenerator; 
    2828} 
    2929//----------------------------------------------------------------------- 
     
    9595        mSceneMgr->_renderScene(mCamera, mWindow->getViewport(0), true); 
    9696 
    97         mSceneContentGenerator = new TerrainContentGenerator(mSceneMgr); 
    98         mSceneContentGenerator->GenerateScene(300, "robot.mesh"); 
     97        mTerrainContentGenerator = new TerrainContentGenerator(mSceneMgr); 
     98        mTerrainContentGenerator->GenerateScene(300, "robot.mesh"); 
    9999        // no limitations now: the user can set objects also on peaks 
    100         mSceneContentGenerator->SetMaxHeight(5000);  
     100        mTerrainContentGenerator->SetMaxHeight(5000);  
    101101} 
    102102//----------------------------------------------------------------------- 
     
    119119{ 
    120120        mFrameListener= new MouseQueryListener(mWindow, mCamera, mSceneMgr,  
    121                 mGUIRenderer, mSceneContentGenerator); 
     121                mGUIRenderer, mTerrainContentGenerator); 
    122122        mFrameListener->showDebugOverlay(true); 
    123123        mRoot->addFrameListener(mFrameListener); 
     
    144144        mRMouseDown = false; 
    145145        mSceneMgr = sceneManager; 
    146         mSceneContentGenerator = sceneGenerator; 
     146        mTerrainContentGenerator = sceneGenerator; 
    147147 
    148148    // Reduce move speed 
     
    207207                  
    208208                 // Get results, create a node/entity on the position 
    209                  mCurrentObject = mSceneContentGenerator->GenerateSceneObject( 
     209                 mCurrentObject = mTerrainContentGenerator->GenerateSceneObject( 
    210210                         mouseRay.getOrigin(), mouseRay.getDirection(), "robot.mesh"); 
    211211                 
  • trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h

    r80 r82  
    8686 
    8787        RayQueryExecutor *mRayQueryExecutor; 
    88         TerrainContentGenerator *mSceneContentGenerator; 
     88        TerrainContentGenerator *mTerrainContentGenerator; 
    8989}; 
    9090 
     
    111111        Vector3 mMaxAngle; 
    112112 
    113         TerrainContentGenerator *mSceneContentGenerator; 
     113        TerrainContentGenerator *mTerrainContentGenerator; 
    114114 
    115115private: 
Note: See TracChangeset for help on using the changeset viewer.