Rev | Line | |
---|
[3173] | 1 | #ifndef _WALKTHROUGHRECORDER_H__
|
---|
| 2 | #define _WALKTHROUGHRECORDER_H__
|
---|
| 3 |
|
---|
| 4 | #include "common.h"
|
---|
[3210] | 5 | #include <fstream>
|
---|
[3173] | 6 |
|
---|
| 7 | namespace CHCDemoEngine
|
---|
| 8 | {
|
---|
| 9 |
|
---|
[3210] | 10 | class Camera;
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | /** Records given walkthrough
|
---|
[3173] | 14 | */
|
---|
| 15 | class WalkThroughRecorder
|
---|
| 16 | {
|
---|
| 17 | public:
|
---|
[3210] | 18 | /** Writes walkthrough frames to file.
|
---|
| 19 | */
|
---|
| 20 | WalkThroughRecorder(const std::string &filename);
|
---|
| 21 | /** Writes current camera data.
|
---|
| 22 | */
|
---|
| 23 | void WriteFrame(Camera *cam);
|
---|
| 24 | /** Reads next frame
|
---|
| 25 | */
|
---|
| 26 | void ReadNextFrame(Camera *cam);
|
---|
| 27 |
|
---|
| 28 | protected:
|
---|
| 29 |
|
---|
| 30 | std::ofstream mFile;
|
---|
[3173] | 31 | };
|
---|
| 32 |
|
---|
[3210] | 33 | /** Replays a given walkthrough
|
---|
| 34 | */
|
---|
| 35 | class WalkThroughPlayer
|
---|
| 36 | {
|
---|
| 37 | public:
|
---|
| 38 | /** Writes walkthrough frames to file.
|
---|
| 39 | */
|
---|
| 40 | WalkThroughPlayer(const std::string &filename);
|
---|
| 41 | /** Reads next frame
|
---|
| 42 | */
|
---|
| 43 | void ReadNextFrame(Camera *cam);
|
---|
| 44 |
|
---|
| 45 | protected:
|
---|
| 46 |
|
---|
| 47 | std::ifstream mFile;
|
---|
| 48 | };
|
---|
| 49 |
|
---|
| 50 |
|
---|
[3173] | 51 | }
|
---|
| 52 |
|
---|
| 53 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.