Changeset 254 for trunk/VUT/work


Ignore:
Timestamp:
08/26/05 23:24:31 (19 years ago)
Author:
mattausch
Message:

added some hack for video recording

Location:
trunk/VUT/work
Files:
8 edited

Legend:

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

    r160 r254  
    2020 
    2121 
    22 /***********************************************/ 
    23 /* TestCullingApplication implementation       */ 
    24 /***********************************************/ 
     22/***************************************************/ 
     23/*     TestCullingApplication implementation       */ 
     24/***************************************************/ 
    2525 
    2626//----------------------------------------------------------------------- 
  • trunk/VUT/work/TestCulling/TestCullingApplication.h

    r160 r254  
    1717} 
    1818 
    19 String mCurrentAlgorithmCaptions[GtpVisibility::VisibilityEnvironment::NUM_CULLING_MANAGERS] =  
     19String mCurrentAlgorithmCaptions[] =  
    2020{ 
    2121    "View Frustum Culling",  
  • trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp

    r187 r254  
    7070// output file for object positions / orientations 
    7171const char* objects_out_filename = "objects.out"; 
    72  
     72         
     73std::ofstream video_out("video.lst"); 
    7374 
    7475//----------------------------------------------------------------------- 
     
    117118mShowVisualization(false), 
    118119mCullCamera(false), 
    119 mRecord(false), 
     120mRecordFrames(false), 
    120121mShowShadows(false), 
    121122mShowHelp(false), 
     
    134135mDeleteObjects(false), 
    135136mUseItemBuffer(false), 
    136 mItemBufferMode(GtpVisibility::QueryManager::PATCH_VISIBILITY) 
     137mItemBufferMode(GtpVisibility::QueryManager::PATCH_VISIBILITY), 
     138mRecordVideo(false), 
     139mPureRenderTimeFps(0.0), 
     140mNumVideoFrames(0), 
     141mDemoFps(0), 
     142mUseDemoFps(false) 
    137143{ 
    138144        //mInputDevice = PlatformManager::getSingleton().createInputReader(); 
     
    159165 
    160166        initVisStatsOverlay(); // visibility stats overlay 
    161         initHelpOverlay(); // help overlay 
    162         initQueryOverlay(); // visibility query stats overlay 
     167        initHelpOverlay();     // help overlay 
     168        initQueryOverlay();    // visibility query stats overlay 
    163169 
    164170        // show stats overlays 
     
    179185        setObjectType(mCurrentObjectType); 
    180186 
     187        // initialise timer 
     188        mTimer = Root::getSingleton().getTimer(); 
     189        mTimeFrameEnded = mTimeFrameStarted = mTimer->getMilliseconds(); 
     190         
    181191        // reset statistics 
    182192        resetStats(); 
     
    356366        {       return false;   }*/ 
    357367 
    358         // --- set parameters for visualization 
     368        //-- set parameters for visualization 
    359369        if (mShowVisualization) 
    360370        { 
     
    362372                mSceneMgr->setOption("ShowOctree", &mShowVisualization); 
    363373                 
    364                 // ---- setup visualization camera 
     374                //-- setup visualization camera 
    365375 
    366376                mVizCamera->setPosition(0, 0, 0); 
     
    380390                mVizCamera->moveRelative(Vector3(0, 800, 0)); 
    381391        } 
     392        else 
     393        { 
     394                // frame start time 
     395                mTimeFrameStarted = mTimer->getMilliseconds(); 
     396                //Ogre::LogManager::getSingleton().logMessage("Frame started"); 
     397        } 
    382398 
    383399        //-- set application state 
     
    385401        { 
    386402        case REPLAY: 
     403                /// set the current camera data to loaded frame information  
    387404                setCurrentFrameInfo(evt.timeSinceLastFrame); 
     405                // HACK to produce demo 
     406                addFrameInfo(mSavedFrameInfo, mCamNode, evt.timeSinceLastFrame); 
    388407                break; 
    389408        case WALKTHROUGH: 
    390                 //-- if we are recording camera status per frame 
    391                 if (mRecord) 
     409                //-- recording the camera settings per frame 
     410                if (mRecordFrames) 
    392411                { 
    393                         addFrameInfo(mCamNode, evt.timeSinceLastFrame); 
     412                        addFrameInfo(mFrameInfo, mCamNode, evt.timeSinceLastFrame); 
    394413                        // print recording message 
    395414                        mWindow->setDebugText("Recording frame " +  
     
    573592                return false; 
    574593 
     594        // timer end time 
     595        if (!mShowVisualization) 
     596        { 
     597                mTimeFrameEnded = mTimer->getMilliseconds(); 
     598                //Ogre::LogManager::getSingleton().logMessage("Frame ended"); 
     599        } 
     600 
    575601    updateStats(); 
    576602 
     603        if (mRecordVideo) // record current frame 
     604        { 
     605                //Ogre::LogManager::getSingleton().logMessage("taking video frame"); 
     606                takeVideoFrame(video_out); 
     607                //Ogre::LogManager::getSingleton().logMessage("finished"); 
     608        } 
    577609        //-- IMPORTANT: must be set, otherwise terrain is not rendered correctly 
    578610        mSceneMgr->endFrame(); 
    579611 
    580         if (mTimeDelay <= 0) // approx. one second 
     612        if (mTimeDelay <= 0) // simulates approx. one second 
    581613                mTimeDelay = 1.0; 
    582614 
     
    603635                ofstr << StringConverter::toString((*it).position) << " "  
    604636                          << StringConverter::toString((*it).orientation) << " " 
    605                           << StringConverter::toString((*it).timeElapsed) << "\n"; 
     637                          << StringConverter::toString((*it).timeElapsed) << " " 
     638                          << StringConverter::toString((*it).fps) << "\n"; 
     639        } 
     640        ofstr.close(); 
     641} 
     642// quick hack 
     643void TerrainFrameListener::writeNewFrameInfo() 
     644{ 
     645        std::ofstream ofstr("newframe.out"); 
     646         
     647        std::vector<frame_info>::const_iterator it, it_end; 
     648 
     649        it_end = mSavedFrameInfo.end(); 
     650        for (it = mSavedFrameInfo.begin(); it < it_end; ++it) 
     651        { 
     652                ofstr << StringConverter::toString((*it).position) << " "  
     653                          << StringConverter::toString((*it).orientation) << " " 
     654                          << StringConverter::toString((*it).timeElapsed) << " " 
     655                          << StringConverter::toString((*it).fps) << "\n"; 
    606656        } 
    607657        ofstr.close(); 
     
    621671        { 
    622672                ifstr.getline(line, 256); 
    623                 sscanf(line, "%f %f %f %f %f %f %f %f", &info.position.x, &info.position.y, &info.position.z, 
     673                sscanf(line, "%f %f %f %f %f %f %f %f %f", &info.position.x, &info.position.y, &info.position.z, 
    624674                           &info.orientation.w, &info.orientation.x, &info.orientation.y, &info.orientation.z, 
    625                            &info.timeElapsed); 
     675                           &info.timeElapsed, &info.fps); 
    626676                 
    627677                mFrameInfo.push_back(info); 
     
    636686{ 
    637687        mCurrentFrame = 0; 
     688        int lastState = mAppState; 
     689 
     690        // transition to the next state 
     691        mAppState = (mAppState + 1) % STATE_NUM; 
    638692 
    639693        // if last state was replay state 
    640         if (mAppState == REPLAY) 
    641         { 
    642                 // reset debug text and write frame info to file 
     694        if (lastState == REPLAY) 
     695        { 
     696        // reset debug text 
    643697                mWindow->setDebugText(""); 
    644                 writeFrames(); 
    645                  
     698                                 
     699                // hack for producing demo 
     700                writeNewFrameInfo(); 
     701                mSavedFrameInfo.clear(); 
     702 
    646703                float avgFps = (float)mAvgFps / (float)mFrameCount; 
    647704 
     
    659716        } 
    660717         
    661         //-- set the next státe 
    662         mAppState = (mAppState + 1) % STATE_NUM; 
    663  
    664718        // replay recorded walkthrough 
    665719        if (mAppState == REPLAY) 
    666720        { 
    667721                // no recording during replay 
    668                 mRecord = false; 
    669  
    670                 // load recorded walkthrough 
     722                mRecordFrames = false; mWindow->setDebugText(""); 
     723 
     724                // load recorded walkthrough from disk 
    671725                if (mFrameInfo.size() == 0) 
    672726                { 
    673727                        loadFrames(); 
    674728                } 
    675  
     729                 
    676730                // if there are no recorded frames => set next state 
    677731                if (mFrameInfo.size() == 0)  
     
    679733                        nextAppState(); 
    680734                } 
    681                 else 
     735                else // replay 
    682736                { 
    683737                        mWindow->setDebugText("Replay"); 
     
    699753void TerrainFrameListener::toggleRecord() 
    700754{ 
    701         mRecord = !mRecord; 
    702  
    703         // clear previous camera path 
    704         if (mRecord) 
     755        mRecordFrames = !mRecordFrames; 
     756 
     757        if (mRecordFrames)  
     758        { 
     759                // starting new recording => clear old frame info 
    705760                mFrameInfo.clear(); 
     761        } 
    706762        else 
     763        { 
     764                writeFrames(); // write frame info to file 
    707765                mWindow->setDebugText(""); 
     766        } 
    708767} 
    709768//----------------------------------------------------------------------- 
     
    711770{ 
    712771        mVisibilityThreshold += incr;  
    713         if(mVisibilityThreshold < 0) mVisibilityThreshold = 0; 
    714          
     772 
     773        if (mVisibilityThreshold < 0) 
     774        { 
     775                mVisibilityThreshold = 0; 
     776        } 
     777 
    715778        char str[100]; sprintf(str,": %d", mVisibilityThreshold); 
    716779 
     
    722785{ 
    723786        mAssumedVisibility += incr;  
    724         if(mAssumedVisibility < 0) mAssumedVisibility = 0; 
    725          
     787 
     788        if (mAssumedVisibility < 0)  
     789        {        
     790                mAssumedVisibility = 0; 
     791        } 
     792 
    726793        char str[100]; sprintf(str,": %d", mAssumedVisibility); 
    727794 
     
    739806{ 
    740807        mCurrentAlgorithm = (mCurrentAlgorithm + 1) %  
    741                 (GtpVisibility::VisibilityEnvironment::NUM_CULLING_MANAGERS - 1); 
     808                GtpVisibility::VisibilityEnvironment::NUM_CULLING_MANAGERS; 
    742809        setAlgorithm(mCurrentAlgorithm); 
    743810} 
     
    745812void TerrainFrameListener::setObjectType(int objectType) 
    746813{ 
    747         if (mCurrentObjectType >= 3) 
     814        if (mCurrentObjectType >= 3) // TODO: define a constant 
    748815                mCurrentObjectType = 0; 
    749816 
     
    779846        static String trisString = "Triangle Count: "; 
    780847 
     848        int currentFps = mWindow->getStatistics().lastFPS; 
     849         
     850        if (mUseDemoFps) 
     851                currentFps = mDemoFps; 
     852#if 0 
     853        // HACK: take pure rendering time, only measures the render call 
     854        long pureRenderTime = mTimeFrameEnded - mTimeFrameStarted; 
     855 
     856        if (pureRenderTime) 
     857        { 
     858                mPureRenderTimeFps = 1000.0 / (float) pureRenderTime; 
     859        } 
     860        currentFps = mPureRenderRenderTimeFps; 
     861        //std::stringstream d; d << "Pure render time fps: " << mPureRenderTimeFps << "\n"; 
     862        //Ogre::LogManager::getSingleton().logMessage(d.str()); 
     863#endif 
     864         
    781865        // HACK: compute average fps ourselfs, because ogre avg. fps is wrong 
    782866        // TODO: update only once per second 
    783         mAvgFps += mWindow->getStatistics().lastFPS; 
    784         ++ mFrameCount; 
    785          
    786         float avgFps = (float)mAvgFps / (float)mFrameCount; 
    787      
     867        mAvgFps += currentFps; 
     868        float avgFps = (float)mAvgFps / (float)(mFrameCount++); 
     869    
    788870        // update stats when necessary 
    789871    try  
     
    796878                const RenderTarget::FrameStats& stats = mWindow->getStatistics(); 
    797879 
    798                 //guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS)); 
    799                 if (mTimeDelay < 0) // only update once per second 
     880                // HACK: take newly computed avg. fps instead of Ogre avg fps and update only once per second 
     881                if (mTimeDelay < 0)  
    800882                {                
    801883                        guiAvg->setCaption(avgFpsString + StringConverter::toString(avgFps) + " ms"); 
     884                        //guiCurr->setCaption(currFpsString + StringConverter::toString(currentFps)); 
    802885                } 
    803  
    804                 guiCurr->setCaption(currFpsString + StringConverter::toString(stats.lastFPS)); 
     886                //guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS)); 
     887                guiCurr->setCaption(currFpsString + StringConverter::toString(currentFps)); 
     888                 
     889 
    805890                guiBest->setCaption(bestFpsString + StringConverter::toString(stats.bestFPS) 
    806891                        +" "+StringConverter::toString(stats.bestFrameTime) + " ms"); 
     
    10391124                break; 
    10401125        case KC_F2: 
    1041                 toggleShowStats(); 
     1126                mStatsOn = !mStatsOn; 
     1127                showStats(mStatsOn); 
    10421128                break; 
    10431129        case KC_F3: 
     
    10631149                mUseAnimation = !mUseAnimation; 
    10641150                break; 
     1151 
     1152        case KC_F10: 
     1153                mRecordVideo = !mRecordVideo; 
     1154                         
    10651155        case KC_F11: 
    10661156                takeScreenshot(); 
     
    10811171        case KC_DELETE: 
    10821172                mDeleteObjects = true; 
     1173                break; 
     1174        case KC_M: // hack 
     1175                mUseDemoFps = !mUseDemoFps; 
    10831176                break; 
    10841177        //KEY_PRESSED(KC_F3, 0.3, writeFrames()); 
     
    11101203} 
    11111204//----------------------------------------------------------------------- 
    1112 void TerrainFrameListener::addFrameInfo(SceneNode *camNode, Real timeElapsed) 
     1205void TerrainFrameListener::addFrameInfo(FrameInfoContainer &frameInfos, SceneNode *camNode, Real timeElapsed) 
    11131206{ 
    11141207        frame_info info; 
     1208 
    11151209        info.orientation = mCamNode->getOrientation(); 
    11161210        info.position = mCamNode->getPosition(); 
    11171211        info.timeElapsed = timeElapsed; 
    1118  
    1119         mFrameInfo.push_back(info); 
     1212        info.fps = mWindow->getStatistics().lastFPS; 
     1213 
     1214        frameInfos.push_back(info); 
    11201215} 
    11211216//----------------------------------------------------------------------- 
     
    11241219        //-- find current frame relative to elapsed frame time           
    11251220        mReplayTimeElapsed -= timeElapsed; 
    1126  
     1221         
    11271222        while ((mReplayTimeElapsed <= 0) && (mCurrentFrame < (int)mFrameInfo.size() - 1)) 
    11281223        { 
     
    11301225        } 
    11311226 
    1132         frame_info new_frame = mFrameInfo[mCurrentFrame]; 
     1227 
     1228        // TODO: crashes here if recording / replaying on the same time!! 
     1229        frame_info new_frame = mFrameInfo[mCurrentFrame];  
    11331230        frame_info old_frame = mFrameInfo[mCurrentFrame - 1]; 
    11341231                 
     
    11431240        Vector3 camPos = old_frame.position + factor  
    11441241                * (new_frame.position - old_frame.position); 
     1242 
     1243        // interpolate the orientation 
    11451244        Quaternion camOrienation = Quaternion::Slerp(factor, old_frame.orientation,  
    11461245                new_frame.orientation, true); 
    11471246 
     1247        // HACK: interpolate fps 
     1248        mDemoFps = old_frame.fps + factor * (new_frame.fps -old_frame.fps); 
     1249 
    11481250        mCamNode->setPosition(camPos); 
    11491251        mCamNode->setOrientation(camOrienation); 
    11501252         
    1151         // stop replay after a full walkthrough 
     1253        // stop replaying after one full walkthrough 
    11521254        if (mCurrentFrame == (int)mFrameInfo.size() - 1) 
    11531255        { 
     
    12491351} 
    12501352//----------------------------------------------------------------------- 
     1353void TerrainFrameListener::takeVideoFrame(std::ofstream &ofstr) 
     1354{ 
     1355        char name[50]; 
     1356 
     1357        sprintf(name, "frame_%05d.tga", ++mNumVideoFrames); 
     1358    mWindow->writeContentsToFile(name); 
     1359    //mWindow->setDebugText(String("Wrote ") + name); 
     1360 
     1361        ofstr << name << "\n"; 
     1362} 
     1363//----------------------------------------------------------------------- 
    12511364void TerrainFrameListener::takeScreenshot() 
    12521365{ 
    1253         char tmp[20]; 
    1254         sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); 
    1255     mWindow->writeContentsToFile(tmp); 
    1256     mWindow->setDebugText(String("Wrote ") + tmp); 
     1366        char name[50]; 
     1367 
     1368        sprintf(name, "screenshot_%05d.png", ++mNumScreenShots); 
     1369    mWindow->writeContentsToFile(name); 
     1370    //mWindow->setDebugText(String("Wrote ") + name); 
    12571371} 
    12581372//----------------------------------------------------------------------- 
     
    12831397        } 
    12841398} 
    1285 //----------------------------------------------------------------------- 
    1286 void TerrainFrameListener::toggleShowStats() 
    1287 { 
    1288         mStatsOn = !mStatsOn; 
    1289  
    1290         showStats(mStatsOn); 
    1291 } 
     1399 
    12921400//----------------------------------------------------------------------- 
    12931401void TerrainFrameListener::toggleShowHelp() 
     
    13361444        initHelpOverlayElement("Recorded", top); top += vert_space; 
    13371445        initHelpOverlayElement("Animation", top); top += vert_space; 
     1446        initHelpOverlayElement("Video", top); top += vert_space; 
    13381447        initHelpOverlayElement("Screenshots", top); top += vert_space; 
    13391448        initHelpOverlayElement("WriteOut", top); top += vert_space; 
     1449 
    13401450 
    13411451        top +=vert_space; 
  • trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.h

    r187 r254  
    2020 
    2121 
     22 
    2223/** Frame listener specialised for terrains. 
    2324*/ 
     
    7576           Quaternion orientation; 
    7677           Real timeElapsed; 
     78           Real fps; 
    7779   } frame_info; 
     80 
     81   typedef std::vector<frame_info> FrameInfoContainer; 
    7882 
    7983   enum  {WALKTHROUGH, REPLAY, STATE_NUM}; 
     
    8589   void zoomVizCamera(int zoom); 
    8690         
    87    void addFrameInfo(SceneNode *camNode, Real timeElapsed); 
     91   void addFrameInfo(FrameInfoContainer &frameInfos, SceneNode *camNode, Real timeElapsed); 
    8892   void setCurrentFrameInfo(Real timeElapsed); 
    8993 
     
    9599   void loadFrames(); 
    96100 
    97    
    98     // Constructor takes a RenderWindow because it uses that to determine input context 
    99     //ExampleFrameListener(RenderWindow* win, Camera* cam, bool useBufferedInputKeys = false, bool useBufferedInputMouse = false) 
     101        // quick hack 
     102        void writeNewFrameInfo(); 
    100103     
    101104    bool processUnbufferedKeyInput(const FrameEvent& evt); 
    102105    bool processUnbufferedMouseInput(const FrameEvent& evt); 
    103106 
     107        /** Shows the frame / algorithm statistics. 
     108        */  
    104109    void showStats(bool show); 
    105110 
     111        /** Updates frame statistics and the frame statistics display. 
     112        */ 
    106113        void updateStats(); 
    107114 
     115        /** Toggles wether help screen is shown or not. 
     116        */ 
    108117        void toggleShowHelp(); 
    109         void toggleShowStats(); 
    110  
     118         
     119        /** Toggles wether shadows are shown or not. 
     120        */ 
    111121        void toggleShowShadows(); 
    112122        void toggleDisplayCameraDetails(); 
     123        /** Takes screenshot of the current scene. 
     124        */ 
    113125        void takeScreenshot(); 
     126        /** Takes one video frame. 
     127        */ 
     128        void takeVideoFrame(std::ofstream &ofstr); 
     129 
    114130        void nextSceneDetailLevel(); 
    115131        void nextFilter(); 
     
    120136        void changeAssumedVisibility(int incr); 
    121137        void setTestGeometryForVisibleLeaves(bool testGeometryForVisibleLeaves); 
     138        /** Shows octree hierarchy of the scene. 
     139        */ 
    122140        void toggleShowOctree(); 
     141        /** Toggles wether we use the initial depth pass. 
     142        */ 
    123143        void toggleUseDepthPass(); 
     144        /** Toggles wether the visualization is shown. 
     145        */ 
    124146        void toggleShowViz(); 
     147        /** Toggles wether the frames are recorded. 
     148        */ 
    125149        void toggleRecord(); 
    126150 
     
    134158        void applyVisibilityQuery(bool fromPoint, bool relativeVisibility, bool useItemBuffer); 
    135159 
     160        /** Shows result from visibility queries. 
     161        */ 
    136162        void toggleShowQueryStats(); 
    137163 
     
    168194        int mVisibilityThreshold; 
    169195        int mAssumedVisibility; 
    170         // the current frame number 
     196        /// the current frame number 
    171197        int mCurrentFrame; 
    172         // the current application state 
     198        /// the current application state 
    173199        int mAppState; 
    174         // The number of objects on the screen 
     200        /// The number of objects on the screen 
    175201        int mObjectCount;             
    176         // visualization mode 
     202        /// visualization mode 
    177203        int mNodeVizMode; 
    178  
    179         SceneNode *mCurrentObject;    // the newly created object 
    180  
     204        /// number of video frames 
     205        int mNumVideoFrames; 
     206        /// the newly created object 
     207        SceneNode *mCurrentObject;     
     208/// HACK 
     209float mDemoFps; 
     210bool mUseDemoFps; 
    181211        OverlayElement *mAlgorithmInfo; 
    182212        OverlayElement *mThresholdInfo; 
     
    214244        bool mShowVisualization; 
    215245        bool mCullCamera; 
    216         bool mRecord; 
     246        bool mRecordFrames; 
    217247        bool mShowShadows; 
    218248        bool mVisualizeCulledNodes; 
     
    232262        SceneNode *mCamNode; 
    233263         
    234         //std::deque<Vector3> mWalkList;   // The list of points we are walking to 
    235         std::vector<frame_info> mFrameInfo; 
    236                  
     264        /// Per frame data stored for a walkthrough 
     265        FrameInfoContainer mFrameInfo; 
     266        /// HACK: for demo 
     267        FrameInfoContainer mSavedFrameInfo; 
     268         
    237269        Real mReplayTimeElapsed; 
    238270        //EventProcessor* mEventProcessor; 
     
    282314 
    283315        bool mDeleteObjects; 
    284  
     316        bool mRecordVideo; 
     317 
     318        Timer *mTimer; 
     319        long mTimeFrameEnded; 
     320        long mTimeFrameStarted; 
     321        float mPureRenderTimeFps; 
    285322        TestCullingTerrainApplication *mApplication; 
    286323}; 
  • trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp

    r187 r254  
    305305        { 
    306306                // the objects are generated randomly distributed over the terrain 
    307                 generateScene(900, 0); 
     307                generateScene(900, 0); // create soldiers, trees, ninjas 
    308308                generateScene(500, 1); 
    309309                generateScene(100, 2); 
  • trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.h

    r183 r254  
    157157        Vector3 mTerrainMaxPos; 
    158158 
    159  
    160159private: 
    161160        void chooseSceneManager(void); 
  • trunk/VUT/work/iv/IVFrameListener.cpp

    r187 r254  
    6666mShowVisualization(false), 
    6767mCullCamera(false), 
    68 mRecord(false), 
     68mRecordFrames(false), 
    6969mShowShadows(false), 
    7070mShowHelp(false), 
     
    288288        case WALKTHROUGH: 
    289289                //-- if we are recording camera status per frame 
    290                 if (mRecord) 
     290                if (mRecordFrames) 
    291291                { 
    292292                        addFrameInfo(mCamNode, evt.timeSinceLastFrame); 
     
    442442        { 
    443443                // no recording during replay 
    444                 mRecord = false; 
     444                mRecordFrames = false; 
    445445 
    446446                // load recorded walkthrough 
     
    475475void IVFrameListener::toggleRecord() 
    476476{ 
    477         mRecord = !mRecord; 
     477        mRecordFrames = !mRecordFrames; 
    478478 
    479479        // clear previous camera path 
    480         if (mRecord) 
     480        if (mRecordFrames) 
    481481                mFrameInfo.clear(); 
    482482        else 
     
    834834        info.position = mCamNode->getPosition(); 
    835835        info.timeElapsed = timeElapsed; 
    836  
     836         
    837837        mFrameInfo.push_back(info); 
    838838} 
  • trunk/VUT/work/iv/IVFrameListener.h

    r187 r254  
    182182        bool mShowVisualization; 
    183183        bool mCullCamera; 
    184         bool mRecord; 
     184        bool mRecordFrames; 
    185185        bool mShowShadows; 
    186186        bool mVisualizeCulledNodes; 
Note: See TracChangeset for help on using the changeset viewer.