nrEngine::TimeSourceVirtual Class Reference
[Clock and Timers]

Timesource ticking certain time steps. More...

Inheritance diagram for nrEngine::TimeSourceVirtual:

nrEngine::TimeSource

Public Member Functions

 TimeSourceVirtual (float64 timeStep)
 ~TimeSourceVirtual ()
float64 getTime ()
void reset (float64 startValue)
void notifyNextFrame ()

Protected Attributes

float64 _timeStep
 Fix time step.

Detailed Description

Timesource ticking certain time steps.

Virtual time source does tick in fix steps. You can use it to force clock ticking on fix steps and not based on system time.

Definition at line 34 of file TimeSourceVirtual.h.


Member Function Documentation

float64 nrEngine::TimeSourceVirtual::getTime (  )  [virtual]

Return the time based on fixed ticks. Each calling of this function will increase the internal time counter. So the clock does call this method only once per frame.

Reimplemented from nrEngine::TimeSource.

Definition at line 35 of file TimeSourceVirtual.cpp.

References nrEngine::TimeSource::_currentTime.

void nrEngine::TimeSourceVirtual::reset ( float64  startValue  )  [virtual]

Reset the time source. This will force the time source to coutn from 0. Specify the startValue parameter to set the starting value of the time counter

Reimplemented from nrEngine::TimeSource.

Definition at line 49 of file TimeSourceVirtual.cpp.

References nrEngine::TimeSource::_currentTime.

void nrEngine::TimeSourceVirtual::notifyNextFrame (  )  [virtual]

Call this method to notify the time source, that new frame beginns. This method is usefull if we are using non-time based time sources. So the time source could read time from some file, which is based on frames.

Reimplemented from nrEngine::TimeSource.

Definition at line 42 of file TimeSourceVirtual.cpp.

References nrEngine::TimeSource::_currentTime, and _timeStep.


The documentation for this class was generated from the following files:
Generated on Wed Sep 12 23:19:43 2007 for nrEngine by  doxygen 1.5.1