Changeset 932


Ignore:
Timestamp:
05/08/06 18:58:16 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp

    r924 r932  
    191191 
    192192        //-- overlays 
    193         mMyStatsOverlay = OverlayManager::getSingleton().getByName("Example/Visibility/MyStatsOverlay"); 
    194         mMyStatsAlgorithmInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/MyAlgorithmInfo"); 
    195         mMyStatsAlgorithmInfo->setCaption("hehaah2"); 
    196  
    197         char str[100]; sprintf(str,": %d", 0); 
    198         mMyStatsFpsInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/MyFpsInfo"); 
    199         mMyStatsFpsInfo->setCaption(str); 
    200          
    201         //mMyStatsAlgorithmInfo->setTop(top); 
    202          
     193    
    203194        initVisStatsOverlay(); // visibility stats overlay 
    204195        initHelpOverlay();     // help overlay 
     
    207198        // show stats overlays 
    208199        if (!DEMO_HACK) 
     200        { 
    209201                showStats(true); 
     202        } 
    210203        else 
     204        { 
     205                mMyStatsOverlay = OverlayManager::getSingleton().getByName("Example/Visibility/MyStatsOverlay"); 
     206                mMyStatsAlgorithmInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/MyAlgorithmInfo"); 
     207                mMyStatsAlgorithmInfo->setCaption(""); 
     208         
     209                const int top = 10; 
     210                mMyStatsAlgorithmInfo->setTop(top); 
     211 
     212                char str[100]; sprintf(str,": %d", 0); 
     213                mMyStatsFpsInfo = OverlayManager::getSingleton().getOverlayElement("Example/Visibility/MyFpsInfo"); 
     214                mMyStatsFpsInfo->setCaption(str); 
     215 
    211216                mMyStatsOverlay->show(); 
    212  
     217        } 
    213218 
    214219        // note: larger magnification for terrain to show single objects 
     
    522527 
    523528        // no visibility manager available => no visibility scene manager, return 
    524         GtpVisibility::VisibilityManager *visManager; 
     529        GtpVisibility::VisibilityManager *visManager = NULL; 
    525530         
    526531        if (!mSceneMgr->getOption("VisibilityManager", visManager)) 
    527532                return; 
    528533 
    529         GtpVisibility::HierarchyInterface *hierarchyInterface; 
     534        GtpVisibility::HierarchyInterface *hierarchyInterface = NULL; 
    530535        if (!mSceneMgr->getOption("HierarchyInterface", hierarchyInterface)) 
    531536                return; 
  • GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp

    r926 r932  
    153153 
    154154 
    155 /*********************************************************/ 
    156 /*      TestCullingTerrainApplication implementation     */ 
    157 /*********************************************************/ 
     155/**************************************************************/ 
     156/*        TestCullingTerrainApplication implementation        */ 
     157/**************************************************************/ 
    158158 
    159159 
     
    193193                 mViewCellsFilename = val.c_str(); 
    194194        }*/ 
     195 
     196        Vector3 v = Vector3::UNIT_SCALE; 
     197 
     198        val = config.getSetting("ViewX"); 
     199 
     200        if (!val.empty()) 
     201                v.x = atof( val.c_str() ); 
     202 
     203        val = config.getSetting("ViewY"); 
     204         
     205        if (!val.empty()) 
     206                v.y = atof(val.c_str()); 
     207 
     208        val = config.getSetting("ViewZ"); 
     209         
     210        if (!val.empty()) 
     211                v.z = atof( val.c_str()); 
     212 
     213        // set camera position accordingly 
     214        mCamNode->setPosition(v); 
    195215} 
    196216//----------------------------------------------------------------------- 
     
    274294        if (1) 
    275295        { 
    276                 std::string logFilename = "IVLog" + index; 
    277                 logFilename += ".log"; 
    278  
     296                std::string logFilename = "IVLog" + Ogre::StringConverter().toString(index) + ".log"; 
     297                 
    279298                Log *log = LogManager::getSingleton().createLog(logFilename); 
    280299                mIVReader->setLog(log); 
     
    661680                { 
    662681                        // hack: set postion manually for vienna 
    663                         mCamNode->setPosition(Vector3(830, 300, -540)); 
    664                         mCamNode->setOrientation(Quaternion(-0.3486, 0.0122, 0.9365, 0.0329)); 
     682                        //mCamNode->setPosition(Vector3(830, 300, -540)); 
     683                        //mCamNode->setOrientation(Quaternion(-0.3486, 0.0122, 0.9365, 0.0329)); 
    665684 
    666685                        // load iv files 
  • GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.h

    r924 r932  
    135135        */ 
    136136        void loadConfig(const String& filename); 
    137         // if hilly terrain should be loaded 
     137         
     138        /// if hilly terrain should be loaded 
    138139        static bool msShowHillyTerrain; 
    139140 
Note: See TracChangeset for help on using the changeset viewer.