Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Viewer Class Reference

#include <EnkiViewer.h>

Inheritance diagram for Viewer:

EnkiViewer VisionEnkiViewer List of all members.

Detailed Description

Viewer that uses libgag to draw things.

Public Member Functions

 Viewer (bool recVideo=false)
 Constructor, by default do not record videos.
virtual ~Viewer ()
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

 libgag's graphic context
 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
 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 > 
 filename of the font

The documentation for this class was generated from the following files:
Generated on Mon Oct 24 17:38:26 2005 for Teem by  doxygen 1.4.2