FpsCounter Class Reference

A label that displays the current framerate. This label reads "Current framerate: xx.x frames/s". More...

#include <FpsCounter.h>

Inheritance diagram for FpsCounter:

Label Object2d ViewObject Object

List of all members.

Public Member Functions

 FpsCounter (const string &fontname, const GLfloat &size, const Color &color)
 Enhanced constructor.
void renderGl ()
 Renders counter.
virtual string toString () const
 Returns a textual representation.
virtual string className () const
 Returns the class name of the object.
virtual enum classId classId () const
 Returns the class id of the object.

Private Attributes

Uint32 lastUpdate
 Stores the time in ms of the last.
double fps
 Stores the current fps.


Detailed Description

A label that displays the current framerate. This label reads "Current framerate: xx.x frames/s".

Constructor & Destructor Documentation

FpsCounter::FpsCounter ( const string &  fontname,
const GLfloat &  size,
const Color color 
)

Enhanced constructor.


Member Function Documentation

void FpsCounter::renderGl (  )  [virtual]

Renders counter.

Reimplemented from Label.

string FpsCounter::toString (  )  const [virtual]

Returns a textual representation.

Returns:
a string descriping the run-time object

Reimplemented from Label.

string FpsCounter::className (  )  const [virtual]

Returns the class name of the object.

Returns:
a string with the name of the object's class

Reimplemented from Label.

enum classId FpsCounter::classId (  )  const [virtual]

Returns the class id of the object.

Returns:
an id of the object's class

Reimplemented from Label.


Member Data Documentation

Uint32 FpsCounter::lastUpdate [private]

Stores the time in ms of the last.

double FpsCounter::fps [private]

Stores the current fps.


The documentation for this class was generated from the following files:

Generated on Mon Jul 7 13:30:33 2008 for Firefly by  doxygen 1.5.6