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

FrameCounter Class Reference
[Utils3D]

Simple frame rate (FPS) counter. More...

#include <gmlframecounter.h>

List of all members.

Public Member Functions

 FrameCounter ()
 constructor

 ~FrameCounter ()
 destructor

void SetUpdateSpeed (double ms)
 Set counted update speed in milliseconds.

double GetUpdateSpeed () const
 Return counter update speed.

void SetMinimumFrameCount (int count)
 Set minimum number of frames needed to calculate FPS.

double GetMinimumFrameCount () const
 Return counter update speed.

void Reset ()
 Signal that animation cycle is started.

void FrameStarted ()
 Signal that current frame is to be drawn.

void FrameFinished ()
 Signal that current frame is finished.

bool Updated () const
 Tells whether FPS has been updated.

double GetFrameCount () const
 Return the framecount (frames per second).

double GetMeanFrameTime () const
 Return the mean frame time (msec).


Detailed Description

Simple frame rate (FPS) counter.


Member Function Documentation

void SetMinimumFrameCount int  count  )  [inline]
 

Set minimum number of frames needed to calculate FPS.

FPS will be made and Updated() flag will be set only if time since latest update > update speed and number of drawn frames (calls to FrameFinished()) > minimum number of frames

void Reset  ) 
 

Signal that animation cycle is started.

Probably should be called before first frame

void FrameStarted  ) 
 

Signal that current frame is to be drawn.

Should be called before each scene display

void FrameFinished  ) 
 

Signal that current frame is finished.

Should be called after each scene display

bool Updated  )  const
 

Tells whether FPS has been updated.

Check this after call to FrameFinished. Flag cleared after next call to FrameFinished


The documentation for this class was generated from the following files:
Generated on Tue Jan 13 21:12:08 2004 for Graphics and Media Lab CSL by doxygen 1.3.4