#include <EnkiViewer.h>
Inheritance diagram for Viewer:
Public Member Functions | |
Viewer (bool recVideo=false) | |
Constructor, by default do not record videos. | |
virtual | ~Viewer () |
Destructor. | |
void | init (int width, int height) |
Create a window of size width x height. | |
void | step (double dt) |
Do a step: display, sleep for dt if realtime and handle events. | |
void | handleEvent (bool eachStep=false) |
Process incoming events. | |
void | startRecordingVideo (const std::string &fileName) |
Beginning recording of the video named fileName. | |
void | stopRecordingVideo (void) |
Stop the recording of the video, close the file. | |
void | display (bool force=false) |
Display and record frame if video is active. If force is true, disregard displayAll and display anyway. | |
void | setCaption (const std::string &caption) |
Set the caption of the window. | |
void | startDelayFrame (void) |
Record timestamp for delay computation. | |
void | endDelayFrame (double dt) |
Make sure that at least dt second have passed since last startDelayFrame call. If necessary, sleep. | |
Protected Member Functions | |
virtual void | displayViewer (int w, int h)=0 |
Display the viewer. | |
Protected Attributes | |
GAG::GraphicContext * | gc |
libgag's graphic context | |
GAG::Font * | font |
font for drawing text | |
unsigned | eventStep |
step counter to skip most steps when display is disable | |
unsigned | delayStartTick |
timestamp of the beginning of step | |
bool | displayAll |
true if each step has to be displayed | |
VideoRecorder * | vrec |
pointer to video recorder. If NULL no video recorder | |
int | width |
Width and height of the window. | |
int | height |
Width and height of the window. | |
Ishtar::Variable< unsigned > | realtime |
is realtime mode enabled | |
Ishtar::Variable< std::string, true > | fontFileName |
filename of the font |