Bullet Collision Detection & Physics Library
btContactSolverInfo.h
Go to the documentation of this file.
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
4
5This software is provided 'as-is', without any express or implied warranty.
6In no event will the authors be held liable for any damages arising from the use of this software.
7Permission is granted to anyone to use this software for any purpose,
8including commercial applications, and to alter it and redistribute it freely,
9subject to the following restrictions:
10
111. 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.
122. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
133. 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{
33};
34
36{
37
38
40 btScalar m_damping;//global non-contact constraint damping, can be locally overridden by constraints during 'getInfo2'.
46 btScalar m_sor;//successive over-relaxation term
47 btScalar m_erp;//error reduction for non-contact constraints
48 btScalar m_erp2;//error reduction for contact constraints
49 btScalar m_globalCfm;//constraint force mixing for contacts and non-contacts
50 btScalar m_frictionERP;//error reduction for friction constraints
51 btScalar m_frictionCFM;//constraint force mixing for friction constraints
52
58
66
67};
68
70{
71
72
73
75 {
76 m_tau = btScalar(0.6);
77 m_damping = btScalar(1.0);
78 m_friction = btScalar(0.3);
79 m_timeStep = btScalar(1.f/60.f);
82 m_numIterations = 10;
83 m_erp = btScalar(0.2);
84 m_erp2 = btScalar(0.2);
86 m_frictionERP = btScalar(0.2);//positional friction 'anchors' are disabled by default
88 m_sor = btScalar(1.);
89 m_splitImpulse = true;
94 //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;
95 m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_SIMD;// | SOLVER_RANDMIZE_ORDER;
96 m_restingContactRestitutionThreshold = 2;//unused as of 2.81
97 m_minimumSolverBatchSize = 128; //try to combine islands until the amount of constraints reaches this limit
98 m_maxGyroscopicForce = 100.f;
101 m_restitutionVelocityThreshold = 0.2f;//if the relative velocity is below this threshold, there is zero restitution
102 }
103};
104
107{
108 double m_tau;
109 double m_damping;//global non-contact constraint damping, can be locally overridden by constraints during 'getInfo2'.
114 double m_sor;
115 double m_erp;//used as Baumgarte factor
116 double m_erp2;//used in Split Impulse
117 double m_globalCfm;//constraint force mixing
124
130 char m_padding[4];
131
132};
135{
136 float m_tau;
137 float m_damping;//global non-contact constraint damping, can be locally overridden by constraints during 'getInfo2'.
140
143 float m_sor;
144 float m_erp;//used as Baumgarte factor
145
146 float m_erp2;//used in Split Impulse
147 float m_globalCfm;//constraint force mixing
150
155
160
162 char m_padding[4];
163};
164
165
166
167#endif //BT_CONTACT_SOLVER_INFO
btSolverMode
@ SOLVER_SIMD
@ SOLVER_CACHE_FRIENDLY
@ SOLVER_ENABLE_FRICTION_DIRECTION_CACHING
@ SOLVER_ALLOW_ZERO_LENGTH_FRICTION_DIRECTIONS
@ SOLVER_FRICTION_SEPARATE
@ SOLVER_USE_WARMSTARTING
@ SOLVER_INTERLEAVE_CONTACT_AND_FRICTION_CONSTRAINTS
@ SOLVER_RANDMIZE_ORDER
@ SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION
@ SOLVER_USE_2_FRICTION_DIRECTIONS
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:292
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
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64