externals
box2d
testbed
settings.h
Go to the documentation of this file.
1
// MIT License
2
3
// Copyright (c) 2019 Erin Catto
4
5
// Permission is hereby granted, free of charge, to any person obtaining a copy
6
// of this software and associated documentation files (the "Software"), to deal
7
// in the Software without restriction, including without limitation the rights
8
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
// copies of the Software, and to permit persons to whom the Software is
10
// furnished to do so, subject to the following conditions:
11
12
// The above copyright notice and this permission notice shall be included in all
13
// copies or substantial portions of the Software.
14
15
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
// SOFTWARE.
22
23
#pragma once
24
25
struct
Settings
26
{
27
Settings
()
28
{
29
Reset
();
30
}
31
32
void
Reset
()
33
{
34
m_testIndex
= 0;
35
m_windowWidth
= 1600;
36
m_windowHeight
= 900;
37
m_hertz
= 60.0f;
38
m_velocityIterations
= 8;
39
m_positionIterations
= 3;
40
m_drawShapes
=
true
;
41
m_drawJoints
=
true
;
42
m_drawAABBs
=
false
;
43
m_drawContactPoints
=
false
;
44
m_drawContactNormals
=
false
;
45
m_drawContactImpulse
=
false
;
46
m_drawFrictionImpulse
=
false
;
47
m_drawCOMs
=
false
;
48
m_drawStats
=
false
;
49
m_drawProfile
=
false
;
50
m_enableWarmStarting
=
true
;
51
m_enableContinuous
=
true
;
52
m_enableSubStepping
=
false
;
53
m_enableSleep
=
true
;
54
m_pause
=
false
;
55
m_singleStep
=
false
;
56
}
57
58
void
Save
();
59
void
Load
();
60
61
int
m_testIndex
;
62
int
m_windowWidth
;
63
int
m_windowHeight
;
64
float
m_hertz
;
65
int
m_velocityIterations
;
66
int
m_positionIterations
;
67
bool
m_drawShapes
;
68
bool
m_drawJoints
;
69
bool
m_drawAABBs
;
70
bool
m_drawContactPoints
;
71
bool
m_drawContactNormals
;
72
bool
m_drawContactImpulse
;
73
bool
m_drawFrictionImpulse
;
74
bool
m_drawCOMs
;
75
bool
m_drawStats
;
76
bool
m_drawProfile
;
77
bool
m_enableWarmStarting
;
78
bool
m_enableContinuous
;
79
bool
m_enableSubStepping
;
80
bool
m_enableSleep
;
81
bool
m_pause
;
82
bool
m_singleStep
;
83
};
Settings::m_windowWidth
int m_windowWidth
Definition:
settings.h:62
Settings::m_singleStep
bool m_singleStep
Definition:
settings.h:82
Settings::m_drawFrictionImpulse
bool m_drawFrictionImpulse
Definition:
settings.h:73
Settings::m_pause
bool m_pause
Definition:
settings.h:81
Settings::m_drawShapes
bool m_drawShapes
Definition:
settings.h:67
Settings::Load
void Load()
Definition:
settings.cpp:84
Settings::m_hertz
float m_hertz
Definition:
settings.h:64
Settings::m_positionIterations
int m_positionIterations
Definition:
settings.h:66
Settings::Settings
Settings()
Definition:
settings.h:27
Settings::m_enableContinuous
bool m_enableContinuous
Definition:
settings.h:78
Settings::m_drawContactNormals
bool m_drawContactNormals
Definition:
settings.h:71
Settings::m_drawContactImpulse
bool m_drawContactImpulse
Definition:
settings.h:72
Settings
Definition:
settings.h:25
Settings::m_enableWarmStarting
bool m_enableWarmStarting
Definition:
settings.h:77
Settings::m_drawCOMs
bool m_drawCOMs
Definition:
settings.h:74
Settings::Save
void Save()
Definition:
settings.cpp:56
Settings::m_drawContactPoints
bool m_drawContactPoints
Definition:
settings.h:70
Settings::m_testIndex
int m_testIndex
Definition:
settings.h:61
Settings::m_velocityIterations
int m_velocityIterations
Definition:
settings.h:65
Settings::m_drawProfile
bool m_drawProfile
Definition:
settings.h:76
Settings::m_enableSubStepping
bool m_enableSubStepping
Definition:
settings.h:79
Settings::Reset
void Reset()
Definition:
settings.h:32
Settings::m_windowHeight
int m_windowHeight
Definition:
settings.h:63
Settings::m_drawStats
bool m_drawStats
Definition:
settings.h:75
Settings::m_drawAABBs
bool m_drawAABBs
Definition:
settings.h:69
Settings::m_drawJoints
bool m_drawJoints
Definition:
settings.h:68
Settings::m_enableSleep
bool m_enableSleep
Definition:
settings.h:80
mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:21