XFuFPSCount class Reference

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

# XFuFPSCount Class Reference

Frames per second counter utility class. More...

`#include <XFuFPSCount.h>`

List of all members.

## Public Member Functions

| ~XFuFPSCount ()
| Destructor.
void | tick ()
| Tick the counter.
REAL | getFPS ()
| Returns the current FPS value.

## Static Public Member Functions

XFuFPSCount * | create (INT32 aFrameInterval=5)
| Creates a new XFuFPSCount object.

## Protected Member Functions

| XFuFPSCount ()
| Protected constructor.

## Protected Attributes

INT32 * | mTicks
| Array of tick timestamps.
INT32 | mTickCount
| Total number of tick timestamps.
INT32 | mCurrentTick
| The current tick timestamp in the array.

## Detailed Description

Frames per second counter utility class.

Definition at line 17 of file XFuFPSCount.h.

## Constructor & Destructor Documentation

XFuFPSCount::~XFuFPSCount | ( |  | ) |

| Destructor. Definition at line 22 of file XFuFPSCount.cpp. References mTicks.

XFuFPSCount::XFuFPSCount | ( |  | ) | `[protected]`

| Protected constructor. Definition at line 15 of file XFuFPSCount.cpp. References mCurrentTick, mTickCount, and mTicks.

## Member Function Documentation

XFuFPSCount * XFuFPSCount::create | ( | INT32 | aFrameInterval = 5 | ) | `[static]`

Creates a new XFuFPSCount object.

Parameters:

  aFrameInterval | Describes the interval for which the frame rate is calculated. Larger numbers give more stable values, but take more memory, and update slower.

Definition at line 28 of file XFuFPSCount.cpp.

References mTickCount, and mTicks.

REAL XFuFPSCount::getFPS | ( |  | ) |

| Returns the current FPS value. Definition at line 64 of file XFuFPSCount.cpp. References mCurrentTick, mTickCount, and mTicks.

void XFuFPSCount::tick | ( |  | ) |

| Tick the counter. This function should be called once per frame. Definition at line 56 of file XFuFPSCount.cpp. References mCurrentTick, mTickCount, and mTicks.

## Member Data Documentation

INT32 XFuFPSCount::mCurrentTick`[protected]`

| The current tick timestamp in the array. Definition at line 49 of file XFuFPSCount.h. Referenced by getFPS(), tick(), and XFuFPSCount().

INT32 XFuFPSCount::mTickCount`[protected]`

| Total number of tick timestamps. Definition at line 47 of file XFuFPSCount.h. Referenced by create(), getFPS(), tick(), and XFuFPSCount().

INT32* XFuFPSCount::mTicks`[protected]`

| Array of tick timestamps. Definition at line 45 of file XFuFPSCount.h. Referenced by create(), getFPS(), tick(), XFuFPSCount(), and ~XFuFPSCount().

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

- XFuFPSCount.h
- XFuFPSCount.cpp

|  | X-Forge Documentation Confidential Copyright © 2002-2003 Fathammer |  | Documentation generated with doxygen by Dimitri van Heesch