Atoms Crowd
4.1.0
SimulationTime.h
1
#pragma once
2
// ===========================================================================
3
// Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
4
//
5
// Use of this software is subject to the terms of the Toolchefs license
6
// agreement provided at the time of installation or download, or which
7
// otherwise accompanies this software in either electronic or hard copy form.
8
// ===========================================================================
9
10
#include <Atoms/Globals.h>
11
12
namespace
Atoms
13
{
15
20
class
ATOMS_EXPORT
SimulationTime
21
{
22
public
:
23
25
SimulationTime
();
26
28
SimulationTime
(
const
SimulationTime
&);
29
31
~SimulationTime
();
32
34
SimulationTime
&
operator=
(
const
SimulationTime
&);
35
37
static
SimulationTime
&
instance
();
38
40
inline
void
reset();
41
43
46
inline
double
time()
const
;
47
49
52
inline
void
increment(
double
value);
53
55
58
inline
void
set(
double
value);
59
61
64
inline
void
setFps(
double
fps);
65
67
70
inline
double
fps()
const
;
71
73
76
inline
double
seconds()
const
;
77
79
82
inline
void
setEndTime(
double
value);
83
85
88
inline
double
endTime()
const
;
89
91
94
inline
void
setDeltaTime(
double
value);
95
97
100
inline
double
deltaTime()
const
;
101
102
103
private
:
104
106
double
m_time;
107
109
double
m_fps;
110
112
double
m_endTime;
113
115
double
m_deltaTime;
116
};
117
}
118
119
#include "SimulationTime.impl.h"
Atoms::SimulationTime::operator=
SimulationTime & operator=(const SimulationTime &)
Private assign operator.
Atoms::SimulationTime
Global simulation time.
Definition:
SimulationTime.h:21
Atoms::SimulationTime::SimulationTime
SimulationTime(const SimulationTime &)
Private copy constructor.
Atoms::SimulationTime::instance
static SimulationTime & instance()
Singleton access.
Atoms
Atoms namespace.
Definition:
Agent.h:28
Atoms::SimulationTime::~SimulationTime
~SimulationTime()
Private destructor.
Atoms::SimulationTime::SimulationTime
SimulationTime()
Private constructor.
Atoms
include
Atoms
SimulationTime.h