Bullet Collision Detection & Physics Library
btContactSolverInfo.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
4 
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose,
8 including commercial applications, and to alter it and redistribute it freely,
9 subject to the following restrictions:
10 
11 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15 
16 #ifndef BT_CONTACT_SOLVER_INFO
17 #define BT_CONTACT_SOLVER_INFO
18 
19 #include "LinearMath/btScalar.h"
20 
22 {
30  SOLVER_SIMD = 256,
33 };
34 
36 {
37 
38 
40  btScalar m_damping;//global non-contact constraint damping, can be locally overridden by constraints during 'getInfo2'.
47  btScalar m_erp;//used as Baumgarte factor
48  btScalar m_erp2;//used in Split Impulse
49  btScalar m_globalCfm;//constraint force mixing
55 
62 
63 };
64 
66 {
67 
68 
69 
71  {
72  m_tau = btScalar(0.6);
73  m_damping = btScalar(1.0);
74  m_friction = btScalar(0.3);
75  m_timeStep = btScalar(1.f/60.f);
76  m_restitution = btScalar(0.);
78  m_numIterations = 10;
79  m_erp = btScalar(0.2);
80  m_erp2 = btScalar(0.2);
81  m_globalCfm = btScalar(0.);
82  m_sor = btScalar(1.);
83  m_splitImpulse = true;
85  m_splitImpulseTurnErp = 0.1f;
86  m_linearSlop = btScalar(0.0);
88  //m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_SIMD | SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION|SOLVER_USE_2_FRICTION_DIRECTIONS|SOLVER_ENABLE_FRICTION_DIRECTION_CACHING;// | SOLVER_RANDMIZE_ORDER;
89  m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_SIMD;// | SOLVER_RANDMIZE_ORDER;
90  m_restingContactRestitutionThreshold = 2;//unused as of 2.81
91  m_minimumSolverBatchSize = 128; //try to combine islands until the amount of constraints reaches this limit
92  m_maxGyroscopicForce = 100.f;
95  }
96 };
97 
100 {
101  double m_tau;
102  double m_damping;//global non-contact constraint damping, can be locally overridden by constraints during 'getInfo2'.
103  double m_friction;
104  double m_timeStep;
107  double m_sor;
108  double m_erp;//used as Baumgarte factor
109  double m_erp2;//used in Split Impulse
110  double m_globalCfm;//constraint force mixing
113  double m_linearSlop;
117 
123  char m_padding[4];
124 
125 };
128 {
129  float m_tau;
130  float m_damping;//global non-contact constraint damping, can be locally overridden by constraints during 'getInfo2'.
131  float m_friction;
132  float m_timeStep;
133 
136  float m_sor;
137  float m_erp;//used as Baumgarte factor
138 
139  float m_erp2;//used in Split Impulse
140  float m_globalCfm;//constraint force mixing
143 
148 
153 
155  char m_padding[4];
156 };
157 
158 
159 
160 #endif //BT_CONTACT_SOLVER_INFO
btSolverMode
btScalar m_singleAxisRollingFrictionThreshold
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
double m_singleAxisRollingFrictionThreshold
it is only used for 'explicit' version of gyroscopic force
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:279
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...