Ignore:
Timestamp:
08/29/06 18:28:00 (18 years ago)
Author:
szydlowski
Message:

Implemented PVS support in kdtree scene manager - not complete, defunct
modified BoundingBoxConverter? to work with KdTreeSceneManager?

Location:
GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTree.h

    r1285 r1296  
    4848        // save entities to ascii file 
    4949        bool saveSceneASCII(const String& filename, SceneNode *entityroot); 
     50        void createTerrainScene(Real max_x, Real max_y, Real max_z); 
     51        Vector3 clampToGround(const Vector3& vect, Real offset, Real cap); 
    5052protected: 
    5153        KdTreeAppListener *mFrameListener; 
     
    5759 
    5860        // scene options 
    59         //String  mSceneFiles; 
     61        String  mSceneFiles; 
     62        String  mViewCells; 
    6063        Real    mRotationRadius; 
    6164        int             mModelSpacing; 
     
    9699        void createMaterials(void); 
    97100        void createSimpleScene(void); 
    98         void createTerrainScene(Real max_x, Real max_y, Real max_z); 
    99         Vector3 clampToGround(const Vector3& vect, Real offset, Real cap); 
    100101 
    101102        RaySceneQuery* mRaySceneQuery; 
  • GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTreeAppListener.h

    r1285 r1296  
    8181        }; 
    8282 
     83        enum SceneType 
     84        { 
     85                ST_SIMPLE, 
     86                ST_TERRAIN, 
     87                ST_GEOMETRY 
     88        }; 
     89 
    8390        enum SceneMgr 
    8491        { 
     
    120127                mRenderMethod(KdTree::KDRM_GTP_CHC), 
    121128                mBuildMethod(KdTree::KDBM_PRIORITYQUEUE), 
     129                mSceneType(ST_SIMPLE), 
     130                mFastStart(false), 
     131                mBurnIn(false), 
    122132                mDemoMode(false), 
    123133                mEnhancedVisibility(false), 
     
    128138                } 
    129139 
    130                 String mSceneFiles; 
    131140                String mSceneOutfileName; 
    132141                String mDemoInfileName; 
     
    143152                int mRenderMethod; 
    144153                int mBuildMethod; 
     154                int mSceneType; 
     155                bool mFastStart; 
     156                bool mBurnIn; 
    145157                bool mDemoMode; 
    146158                bool mEnhancedVisibility; 
     
    171183 
    172184        void showDebugOverlay(bool show); 
     185 
     186        void toggleUseViewCells(void); 
     187 
     188        void toggleUseVisibilityFilter(void); 
    173189 
    174190        void toggleVizCamera(void); 
     
    231247        int mShowTree; 
    232248 
     249        // view cells 
     250        bool mUseViewCells; 
     251        bool mUseVisibilityFilter; 
     252 
    233253        // counters 
    234254        int mSeqNum; 
     
    252272        TextAreaOverlayElement *mDemoTime; 
    253273        TextAreaOverlayElement *mDemoFPSDisp; 
    254  
    255274 
    256275        OverlayElement *mRenderMethodInfo; 
     
    263282        OverlayElement *mMovementInfo; 
    264283        OverlayElement *mTopCamInfo; 
     284        OverlayElement *mViewCellsInfo; 
     285        OverlayElement *mViewFilterInfo; 
    265286 
    266287        OverlayElement *mFrustumCulledNodesInfo; 
  • GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTree.cpp

    r1285 r1296  
    3939                                .addOpt("","comment", ARGUMENT_REQUIRED) 
    4040                                .addOpt("e","enhancevis", ARGUMENT_NONE) 
    41                                 .addOpt("","savesceneto", ARGUMENT_REQUIRED); 
     41                                .addOpt("","savesceneto", ARGUMENT_REQUIRED) 
     42                                .addOpt("f","faststart", ARGUMENT_NONE) 
     43                                .addOpt("b","burnin", ARGUMENT_NONE); 
    4244 
    4345 
     
    4648                        cmdparser.getOpt("l", options.mDemoLogfileName); 
    4749                        cmdparser.getOpt("comment", options.mComment); 
     50                        options.mFastStart = cmdparser.getOpt("f"); 
     51                        options.mBurnIn = cmdparser.getOpt("b"); 
    4852                        options.mDemoMode = cmdparser.getOpt("d"); 
    4953                        options.mEnhancedVisibility = cmdparser.getOpt("e"); 
     
    184188        cfDeath.load("testKdTree.cfg"); 
    185189 
    186         mOptions.mSceneFiles = cfDeath.getSetting("scene"); 
     190        mSceneFiles = cfDeath.getSetting("scene"); 
     191        mViewCells = cfDeath.getSetting("viewcells"); 
    187192 
    188193        tmp = cfDeath.getSetting("shadows"); 
     
    240245 
    241246        // load simple scene (planes & robots) 
    242         if (mOptions.mSceneFiles == "") 
     247        if (mSceneFiles == "") 
    243248        { 
    244249                createSimpleScene(); 
     250                mOptions.mSceneType = KdTreeAppListener::ST_SIMPLE; 
    245251                mCamNode->setPosition(Vector3(1280,600,1666)); 
    246252                mCamNode->setOrientation(Quaternion(0.936893, -0.124586, 0.323813, 0.04306)); 
    247253        } 
    248         // load terrain, but only if terrainscenemanager selected 
    249         else if (mOptions.mSceneFiles == TERRAIN_SCENE) 
    250         { 
    251                 Plane waterPlane; 
    252  
    253                 // Set ambient light 
    254                 mSceneMgr->setAmbientLight(ColourValue(0.5, 0.5, 0.5)); 
    255  
    256                 // Create a light 
    257                 Light* l = mSceneMgr->createLight("MainLight"); 
    258                 // Accept default settings: point light, white diffuse, just set position 
    259                 // NB I could attach the light to a SceneNode if I wanted it to move automatically with 
    260                 //  other objects, but I don't 
    261                 l->setPosition(20,80,50); 
    262  
    263                 // Fog 
    264                 // NB it's VERY important to set this before calling setWorldGeometry  
    265                 // because the vertex program picked will be different 
    266                 //ColourValue fadeColour(0.93, 0.86, 0.76); 
    267                 //mSceneMgr->setFog( FOG_LINEAR, fadeColour, .001, 500, 1000); 
    268                 //mWindow->getViewport(0)->setBackgroundColour(fadeColour); 
    269                 mWindow->getViewport(0)->setBackgroundColour(ColourValue::Blue); 
    270  
    271                 std::string terrain_cfg("terrain.cfg"); 
    272  
    273                 mSceneMgr -> setWorldGeometry( terrain_cfg ); 
    274  
    275                 // Define the required skyplane 
    276                 Plane plane; 
    277                 // 5000 world units from the camera 
    278                 plane.d = 5000; 
    279                 // Above the camera, facing down 
    280                 plane.normal = -Vector3::UNIT_Y; 
    281  
    282                 // read interesting params from config file 
    283                 ConfigFile terrainconf; 
    284                 std::stringstream s; 
    285                 Real x,y,z; 
    286                  
    287                 terrainconf.load(terrain_cfg); 
    288  
    289                 s << terrainconf.getSetting("PageWorldX"); 
    290                 s >> x; 
    291                 s.clear(); 
    292  
    293                 s << terrainconf.getSetting("MaxHeight"); 
    294                 s >> y; 
    295                 s.clear(); 
    296  
    297                 s << terrainconf.getSetting("PageWorldZ"); 
    298                 s >> z; 
    299                 s.clear(); 
    300  
    301                 // add stuff minus gound plane 
    302                 createTerrainScene(x, y + 1500, z); 
    303  
    304                 // Set a nice viewpoint 
    305                 mCamNode->setPosition(707,2500,528); 
    306                 mCamNode->setOrientation(Quaternion(-0.3486, 0.0122, 0.9365, 0.0329)); 
    307                 //mCamNode->setPosition(1056.59, 467.412, 783.502); 
    308                 //mCamNode->setOrientation(Quaternion(-0.281354, 0.0204027, 0.956747, 0.0695345)); 
    309         } 
     254        //// load terrain, but only if terrainscenemanager selected 
     255        //else if (mSceneFiles == TERRAIN_SCENE) 
     256        //{ 
     257        //      Plane waterPlane; 
     258 
     259        //      // Set ambient light 
     260        //      mSceneMgr->setAmbientLight(ColourValue(0.5, 0.5, 0.5)); 
     261 
     262        //      // Create a light 
     263        //      Light* l = mSceneMgr->createLight("MainLight"); 
     264        //      // Accept default settings: point light, white diffuse, just set position 
     265        //      // NB I could attach the light to a SceneNode if I wanted it to move automatically with 
     266        //      //  other objects, but I don't 
     267        //      l->setPosition(20,80,50); 
     268 
     269        //      // Fog 
     270        //      // NB it's VERY important to set this before calling setWorldGeometry  
     271        //      // because the vertex program picked will be different 
     272        //      //ColourValue fadeColour(0.93, 0.86, 0.76); 
     273        //      //mSceneMgr->setFog( FOG_LINEAR, fadeColour, .001, 500, 1000); 
     274        //      //mWindow->getViewport(0)->setBackgroundColour(fadeColour); 
     275        //      mWindow->getViewport(0)->setBackgroundColour(ColourValue::Blue); 
     276 
     277        //      std::string terrain_cfg("terrain.cfg"); 
     278 
     279        //      mSceneMgr -> setWorldGeometry( terrain_cfg ); 
     280 
     281        //      // Define the required skyplane 
     282        //      Plane plane; 
     283        //      // 5000 world units from the camera 
     284        //      plane.d = 5000; 
     285        //      // Above the camera, facing down 
     286        //      plane.normal = -Vector3::UNIT_Y; 
     287 
     288        //      // read interesting params from config file 
     289        //      ConfigFile terrainconf; 
     290        //      std::stringstream s; 
     291        //      Real x,y,z; 
     292        //       
     293        //      terrainconf.load(terrain_cfg); 
     294 
     295        //      s << terrainconf.getSetting("PageWorldX"); 
     296        //      s >> x; 
     297        //      s.clear(); 
     298 
     299        //      s << terrainconf.getSetting("MaxHeight"); 
     300        //      s >> y; 
     301        //      s.clear(); 
     302 
     303        //      s << terrainconf.getSetting("PageWorldZ"); 
     304        //      s >> z; 
     305        //      s.clear(); 
     306 
     307        //      // add stuff minus gound plane 
     308        //      createTerrainScene(x, y + 1500, z); 
     309 
     310        //      // Set a nice viewpoint 
     311        //      mCamNode->setPosition(707,2500,528); 
     312        //      mCamNode->setOrientation(Quaternion(-0.3486, 0.0122, 0.9365, 0.0329)); 
     313        //      //mCamNode->setPosition(1056.59, 467.412, 783.502); 
     314        //      //mCamNode->setOrientation(Quaternion(-0.281354, 0.0204027, 0.956747, 0.0695345)); 
     315        //} 
    310316        // load scene from file 
    311317        else 
    312318        { 
    313319                // don't load the other stuff 
    314                 loadScene(mOptions.mSceneFiles); 
    315  
    316                 // top view 
    317                 mTopCam->setPosition(Vector3(1232, 3990, -1477)); 
    318                 // walkthrough view 
    319                 mCamNode->setPosition(Vector3(827.885, 184.435, -524.984)); 
    320                 mCamNode->setOrientation(Quaternion(0.98935, 0.0348082, -0.141246, 0.00496945)); 
    321  
    322                 mSceneMgr->setSkyBox(true, "Examples/CloudyNoonSkyBox", 5000, true); 
     320                loadScene(mSceneFiles); 
     321 
     322                if (mOptions.mSceneType == KdTreeAppListener::ST_GEOMETRY) 
     323                { 
     324                        // initial position 
     325                        mCamNode->setPosition(Vector3(827.885, 184.435, -524.984)); 
     326                        mCamNode->setOrientation(Quaternion(0.98935, 0.0348082, -0.141246, 0.00496945)); 
     327                        // initial position for vis camera 
     328                        mTopCam->setPosition(Vector3(1232, 3990, -1477)); 
     329 
     330                        // try loading view cells if specified and if scene manager supports it 
     331                        if (!mViewCells.empty()) 
     332                                mSceneMgr->setOption("LoadViewCells", mViewCells.c_str()); 
     333 
     334                        // sky box 
     335                        mSceneMgr->setSkyBox(true, "Examples/CloudyNoonSkyBox", 5000, true); 
     336                } 
     337                else if (mOptions.mSceneType == KdTreeAppListener::ST_TERRAIN) 
     338                { 
     339                        // initial position 
     340                        mCamNode->setPosition(707,2500,528); 
     341                        mCamNode->setOrientation(Quaternion(-0.3486, 0.0122, 0.9365, 0.0329)); 
     342 
     343                        // sky box 
     344                        mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox", mPlaneDim * 2); 
     345                } 
    323346        } 
    324347} 
     
    329352        Vector3 scale(0.3, 0.3, 0.3); 
    330353        Entity *deaths; 
    331         SceneNode *nodes; 
     354        SceneNode *nodes, *anchor; 
    332355        std::string entName; 
    333356        std::string nodeName; 
     
    336359        max_x -= 100; max_z -= 100; 
    337360 
    338         SceneNode *anchor = mSceneMgr->getRootSceneNode()->createChildSceneNode("AnchorNode"); 
     361        try 
     362        { 
     363                anchor = mSceneMgr->getSceneNode("AnchorNode"); 
     364        } 
     365        catch (Exception) 
     366        { 
     367                anchor = mSceneMgr->getRootSceneNode()->createChildSceneNode("AnchorNode");              
     368        } 
    339369 
    340370        if (mSelectEntities & ENT_RND) 
     
    348378                                max_y,  
    349379                                Math::RangeRandom(min_z, max_z)), 0, max_y); 
     380                         
     381                        // hack to fill valleys 
     382                        if (pos == Vector3::ZERO) 
     383                        { 
     384                                -- i; 
     385                                continue; 
     386                        } 
     387 
    350388                        deaths = mSceneMgr->createEntity(cat(entName,666,i),"robot.mesh"); 
    351389                        if (mShadowsEnabled) 
     
    369407                                Math::RangeRandom(min_z, max_z)), 
    370408                                Math::RangeRandom(20, 500), max_y); 
     409 
     410                        // hack to fill valleys 
     411                        if (pos == Vector3::ZERO) 
     412                        { 
     413                                -- i; 
     414                                continue; 
     415                        } 
     416 
    371417                        deaths = mSceneMgr->createEntity(cat(entName,666,i),"razor.mesh"); 
    372418                        if (mShadowsEnabled) 
     
    398444                node_ball->setScale(scale/10); 
    399445        } 
    400  
    401         mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox", mPlaneDim * 2); 
    402446} 
    403447 
     
    644688    // You can skip this and use root.restoreConfig() to load configuration 
    645689    // settings if you were sure there are valid ones saved in ogre.cfg 
    646 #ifdef KDTREE_FASTSTART 
    647     if(mRoot->restoreConfig()) 
    648 #else 
    649         if(mRoot->showConfigDialog()) 
    650 #endif 
     690        bool cont = false; 
     691 
     692        if (mOptions.mFastStart) 
     693                cont = mRoot->restoreConfig(); 
     694        else 
     695                cont = mRoot->showConfigDialog(); 
     696 
     697        if (cont) 
    651698    { 
    652699        // If returned true, user clicked OK so initialise 
     
    700747        result = vect; 
    701748 
    702         if (mOptions.mSceneFiles == TERRAIN_SCENE) 
     749        if (mOptions.mSceneType == KdTreeAppListener::ST_TERRAIN) 
    703750        { 
    704751                updateRay.setOrigin(vect); 
     
    732779        } 
    733780 
     781        // hack to fill the valleys only - make cap lower than max height 
     782        if (result.y >= cap) 
     783                return Vector3::ZERO; 
     784 
    734785        result.y = result.y + offset > cap ? cap : result.y + offset; 
    735786 
     
    780831                { 
    781832                        // load iv files 
    782                         loadres = loadSceneIV(fn, mSceneMgr->getRootSceneNode(), i);                     
     833                        loadres = loadSceneIV(fn, mSceneMgr->getRootSceneNode(), i); 
     834                        mOptions.mSceneType = KdTreeAppListener::ST_GEOMETRY; 
    783835                } 
    784836                else if (strstr(fn.c_str(), ".cfg")) 
     
    786838                        // load terrain from cfg 
    787839                        loadres = loadSceneCfg(fn, mSceneMgr->getRootSceneNode(), i); 
     840                        mOptions.mSceneType = KdTreeAppListener::ST_TERRAIN; 
    788841                } 
    789842                else if (strstr(fn.c_str(), ".txt")) 
     
    899952                                s.clear(); 
    900953                                s << line[2]; 
    901                                 s >> or.x >> or.y >> or.z >> or.w; 
     954                                s >> or.w >> or.x >> or.y >> or.z; 
    902955                                s.clear(); 
    903956                                s << line[3]; 
     
    912965                                } 
    913966                                // build node 
    914                                 SceneNode *newnode = anchor->createChildSceneNode(node, pos, or); 
    915                                 newnode->setScale(scale); 
     967                                //SceneNode *newnode = anchor->createChildSceneNode(node, pos, or); 
     968                                SceneNode *newnode = anchor->createChildSceneNode(node); 
    916969                                for (EntMeshMap::iterator emmit = emm.begin(); emmit != emm.end(); emmit ++) 
    917970                                { 
     
    919972                                        newnode->attachObject(entity); 
    920973                                } 
     974                                newnode->setPosition(pos); 
     975                                newnode->setOrientation(or); 
     976                                newnode->setScale(scale); 
    921977                                emm.clear(); 
    922978                        } 
  • GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/src/TestKdTreeAppListener.cpp

    r1285 r1296  
    113113mTopCamFollow(true), 
    114114mShowTree(SHOWTREE_OFF), 
     115// view cells 
     116mUseViewCells(false), 
     117mUseVisibilityFilter(false), 
    115118//counters 
    116119mSeqNum(0), 
     
    164167        mCamNode = sm->getSceneNode("PlayerCamNode"); 
    165168 
     169        sm->getOption("UseViewCells", &mUseViewCells); 
     170        sm->getOption("UseVisibilityFilter", &mUseVisibilityFilter); 
     171 
    166172        mRaySceneQuery = mSceneMgr->createRayQuery(Ray(mCamNode->getPosition(), Vector3::NEGATIVE_UNIT_Y)); 
    167173 
     
    248254 
    249255        String ext = "KdTree/"; 
    250         String sMD, sKT, sKI, sHL, sBM, sRM, sFM, sTC, sEV; 
     256        String sMD, sKT, sKI, sHL, sBM, sRM, sFM, sTC, sEV, sVC, sVF; 
    251257 
    252258        int maxd; 
     
    319325        else 
    320326                sTC = ": Free"; 
     327 
     328        if (mSceneMgr->getOption("UseViewCells", &mUseViewCells)) 
     329        { 
     330                if (mUseViewCells) 
     331                        sVC = ": on"; 
     332                else 
     333                        sVC = ": off"; 
     334        } 
     335        else 
     336        { 
     337                sVC = NA; 
     338        } 
     339 
     340        if (mSceneMgr->getOption("UseVisibilityFilter", &mUseVisibilityFilter)) 
     341        { 
     342                if (mUseVisibilityFilter) 
     343                        sVF = ": on"; 
     344                else 
     345                        sVF = ": off"; 
     346        } 
     347        else 
     348        { 
     349                sVF = NA; 
     350        } 
    321351 
    322352        initOverlayElement(&mRenderMethodInfo, ext, "RenderMethod", top, sRM); top += vert_space; 
     
    329359        initOverlayElement(&mMovementInfo, ext, "Movement", top, sFM); top += vert_space; 
    330360        initOverlayElement(&mTopCamInfo, ext, "TopCam", top, sTC); top += vert_space; 
     361        initOverlayElement(&mViewCellsInfo, ext, "ViewCells", top, sVC); top += vert_space; 
     362        initOverlayElement(&mViewFilterInfo, ext, "ViewFilter", top, sVF); top += vert_space; 
    331363 
    332364        OverlayElement *visPanel = OverlayManager::getSingleton(). 
     
    350382                        mKdTreeOverlay->hide(); 
    351383                } 
     384        } 
     385} 
     386 
     387void KdTreeAppListener::toggleUseViewCells() 
     388{ 
     389        mUseViewCells = !mUseViewCells; 
     390        if (mSceneMgr->setOption("UseViewCells", &mUseViewCells)) 
     391        { 
     392                if (mUseViewCells) 
     393                        mViewCellsInfo->setCaption(": on"); 
     394                else 
     395                        mViewCellsInfo->setCaption(": off"); 
     396        } 
     397        else 
     398        { 
     399                mViewCellsInfo->setCaption(NA); 
     400        } 
     401} 
     402 
     403void KdTreeAppListener::toggleUseVisibilityFilter() 
     404{ 
     405        mUseVisibilityFilter = !mUseVisibilityFilter; 
     406        if (mSceneMgr->setOption("UseVisibilityFilter", &mUseVisibilityFilter)) 
     407        { 
     408                if (mUseVisibilityFilter) 
     409                        mViewFilterInfo->setCaption(": on"); 
     410                else 
     411                        mViewFilterInfo->setCaption(": off"); 
     412        } 
     413        else 
     414        { 
     415                mViewFilterInfo->setCaption(NA); 
    352416        } 
    353417} 
     
    442506                        else 
    443507                                mEnhancedVisInfo->setCaption(": Simple"); 
     508 
     509                        mOptions.mEnhancedVisibility = mode; 
    444510                } 
    445511        } 
     
    458524                bm = (bm + 1) % KdTree::KDBM_SIZE; 
    459525                if (mSceneMgr->setOption("BuildMethod", &bm)) 
     526                { 
    460527                        mBuildMethodInfo->setCaption(": " + BUILDMETHODCAPTION[bm]); 
     528                        mOptions.mBuildMethod = bm; 
     529                } 
    461530        } 
    462531        else 
     
    474543                rm = (rm + 1) % KdTree::KDRM_SIZE; 
    475544                if (mSceneMgr->setOption("RenderMethod", &rm)) 
     545                { 
    476546                        mRenderMethodInfo->setCaption(": " + RENDERMETHODCAPTION[rm]); 
     547                        mOptions.mRenderMethod = rm; 
     548                } 
    477549        } 
    478550        else 
     
    553625        } 
    554626 
     627        if (mInputDevice->isKeyDown(KC_F8) && mTimeUntilNextToggle <= 0) 
     628        { 
     629                // fill scene only once (for now), stop if anchor node exists 
     630                try 
     631                { 
     632                        SceneNode *entnode = mSceneMgr->getSceneNode("AnchorNode"); 
     633                } 
     634                catch (Exception) 
     635                { 
     636                        // read interesting params from config file 
     637                        ConfigFile terrainconf; 
     638                        std::stringstream s; 
     639                        Real x,y,z; 
     640                         
     641                        terrainconf.load("terrain.cfg"); 
     642 
     643                        s << terrainconf.getSetting("PageWorldX"); 
     644                        s >> x; 
     645                        s.clear(); 
     646 
     647                        s << terrainconf.getSetting("MaxHeight"); 
     648                        s >> y; 
     649                        s.clear(); 
     650 
     651                        s << terrainconf.getSetting("PageWorldZ"); 
     652                        s >> z; 
     653                        s.clear(); 
     654 
     655                        mOptions.myApp->createTerrainScene(x, y * 0.3, z); 
     656 
     657                        // rebuild tree 
     658                        mSceneMgr->setOption("RebuildKdTree", 0); 
     659                } 
     660 
     661                mTimeUntilNextToggle = 0.5; 
     662        } 
     663 
     664 
    555665        if (mInputDevice->isKeyDown(KC_F9) && mTimeUntilNextToggle <= 0) 
    556666        { 
     
    571681        } 
    572682 
    573         if (mInputDevice->isKeyDown(KC_V) && mTimeUntilNextToggle <= 0) 
    574         { 
    575                 toggleEnhancedVisibility(); 
     683        if (mInputDevice->isKeyDown(KC_C) && mTimeUntilNextToggle <= 0) 
     684        { 
     685                toggleUseViewCells(); 
     686                mTimeUntilNextToggle = 0.5; 
     687        } 
     688 
     689        if (mInputDevice->isKeyDown(KC_X) && mTimeUntilNextToggle <= 0) 
     690        { 
     691                toggleUseVisibilityFilter(); 
    576692                mTimeUntilNextToggle = 0.5; 
    577693        } 
     
    9821098        if (!mFreeMove) 
    9831099        { 
    984                 if (mOptions.mSceneFiles == TERRAIN_SCENE) 
     1100                if (mOptions.mSceneType == ST_TERRAIN) 
    9851101                { 
    9861102                        static Vector3 pos; 
     
    11551271                        { 
    11561272                                saveLog(); 
    1157                                 return false; 
     1273                                if (mOptions.mBurnIn) 
     1274                                        togglePlayback(); 
     1275                                else 
     1276                                        return false; 
    11581277                        } 
    11591278                } 
     
    13441463                mDemoStats.mEllapsedTime = 0.0f; 
    13451464                mDemoStats.mTotalEllapsedTime = 0.0f; 
     1465                mDemoFPS.clear(); 
    13461466        } 
    13471467        // stop playback 
     
    15971717                if (mOptions.mSceneManager == SM_KDT || mOptions.mSceneManager == SM_KTE) 
    15981718                { 
    1599                         logwrite << ds << RENDERMETHOD[mOptions.mRenderMethod] << ds << mOptions.mMaxDepth << ds  
    1600                                 << mOptions.mKT << ds << mOptions.mKI; 
     1719                        // info about enhanced visibility if internal rendering 
     1720                        String senhvis; 
     1721                        if (mOptions.mRenderMethod == KdTree::KDRM_INTERNAL) 
     1722                        { 
     1723                                if (mOptions.mEnhancedVisibility) 
     1724                                        senhvis = "E" + ds; 
     1725                                else 
     1726                                        senhvis = "S" + ds; 
     1727                        } 
     1728 
     1729                        logwrite << ds << RENDERMETHOD[mOptions.mRenderMethod] << ds << senhvis <<  
     1730                                mOptions.mMaxDepth << ds << mOptions.mKT << ds << mOptions.mKI << ds <<  
     1731                                BUILDMETHOD[mOptions.mBuildMethod]; 
    16011732                } 
    16021733                else if (mOptions.mSceneManager == SM_OCM && mOptions.mRenderMethod != KdTree::KDRM_INTERNAL) 
    16031734                { 
    1604                         logwrite << ds << RENDERMETHOD[(mOptions.mRenderMethod+3)%3]; 
     1735                        logwrite << ds << RENDERMETHOD[CONV_OCM_TO_KDT_ALG(mOptions.mRenderMethod)]; 
    16051736                } 
    16061737                logwrite << "\"" << fs; 
Note: See TracChangeset for help on using the changeset viewer.