Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

FrameCounter Class Reference

User interface frame counter. More...

#include <FrameCounter.h>

Inherits Region.

Inheritance diagram for FrameCounter:

Inheritance graph
[legend]
Collaboration diagram for FrameCounter:

Collaboration graph
[legend]
List of all members.

Public Methods

 FrameCounter ()
 Default constructor. More...

void refresh ()
 Repaints the FrameCounter. More...


Protected Attributes

int time
 Time of last update.

int frame
 Frame counter.

float fps
 Cashed value of frames/sec counter.


Detailed Description

User interface frame counter.

The Framecounter is a passive widget that calculates and displays its refresh rate. Can be used for OpenGL animations.


Constructor & Destructor Documentation

FrameCounter::FrameCounter  
 

Default constructor.

Constructs a new FrameCounter.

Postcondition:
FrameCounter is initialized.


Member Function Documentation

void FrameCounter::refresh   [virtual]
 

Repaints the FrameCounter.

Every 20 frames the frames/sec counter is updated.

Precondition:
An OpenGL context has been created and activated to render in.
Postcondition:
The FrameCounter is redrawn and fps is updated.

Reimplemented from Region.


The documentation for this class was generated from the following files:
This documentation was generated using doxygen. If you have any comments or additions please mail me.