Public Member Functions | Private Member Functions | Private Attributes

FpsCounter Class Reference

Frames Per Second Class. More...

#include <FpsCounter.h>

List of all members.

Public Member Functions

 FpsCounter ()
Uint getFps ()

Private Member Functions

int think ()

Private Attributes

std::vector< UintmFrameTimes
Uint mFrameLastTick
Uint mFrameCount

Detailed Description

Frames Per Second Class.

Convenient package to calculate a rough FPS value.

Todo:
Should we stick this in Common.h?

Constructor & Destructor Documentation

FpsCounter::FpsCounter (  ) 

Basic Constructor


Member Function Documentation

Uint FpsCounter::getFps (  ) 

Returns an approximate FPS value.

int FpsCounter::think (  )  [inline, private]

Calculate FPS.

Calculates an approximate FPS value and returns it as an integer.

Todo:
Document magic number.


Member Data Documentation

Frame Count.

Difference between the current frame and the last frame.

std::vector<Uint> FpsCounter::mFrameTimes [private]

An array to store frame times.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines