Bullet Collision Detection & Physics Library
btTypedConstraint.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2010 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_TYPED_CONSTRAINT_H
17 #define BT_TYPED_CONSTRAINT_H
18 
19 
20 #include "LinearMath/btScalar.h"
21 #include "btSolverConstraint.h"
23 
24 #ifdef BT_USE_DOUBLE_PRECISION
25 #define btTypedConstraintData2 btTypedConstraintDoubleData
26 #define btTypedConstraintDataName "btTypedConstraintDoubleData"
27 #else
28 #define btTypedConstraintData2 btTypedConstraintFloatData
29 #define btTypedConstraintDataName "btTypedConstraintFloatData"
30 #endif //BT_USE_DOUBLE_PRECISION
31 
32 
33 class btSerializer;
34 
35 //Don't change any of the existing enum values, so add enum types at the end for serialization compatibility
37 {
49 };
50 
51 
53 {
58 };
59 
60 #if 1
61  #define btAssertConstrParams(_par) btAssert(_par)
62 #else
63  #define btAssertConstrParams(_par)
64 #endif
65 
66 
68 {
74 };
75 
76 
79 {
81 
82  union
83  {
86  };
87 
92 
93 
95  {
96  btAssert(0);
97  (void) other;
98  return *this;
99  }
100 
101 protected:
107 
109  btScalar getMotorFactor(btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact);
110 
111 
112 public:
113 
115 
116  virtual ~btTypedConstraint() {};
119 
121  int m_numConstraintRows,nub;
122  };
123 
124  static btRigidBody& getFixedBody();
125 
127  // integrator parameters: frames per second (1/stepsize), default error
128  // reduction parameter (0..1).
130 
131  // for the first and second body, pointers to two (linear and angular)
132  // n*3 jacobian sub matrices, stored by rows. these matrices will have
133  // been initialized to 0 on entry. if the second body is zero then the
134  // J2xx pointers may be 0.
135  btScalar *m_J1linearAxis,*m_J1angularAxis,*m_J2linearAxis,*m_J2angularAxis;
136 
137  // elements to jump from one row to the next in J's
138  int rowskip;
139 
140  // right hand sides of the equation J*v = c + cfm * lambda. cfm is the
141  // "constraint force mixing" vector. c is set to zero on entry, cfm is
142  // set to a constant value (typically very small or zero) value on entry.
144 
145  // lo and hi limits for variables (set to -/+ infinity on entry).
146  btScalar *m_lowerLimit,*m_upperLimit;
147 
148  // number of solver iterations
150 
151  //damping of the velocity
153  };
154 
156  {
157  return m_overrideNumSolverIterations;
158  }
159 
162  void setOverrideNumSolverIterations(int overideNumIterations)
163  {
164  m_overrideNumSolverIterations = overideNumIterations;
165  }
166 
168  virtual void buildJacobian() {};
169 
171  virtual void setupSolverConstraint(btConstraintArray& ca, int solverBodyA,int solverBodyB, btScalar timeStep)
172  {
173  (void)ca;
174  (void)solverBodyA;
175  (void)solverBodyB;
176  (void)timeStep;
177  }
178 
180  virtual void getInfo1 (btConstraintInfo1* info)=0;
181 
183  virtual void getInfo2 (btConstraintInfo2* info)=0;
184 
186  void internalSetAppliedImpulse(btScalar appliedImpulse)
187  {
188  m_appliedImpulse = appliedImpulse;
189  }
192  {
193  return m_appliedImpulse;
194  }
195 
196 
198  {
199  return m_breakingImpulseThreshold;
200  }
201 
203  {
204  m_breakingImpulseThreshold = threshold;
205  }
206 
207  bool isEnabled() const
208  {
209  return m_isEnabled;
210  }
211 
212  void setEnabled(bool enabled)
213  {
214  m_isEnabled=enabled;
215  }
216 
217 
219  virtual void solveConstraintObsolete(btSolverBody& /*bodyA*/,btSolverBody& /*bodyB*/,btScalar /*timeStep*/) {};
220 
221 
222  const btRigidBody& getRigidBodyA() const
223  {
224  return m_rbA;
225  }
226  const btRigidBody& getRigidBodyB() const
227  {
228  return m_rbB;
229  }
230 
232  {
233  return m_rbA;
234  }
236  {
237  return m_rbB;
238  }
239 
241  {
242  return m_userConstraintType ;
243  }
244 
245  void setUserConstraintType(int userConstraintType)
246  {
247  m_userConstraintType = userConstraintType;
248  };
249 
250  void setUserConstraintId(int uid)
251  {
252  m_userConstraintId = uid;
253  }
254 
256  {
257  return m_userConstraintId;
258  }
259 
260  void setUserConstraintPtr(void* ptr)
261  {
262  m_userConstraintPtr = ptr;
263  }
264 
266  {
267  return m_userConstraintPtr;
268  }
269 
270  void setJointFeedback(btJointFeedback* jointFeedback)
271  {
272  m_jointFeedback = jointFeedback;
273  }
274 
276  {
277  return m_jointFeedback;
278  }
279 
281  {
282  return m_jointFeedback;
283  }
284 
285 
286  int getUid() const
287  {
288  return m_userConstraintId;
289  }
290 
291  bool needsFeedback() const
292  {
293  return m_needsFeedback;
294  }
295 
298  void enableFeedback(bool needsFeedback)
299  {
300  m_needsFeedback = needsFeedback;
301  }
302 
306  {
307  btAssert(m_needsFeedback);
308  return m_appliedImpulse;
309  }
310 
312  {
313  return btTypedConstraintType(m_objectType);
314  }
315 
316  void setDbgDrawSize(btScalar dbgDrawSize)
317  {
318  m_dbgDrawSize = dbgDrawSize;
319  }
321  {
322  return m_dbgDrawSize;
323  }
324 
327  virtual void setParam(int num, btScalar value, int axis = -1) = 0;
328 
330  virtual btScalar getParam(int num, int axis = -1) const = 0;
331 
332  virtual int calculateSerializeBufferSize() const;
333 
335  virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
336 
337 };
338 
339 // returns angle in range [-SIMD_2_PI, SIMD_2_PI], closest to one of the limits
340 // all arguments should be normalized angles (i.e. in range [-SIMD_PI, SIMD_PI])
341 SIMD_FORCE_INLINE btScalar btAdjustAngleToLimits(btScalar angleInRadians, btScalar angleLowerLimitInRadians, btScalar angleUpperLimitInRadians)
342 {
343  if(angleLowerLimitInRadians >= angleUpperLimitInRadians)
344  {
345  return angleInRadians;
346  }
347  else if(angleInRadians < angleLowerLimitInRadians)
348  {
349  btScalar diffLo = btFabs(btNormalizeAngle(angleLowerLimitInRadians - angleInRadians));
350  btScalar diffHi = btFabs(btNormalizeAngle(angleUpperLimitInRadians - angleInRadians));
351  return (diffLo < diffHi) ? angleInRadians : (angleInRadians + SIMD_2_PI);
352  }
353  else if(angleInRadians > angleUpperLimitInRadians)
354  {
355  btScalar diffHi = btFabs(btNormalizeAngle(angleInRadians - angleUpperLimitInRadians));
356  btScalar diffLo = btFabs(btNormalizeAngle(angleInRadians - angleLowerLimitInRadians));
357  return (diffLo < diffHi) ? (angleInRadians - SIMD_2_PI) : angleInRadians;
358  }
359  else
360  {
361  return angleInRadians;
362  }
363 }
364 
367 {
370  char *m_name;
371 
376 
379 
382 
385 
386 };
387 
389 
390 #define BT_BACKWARDS_COMPATIBLE_SERIALIZATION
391 #ifdef BT_BACKWARDS_COMPATIBLE_SERIALIZATION
394 {
397  char *m_name;
398 
403 
406 
409 
412 
413 };
414 #endif //BACKWARDS_COMPATIBLE
415 
417 {
420  char *m_name;
421 
426 
429 
432 
435  char padding[4];
436 
437 };
438 
439 
441 {
442  return sizeof(btTypedConstraintData2);
443 }
444 
445 
446 
448 {
449 private:
450  btScalar
458 
459  bool
461 
462 public:
465  :m_center(0.0f),
466  m_halfRange(-1.0f),
467  m_softness(0.9f),
468  m_biasFactor(0.3f),
469  m_relaxationFactor(1.0f),
470  m_correction(0.0f),
471  m_sign(0.0f),
472  m_solveLimit(false)
473  {}
474 
478  void set(btScalar low, btScalar high, btScalar _softness = 0.9f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f);
479 
482  void test(const btScalar angle);
483 
485  inline btScalar getSoftness() const
486  {
487  return m_softness;
488  }
489 
491  inline btScalar getBiasFactor() const
492  {
493  return m_biasFactor;
494  }
495 
498  {
499  return m_relaxationFactor;
500  }
501 
503  inline btScalar getCorrection() const
504  {
505  return m_correction;
506  }
507 
509  inline btScalar getSign() const
510  {
511  return m_sign;
512  }
513 
515  inline btScalar getHalfRange() const
516  {
517  return m_halfRange;
518  }
519 
521  inline bool isLimit() const
522  {
523  return m_solveLimit;
524  }
525 
528  void fit(btScalar& angle) const;
529 
531  btScalar getError() const;
532 
533  btScalar getLow() const;
534 
535  btScalar getHigh() const;
536 
537 };
538 
539 
540 
541 #endif //BT_TYPED_CONSTRAINT_H
btTypedConstraint::internalSetAppliedImpulse
void internalSetAppliedImpulse(btScalar appliedImpulse)
internal method used by the constraint solver, don't use them directly
Definition: btTypedConstraint.h:186
btTypedConstraint::btConstraintInfo2::m_damping
btScalar m_damping
Definition: btTypedConstraint.h:152
btSolverBody
The btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packe...
Definition: btSolverBody.h:108
btTypedConstraintFloatData::m_objectType
int m_objectType
Definition: btTypedConstraint.h:372
BT_CONSTRAINT_CFM
@ BT_CONSTRAINT_CFM
Definition: btTypedConstraint.h:56
btTypedConstraint
TypedConstraint is the baseclass for Bullet constraints and vehicles.
Definition: btTypedConstraint.h:78
btTypedConstraintFloatData::m_name
char * m_name
Definition: btTypedConstraint.h:370
btTypedConstraint::getRigidBodyA
btRigidBody & getRigidBodyA()
Definition: btTypedConstraint.h:231
btTypedConstraint::getUserConstraintPtr
void * getUserConstraintPtr()
Definition: btTypedConstraint.h:265
btTypedConstraint::getJointFeedback
btJointFeedback * getJointFeedback()
Definition: btTypedConstraint.h:280
btTypedConstraint::setUserConstraintPtr
void setUserConstraintPtr(void *ptr)
Definition: btTypedConstraint.h:260
btTypedConstraintData::m_userConstraintId
int m_userConstraintId
Definition: btTypedConstraint.h:401
btRigidBody
The btRigidBody is the main class for rigid body objects.
Definition: btRigidBody.h:62
btAngularLimit::btAngularLimit
btAngularLimit()
Default constructor initializes limit as inactive, allowing free constraint movement.
Definition: btTypedConstraint.h:464
btTypedConstraintFloatData::m_dbgDrawSize
float m_dbgDrawSize
Definition: btTypedConstraint.h:378
btAngularLimit::test
void test(const btScalar angle)
Checks conastaint angle against limit.
Definition: btTypedConstraint.cpp:165
btTypedConstraintDoubleData::m_appliedImpulse
double m_appliedImpulse
Definition: btTypedConstraint.h:427
CONTACT_CONSTRAINT_TYPE
@ CONTACT_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:43
btTypedConstraintDoubleData::m_rbA
btRigidBodyDoubleData * m_rbA
Definition: btTypedConstraint.h:418
btTypedConstraintData::m_appliedImpulse
float m_appliedImpulse
Definition: btTypedConstraint.h:404
btTypedConstraint::m_userConstraintPtr
void * m_userConstraintPtr
Definition: btTypedConstraint.h:85
btAngularLimit::getHalfRange
btScalar getHalfRange() const
Gives half of the distance between min and max limit angle.
Definition: btTypedConstraint.h:515
btAngularLimit::m_relaxationFactor
btScalar m_relaxationFactor
Definition: btTypedConstraint.h:455
btTypedConstraint::setUserConstraintId
void setUserConstraintId(int uid)
Definition: btTypedConstraint.h:250
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:292
btAngularLimit::m_halfRange
btScalar m_halfRange
Definition: btTypedConstraint.h:452
btTypedConstraint::getRigidBodyA
const btRigidBody & getRigidBodyA() const
Definition: btTypedConstraint.h:222
btTypedConstraint::getBreakingImpulseThreshold
btScalar getBreakingImpulseThreshold() const
Definition: btTypedConstraint.h:197
btAngularLimit::getCorrection
btScalar getCorrection() const
Returns correction value evaluated when test() was invoked.
Definition: btTypedConstraint.h:503
btTypedConstraintFloatData::m_breakingImpulseThreshold
float m_breakingImpulseThreshold
Definition: btTypedConstraint.h:383
btTypedConstraint::m_jointFeedback
btJointFeedback * m_jointFeedback
Definition: btTypedConstraint.h:106
btTypedConstraint::enableFeedback
void enableFeedback(bool needsFeedback)
enableFeedback will allow to read the applied linear and angular impulse use getAppliedImpulse,...
Definition: btTypedConstraint.h:298
btTypedConstraintDoubleData::m_dbgDrawSize
double m_dbgDrawSize
Definition: btTypedConstraint.h:428
CONETWIST_CONSTRAINT_TYPE
@ CONETWIST_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:40
btTypedConstraintData::m_dbgDrawSize
float m_dbgDrawSize
Definition: btTypedConstraint.h:405
btTypedConstraint::getJointFeedback
const btJointFeedback * getJointFeedback() const
Definition: btTypedConstraint.h:275
btTypedConstraint::getUserConstraintType
int getUserConstraintType() const
Definition: btTypedConstraint.h:240
btTypedConstraintDoubleData::m_needsFeedback
int m_needsFeedback
Definition: btTypedConstraint.h:425
btAngularLimit::getSoftness
btScalar getSoftness() const
Returns limit's softness.
Definition: btTypedConstraint.h:485
btRigidBody.h
btTypedConstraint::operator=
btTypedConstraint & operator=(btTypedConstraint &other)
Definition: btTypedConstraint.h:94
btJointFeedback
Definition: btTypedConstraint.h:67
btAngularLimit::getRelaxationFactor
btScalar getRelaxationFactor() const
Returns limit's relaxation factor.
Definition: btTypedConstraint.h:497
btTypedConstraint::btConstraintInfo2::m_J2linearAxis
btScalar * m_J2linearAxis
Definition: btTypedConstraint.h:135
btTypedConstraintDoubleData::m_userConstraintType
int m_userConstraintType
Definition: btTypedConstraint.h:423
btTypedConstraintFloatData::m_disableCollisionsBetweenLinkedBodies
int m_disableCollisionsBetweenLinkedBodies
Definition: btTypedConstraint.h:380
btScalar.h
btTypedConstraintData::m_overrideNumSolverIterations
int m_overrideNumSolverIterations
Definition: btTypedConstraint.h:408
btTypedConstraintDoubleData::m_rbB
btRigidBodyDoubleData * m_rbB
Definition: btTypedConstraint.h:419
btTypedConstraint::getUid
int getUid() const
Definition: btTypedConstraint.h:286
btAngularLimit::getBiasFactor
btScalar getBiasFactor() const
Returns limit's bias factor.
Definition: btTypedConstraint.h:491
btTypedConstraintFloatData::m_userConstraintId
int m_userConstraintId
Definition: btTypedConstraint.h:374
btTypedConstraintDoubleData::padding
char padding[4]
Definition: btTypedConstraint.h:435
btTypedConstraint::getRigidBodyB
const btRigidBody & getRigidBodyB() const
Definition: btTypedConstraint.h:226
MAX_CONSTRAINT_TYPE
@ MAX_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:48
BT_CONSTRAINT_STOP_ERP
@ BT_CONSTRAINT_STOP_ERP
Definition: btTypedConstraint.h:55
FIXED_CONSTRAINT_TYPE
@ FIXED_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:46
btJointFeedback::m_appliedForceBodyB
btVector3 m_appliedForceBodyB
Definition: btTypedConstraint.h:72
btTypedConstraint::m_needsFeedback
bool m_needsFeedback
Definition: btTypedConstraint.h:90
btAssert
#define btAssert(x)
Definition: btScalar.h:131
btTypedConstraintData::m_rbB
btRigidBodyData * m_rbB
Definition: btTypedConstraint.h:396
btFabs
btScalar btFabs(btScalar x)
Definition: btScalar.h:475
btJointFeedback::m_appliedForceBodyA
btVector3 m_appliedForceBodyA
Definition: btTypedConstraint.h:70
SLIDER_CONSTRAINT_TYPE
@ SLIDER_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:42
btTypedConstraint::isEnabled
bool isEnabled() const
Definition: btTypedConstraint.h:207
btTypedConstraintDoubleData::m_breakingImpulseThreshold
double m_breakingImpulseThreshold
Definition: btTypedConstraint.h:433
btTypedConstraint::setOverrideNumSolverIterations
void setOverrideNumSolverIterations(int overideNumIterations)
override the number of constraint solver iterations used to solve this constraint -1 will use the def...
Definition: btTypedConstraint.h:162
btAngularLimit::set
void set(btScalar low, btScalar high, btScalar _softness=0.9f, btScalar _biasFactor=0.3f, btScalar _relaxationFactor=1.0f)
Sets all limit's parameters.
Definition: btTypedConstraint.cpp:156
btRigidBodyData
#define btRigidBodyData
Definition: btRigidBody.h:36
HINGE_CONSTRAINT_TYPE
@ HINGE_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:39
btAngularLimit::getSign
btScalar getSign() const
Returns sign value evaluated when test() was invoked.
Definition: btTypedConstraint.h:509
btTypedConstraint::setDbgDrawSize
void setDbgDrawSize(btScalar dbgDrawSize)
Definition: btTypedConstraint.h:316
btTypedConstraint::m_overrideNumSolverIterations
int m_overrideNumSolverIterations
Definition: btTypedConstraint.h:91
btNormalizeAngle
btScalar btNormalizeAngle(btScalar angleInRadians)
Definition: btScalar.h:759
btTypedConstraint::getOverrideNumSolverIterations
int getOverrideNumSolverIterations() const
Definition: btTypedConstraint.h:155
btTypedConstraint::~btTypedConstraint
virtual ~btTypedConstraint()
Definition: btTypedConstraint.h:116
btTypedConstraint::needsFeedback
bool needsFeedback() const
Definition: btTypedConstraint.h:291
btAngularLimit::isLimit
bool isLimit() const
Returns true when the last test() invocation recognized limit violation.
Definition: btTypedConstraint.h:521
btTypedConstraintFloatData::m_rbB
btRigidBodyFloatData * m_rbB
Definition: btTypedConstraint.h:369
btTypedConstraintFloatData::m_needsFeedback
int m_needsFeedback
Definition: btTypedConstraint.h:375
btAngularLimit
Definition: btTypedConstraint.h:447
POINT2POINT_CONSTRAINT_TYPE
@ POINT2POINT_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:38
btTypedConstraint::btConstraintInfo2::m_constraintError
btScalar * m_constraintError
Definition: btTypedConstraint.h:143
BT_CONSTRAINT_STOP_CFM
@ BT_CONSTRAINT_STOP_CFM
Definition: btTypedConstraint.h:57
btTypedConstraint::setBreakingImpulseThreshold
void setBreakingImpulseThreshold(btScalar threshold)
Definition: btTypedConstraint.h:202
GEAR_CONSTRAINT_TYPE
@ GEAR_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:45
btTypedConstraint::getAppliedImpulse
btScalar getAppliedImpulse() const
getAppliedImpulse is an estimated total applied impulse.
Definition: btTypedConstraint.h:305
btTypedConstraintDoubleData::m_overrideNumSolverIterations
int m_overrideNumSolverIterations
Definition: btTypedConstraint.h:431
btTypedConstraint::m_breakingImpulseThreshold
btScalar m_breakingImpulseThreshold
Definition: btTypedConstraint.h:88
BT_DECLARE_ALIGNED_ALLOCATOR
#define BT_DECLARE_ALIGNED_ALLOCATOR()
Definition: btScalar.h:403
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:83
btTypedConstraint::btConstraintInfo1
Definition: btTypedConstraint.h:120
btTypedConstraint::setUserConstraintType
void setUserConstraintType(int userConstraintType)
Definition: btTypedConstraint.h:245
btAngularLimit::fit
void fit(btScalar &angle) const
Checks given angle against limit.
Definition: btTypedConstraint.cpp:195
btAngularLimit::m_biasFactor
btScalar m_biasFactor
Definition: btTypedConstraint.h:454
D6_SPRING_2_CONSTRAINT_TYPE
@ D6_SPRING_2_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:47
btTypedConstraintData::m_objectType
int m_objectType
Definition: btTypedConstraint.h:399
btRigidBodyDoubleData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btRigidBody.h:590
btTypedConstraint::m_isEnabled
bool m_isEnabled
Definition: btTypedConstraint.h:89
btTypedConstraintFloatData::m_overrideNumSolverIterations
int m_overrideNumSolverIterations
Definition: btTypedConstraint.h:381
btRigidBodyFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btRigidBody.h:564
btTypedConstraintData::m_needsFeedback
int m_needsFeedback
Definition: btTypedConstraint.h:402
btTypedConstraint::btConstraintInfo2::rowskip
int rowskip
Definition: btTypedConstraint.h:138
btAngularLimit::getLow
btScalar getLow() const
Definition: btTypedConstraint.cpp:214
ATTRIBUTE_ALIGNED16
#define ATTRIBUTE_ALIGNED16(a)
Definition: btScalar.h:82
btTypedConstraint::m_appliedImpulse
btScalar m_appliedImpulse
Definition: btTypedConstraint.h:104
btTypedConstraint::calculateSerializeBufferSize
virtual int calculateSerializeBufferSize() const
Definition: btTypedConstraint.h:440
D6_SPRING_CONSTRAINT_TYPE
@ D6_SPRING_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:44
btAngularLimit::getHigh
btScalar getHigh() const
Definition: btTypedConstraint.cpp:219
btTypedConstraint::m_dbgDrawSize
btScalar m_dbgDrawSize
Definition: btTypedConstraint.h:105
btTypedConstraint::btConstraintInfo1::nub
int nub
Definition: btTypedConstraint.h:121
btTypedConstraintFloatData::m_rbA
btRigidBodyFloatData * m_rbA
Definition: btTypedConstraint.h:368
btAlignedObjectArray< btSolverConstraint >
btTypedConstraintDoubleData::m_isEnabled
int m_isEnabled
Definition: btTypedConstraint.h:434
btTypedConstraint::internalGetAppliedImpulse
btScalar internalGetAppliedImpulse()
internal method used by the constraint solver, don't use them directly
Definition: btTypedConstraint.h:191
D6_CONSTRAINT_TYPE
@ D6_CONSTRAINT_TYPE
Definition: btTypedConstraint.h:41
btTypedConstraintDoubleData::m_userConstraintId
int m_userConstraintId
Definition: btTypedConstraint.h:424
BT_CONSTRAINT_ERP
@ BT_CONSTRAINT_ERP
Definition: btTypedConstraint.h:54
btAngularLimit::m_correction
btScalar m_correction
Definition: btTypedConstraint.h:456
SIMD_FORCE_INLINE
#define SIMD_FORCE_INLINE
Definition: btScalar.h:81
btTypedConstraint::solveConstraintObsolete
virtual void solveConstraintObsolete(btSolverBody &, btSolverBody &, btScalar)
internal method used by the constraint solver, don't use them directly
Definition: btTypedConstraint.h:219
btSerializer
Definition: btSerializer.h:68
btJointFeedback::m_appliedTorqueBodyB
btVector3 m_appliedTorqueBodyB
Definition: btTypedConstraint.h:73
btTypedConstraint::getRigidBodyB
btRigidBody & getRigidBodyB()
Definition: btTypedConstraint.h:235
btTypedObject
rudimentary class to provide type info
Definition: btScalar.h:777
btTypedConstraintData
this structure is not used, except for loading pre-2.82 .bullet files
Definition: btTypedConstraint.h:393
btTypedConstraint::getDbgDrawSize
btScalar getDbgDrawSize()
Definition: btTypedConstraint.h:320
btTypedConstraint::btConstraintInfo2::m_numIterations
int m_numIterations
Definition: btTypedConstraint.h:149
btAngularLimit::getError
btScalar getError() const
Returns correction value multiplied by sign value.
Definition: btTypedConstraint.cpp:190
btAngularLimit::m_softness
btScalar m_softness
Definition: btTypedConstraint.h:453
btTypedConstraint::setEnabled
void setEnabled(bool enabled)
Definition: btTypedConstraint.h:212
btTypedConstraint::btConstraintInfo2
Definition: btTypedConstraint.h:126
btAdjustAngleToLimits
btScalar btAdjustAngleToLimits(btScalar angleInRadians, btScalar angleLowerLimitInRadians, btScalar angleUpperLimitInRadians)
Definition: btTypedConstraint.h:341
btAngularLimit::m_solveLimit
bool m_solveLimit
Definition: btTypedConstraint.h:460
btTypedConstraintFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btTypedConstraint.h:366
btTypedConstraintDoubleData::m_disableCollisionsBetweenLinkedBodies
int m_disableCollisionsBetweenLinkedBodies
Definition: btTypedConstraint.h:430
btTypedConstraint::m_rbB
btRigidBody & m_rbB
Definition: btTypedConstraint.h:103
btTypedConstraintFloatData::m_isEnabled
int m_isEnabled
Definition: btTypedConstraint.h:384
btTypedConstraintDoubleData::m_objectType
int m_objectType
Definition: btTypedConstraint.h:422
btTypedConstraintData2
#define btTypedConstraintData2
Definition: btTypedConstraint.h:28
btJointFeedback::m_appliedTorqueBodyA
btVector3 m_appliedTorqueBodyA
Definition: btTypedConstraint.h:71
btTypedConstraint::btConstraintInfo2::fps
btScalar fps
Definition: btTypedConstraint.h:129
btTypedConstraintFloatData::m_appliedImpulse
float m_appliedImpulse
Definition: btTypedConstraint.h:377
btTypedConstraint::m_userConstraintId
int m_userConstraintId
Definition: btTypedConstraint.h:84
btTypedConstraintDoubleData::m_name
char * m_name
Definition: btTypedConstraint.h:420
btTypedConstraintData::m_userConstraintType
int m_userConstraintType
Definition: btTypedConstraint.h:400
btTypedConstraint::setupSolverConstraint
virtual void setupSolverConstraint(btConstraintArray &ca, int solverBodyA, int solverBodyB, btScalar timeStep)
internal method used by the constraint solver, don't use them directly
Definition: btTypedConstraint.h:171
btSolverConstraint.h
btAngularLimit::m_center
btScalar m_center
Definition: btTypedConstraint.h:451
btTypedConstraintData::m_rbA
btRigidBodyData * m_rbA
Definition: btTypedConstraint.h:395
btTypedConstraint::getConstraintType
btTypedConstraintType getConstraintType() const
Definition: btTypedConstraint.h:311
btTypedConstraintData::m_isEnabled
int m_isEnabled
Definition: btTypedConstraint.h:411
SIMD_2_PI
#define SIMD_2_PI
Definition: btScalar.h:505
btTypedConstraint::btConstraintInfo2::m_upperLimit
btScalar * m_upperLimit
Definition: btTypedConstraint.h:146
btTypedConstraintFloatData::m_userConstraintType
int m_userConstraintType
Definition: btTypedConstraint.h:373
btTypedConstraintData::m_breakingImpulseThreshold
float m_breakingImpulseThreshold
Definition: btTypedConstraint.h:410
btTypedConstraintData::m_disableCollisionsBetweenLinkedBodies
int m_disableCollisionsBetweenLinkedBodies
Definition: btTypedConstraint.h:407
btTypedConstraint::m_rbA
btRigidBody & m_rbA
Definition: btTypedConstraint.h:102
btConstraintParams
btConstraintParams
Definition: btTypedConstraint.h:52
btAngularLimit::m_sign
btScalar m_sign
Definition: btTypedConstraint.h:457
btTypedConstraintData::m_name
char * m_name
Definition: btTypedConstraint.h:397
btTypedConstraintType
btTypedConstraintType
Definition: btTypedConstraint.h:36
btTypedConstraint::m_userConstraintType
int m_userConstraintType
Definition: btTypedConstraint.h:80
btTypedConstraint::setJointFeedback
void setJointFeedback(btJointFeedback *jointFeedback)
Definition: btTypedConstraint.h:270
btTypedConstraint::getUserConstraintId
int getUserConstraintId() const
Definition: btTypedConstraint.h:255
btTypedConstraint::buildJacobian
virtual void buildJacobian()
internal method used by the constraint solver, don't use them directly
Definition: btTypedConstraint.h:168
btTypedConstraintDoubleData
Definition: btTypedConstraint.h:416