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 {
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;
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 
64  float m_hertz;
74  bool m_drawCOMs;
81  bool m_pause;
83 };
int m_windowWidth
Definition: settings.h:62
bool m_singleStep
Definition: settings.h:82
bool m_drawFrictionImpulse
Definition: settings.h:73
bool m_pause
Definition: settings.h:81
bool m_drawShapes
Definition: settings.h:67
void Load()
Definition: settings.cpp:84
float m_hertz
Definition: settings.h:64
int m_positionIterations
Definition: settings.h:66
Settings()
Definition: settings.h:27
bool m_enableContinuous
Definition: settings.h:78
bool m_drawContactNormals
Definition: settings.h:71
bool m_drawContactImpulse
Definition: settings.h:72
bool m_enableWarmStarting
Definition: settings.h:77
bool m_drawCOMs
Definition: settings.h:74
void Save()
Definition: settings.cpp:56
bool m_drawContactPoints
Definition: settings.h:70
int m_testIndex
Definition: settings.h:61
int m_velocityIterations
Definition: settings.h:65
bool m_drawProfile
Definition: settings.h:76
bool m_enableSubStepping
Definition: settings.h:79
void Reset()
Definition: settings.h:32
int m_windowHeight
Definition: settings.h:63
bool m_drawStats
Definition: settings.h:75
bool m_drawAABBs
Definition: settings.h:69
bool m_drawJoints
Definition: settings.h:68
bool m_enableSleep
Definition: settings.h:80


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:21