Atoms Crowd  7.0.0
Atoms::SimulationTime Class Reference

Global simulation time. More...

#include <SimulationTime.h>

Public Member Functions

 SimulationTime ()
 Private constructor.
 
 SimulationTime (const SimulationTime &)
 Private copy constructor.
 
 ~SimulationTime ()
 Private destructor.
 
SimulationTimeoperator= (const SimulationTime &)
 Private assign operator.
 
void reset ()
 Resets time.
 
double time () const
 Gets current time. More...
 
void increment (double value)
 Increments the time. More...
 
void set (double value)
 Sets the time. More...
 
void setFps (double fps)
 Sets the fps. More...
 
double fps () const
 Gets the fps. More...
 
double seconds () const
 Gets the current time in seconds. More...
 
void setEndTime (double value)
 Sets end time. More...
 
double endTime () const
 End time. More...
 
void setDeltaTime (double value)
 Sets delta time. More...
 
double deltaTime () const
 Delta time. More...
 

Static Public Member Functions

static SimulationTimeinstance ()
 Singleton access.
 

Detailed Description

Global simulation time.

This class is used to query or modify the simulation time. It returns the current time in frames or in seconds. Atoms uses this class as the global simulation time

Member Function Documentation

◆ deltaTime()

double Atoms::SimulationTime::deltaTime ( ) const
inline

Delta time.

Returns
Delta time for the current tick

◆ endTime()

double Atoms::SimulationTime::endTime ( ) const
inline

End time.

Returns
End simulation time

◆ fps()

double Atoms::SimulationTime::fps ( ) const
inline

Gets the fps.

Returns
Frame per seconds

◆ increment()

void Atoms::SimulationTime::increment ( double  value)
inline

Increments the time.

Parameters
valueValue used to increment the time (in frames)

◆ seconds()

double Atoms::SimulationTime::seconds ( ) const
inline

Gets the current time in seconds.

Returns
current time in seconds

◆ set()

void Atoms::SimulationTime::set ( double  value)
inline

Sets the time.

Parameters
valueValue use dot set the current time (in frames)

◆ setDeltaTime()

void Atoms::SimulationTime::setDeltaTime ( double  value)
inline

Sets delta time.

Parameters
Deltatime of the current tick

◆ setEndTime()

void Atoms::SimulationTime::setEndTime ( double  value)
inline

Sets end time.

Parameters
valueEnd simulation time (in frames)

◆ setFps()

void Atoms::SimulationTime::setFps ( double  fps)
inline

Sets the fps.

Fps used to compute the time in seconds

Parameters
fpsFrame per seconds

◆ time()

double Atoms::SimulationTime::time ( ) const
inline

Gets current time.

Retunr the current time in frames

Returns
Current frame

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