-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimeManager.cpp
More file actions
55 lines (44 loc) · 666 Bytes
/
Copy pathTimeManager.cpp
File metadata and controls
55 lines (44 loc) · 666 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "TimeManager.h"
using namespace PBD;
TimeManager* TimeManager::current = 0;
TimeManager::TimeManager ()
{
time = 0;
h = static_cast<Real>(0.005);
}
TimeManager::~TimeManager ()
{
current = 0;
}
TimeManager* TimeManager::getCurrent ()
{
if (current == 0)
{
current = new TimeManager ();
}
return current;
}
void TimeManager::setCurrent (TimeManager* tm)
{
current = tm;
}
bool TimeManager::hasCurrent()
{
return (current != 0);
}
Real TimeManager::getTime()
{
return time;
}
void TimeManager::setTime(Real t)
{
time = t;
}
Real TimeManager::getTimeStepSize()
{
return h;
}
void TimeManager::setTimeStepSize(Real tss)
{
h = tss;
}