Bullet Collision Detection & Physics Library: btRigidBody.h Source File

Bullet Collision Detection & Physics Library

btRigidBody.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_RIGIDBODY_H
17 #define BT_RIGIDBODY_H
18
19 #include "LinearMath/btAlignedObjectArray.h"
20 #include "LinearMath/btTransform.h"
21 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
22 #include "BulletCollision/CollisionDispatch/btCollisionObject.h"
23
24 class btCollisionShape;
25 class btMotionState;
26 class btTypedConstraint;
27
28 extern btScalar gDeactivationTime;
29 extern bool gDisableDeactivation;
30
31 #ifdef BT_USE_DOUBLE_PRECISION
32 #define btRigidBodyData btRigidBodyDoubleData
33 #define btRigidBodyDataName "btRigidBodyDoubleData"
34 #else
35 #define btRigidBodyData btRigidBodyFloatData
36 #define btRigidBodyDataName "btRigidBodyFloatData"
37 #endif //BT_USE_DOUBLE_PRECISION
38
39 enum btRigidBodyFlags
40 {
41 BT_DISABLE_WORLD_GRAVITY = 1,
45 BT_ENABLE_GYROSCOPIC_FORCE_EXPLICIT = 2,
46 BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_WORLD = 4,
47 BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY = 8,
48 BT_ENABLE_GYROPSCOPIC_FORCE = BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY,
49 };
50
59 class btRigidBody : public btCollisionObject
60 {
61 btMatrix3x3 m_invInertiaTensorWorld;
62 btVector3 m_linearVelocity;
63 btVector3 m_angularVelocity;
64 btScalar m_inverseMass;
65 btVector3 m_linearFactor;
66
67 btVector3 m_gravity;
68 btVector3 m_gravity_acceleration;
69 btVector3 m_invInertiaLocal;
70 btVector3 m_totalForce;
71 btVector3 m_totalTorque;
72
73 btScalar m_linearDamping;
74 btScalar m_angularDamping;
75
76 bool m_additionalDamping;
77 btScalar m_additionalDampingFactor;
78 btScalar m_additionalLinearDampingThresholdSqr;
79 btScalar m_additionalAngularDampingThresholdSqr;
80 btScalar m_additionalAngularDampingFactor;
81
82 btScalar m_linearSleepingThreshold;
83 btScalar m_angularSleepingThreshold;
84
85 //m_optionalMotionState allows to automatic synchronize the world transform for active objects
86 btMotionState* m_optionalMotionState;
87
88 //keep track of typed constraints referencing this rigid body, to disable collision between linked bodies
89 btAlignedObjectArray<btTypedConstraint*> m_constraintRefs;
90
91 int m_rigidbodyFlags;
92
93 int m_debugBodyId;
94
95 protected:
96 ATTRIBUTE_ALIGNED16(btVector3 m_deltaLinearVelocity);
97 btVector3 m_deltaAngularVelocity;
98 btVector3 m_angularFactor;
99 btVector3 m_invMass;
100 btVector3 m_pushVelocity;
101 btVector3 m_turnVelocity;
102
103 public:
109 struct btRigidBodyConstructionInfo
110 {
111 btScalar m_mass;
112
115 btMotionState* m_motionState;
116 btTransform m_startWorldTransform;
117
118 btCollisionShape* m_collisionShape;
119 btVector3 m_localInertia;
120 btScalar m_linearDamping;
121 btScalar m_angularDamping;
122
124 btScalar m_friction;
127 btScalar m_rollingFriction;
128 btScalar m_spinningFriction; //torsional friction around contact normal
129
131 btScalar m_restitution;
132
133 btScalar m_linearSleepingThreshold;
134 btScalar m_angularSleepingThreshold;
135
136 //Additional damping can help avoiding lowpass jitter motion, help stability for ragdolls etc.
137 //Such damping is undesirable, so once the overall simulation quality of the rigid body dynamics system has improved, this should become obsolete
138 bool m_additionalDamping;
139 btScalar m_additionalDampingFactor;
140 btScalar m_additionalLinearDampingThresholdSqr;
141 btScalar m_additionalAngularDampingThresholdSqr;
142 btScalar m_additionalAngularDampingFactor;
143
144 btRigidBodyConstructionInfo(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia = btVector3(0, 0, 0)) : m_mass(mass),
145 m_motionState(motionState),
146 m_collisionShape(collisionShape),
147 m_localInertia(localInertia),
148 m_linearDamping(btScalar(0.)),
149 m_angularDamping(btScalar(0.)),
150 m_friction(btScalar(0.5)),
151 m_rollingFriction(btScalar(0)),
152 m_spinningFriction(btScalar(0)),
153 m_restitution(btScalar(0.)),
154 m_linearSleepingThreshold(btScalar(0.8)),
155 m_angularSleepingThreshold(btScalar(1.f)),
156 m_additionalDamping(false),
157 m_additionalDampingFactor(btScalar(0.005)),
158 m_additionalLinearDampingThresholdSqr(btScalar(0.01)),
159 m_additionalAngularDampingThresholdSqr(btScalar(0.01)),
160 m_additionalAngularDampingFactor(btScalar(0.01))
161 {
162 m_startWorldTransform.setIdentity();
163 }
164 };
165
167 btRigidBody(const btRigidBodyConstructionInfo& constructionInfo);
168
171 btRigidBody(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia = btVector3(0, 0, 0));
172
173 virtual ~btRigidBody()
174 {
175 //No constraints should point to this rigidbody
176 //Remove constraints from the dynamics world before you delete the related rigidbodies.
177 btAssert(m_constraintRefs.size() == 0);
178 }
179
180 protected:
182 void setupRigidBody(const btRigidBodyConstructionInfo& constructionInfo);
183
184 public:
185 void proceedToTransform(const btTransform& newTrans);
186
189 static const btRigidBody* upcast(const btCollisionObject* colObj)
190 {
191 if (colObj->getInternalType() & btCollisionObject::CO_RIGID_BODY)
192 return (const btRigidBody*)colObj;
193 return 0;
194 }
195 static btRigidBody* upcast(btCollisionObject* colObj)
196 {
197 if (colObj->getInternalType() & btCollisionObject::CO_RIGID_BODY)
198 return (btRigidBody*)colObj;
199 return 0;
200 }
201
203 void predictIntegratedTransform(btScalar step, btTransform& predictedTransform);
204
205 void saveKinematicState(btScalar step);
206
207 void applyGravity();
208
209 void clearGravity();
210
211 void setGravity(const btVector3& acceleration);
212
213 const btVector3& getGravity() const
214 {
215 return m_gravity_acceleration;
216 }
217
218 void setDamping(btScalar lin_damping, btScalar ang_damping);
219
220 btScalar getLinearDamping() const
221 {
222 return m_linearDamping;
223 }
224
225 btScalar getAngularDamping() const
226 {
227 return m_angularDamping;
228 }
229
230 btScalar getLinearSleepingThreshold() const
231 {
232 return m_linearSleepingThreshold;
233 }
234
235 btScalar getAngularSleepingThreshold() const
236 {
237 return m_angularSleepingThreshold;
238 }
239
240 void applyDamping(btScalar timeStep);
241
242 SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const
243 {
244 return m_collisionShape;
245 }
246
247 SIMD_FORCE_INLINE btCollisionShape* getCollisionShape()
248 {
249 return m_collisionShape;
250 }
251
252 void setMassProps(btScalar mass, const btVector3& inertia);
253
254 const btVector3& getLinearFactor() const
255 {
256 return m_linearFactor;
257 }
258 void setLinearFactor(const btVector3& linearFactor)
259 {
260 m_linearFactor = linearFactor;
261 m_invMass = m_linearFactor * m_inverseMass;
262 }
263 btScalar getInvMass() const { return m_inverseMass; }
264 btScalar getMass() const { return m_inverseMass == btScalar(0.) ? btScalar(0.) : btScalar(1.0) / m_inverseMass; }
265 const btMatrix3x3& getInvInertiaTensorWorld() const
266 {
267 return m_invInertiaTensorWorld;
268 }
269
270 void integrateVelocities(btScalar step);
271
272 void setCenterOfMassTransform(const btTransform& xform);
273
274 void applyCentralForce(const btVector3& force)
275 {
276 m_totalForce += force * m_linearFactor;
277 }
278
279 const btVector3& getTotalForce() const
280 {
281 return m_totalForce;
282 };
283
284 const btVector3& getTotalTorque() const
285 {
286 return m_totalTorque;
287 };
288
289 const btVector3& getInvInertiaDiagLocal() const
290 {
291 return m_invInertiaLocal;
292 };
293
294 void setInvInertiaDiagLocal(const btVector3& diagInvInertia)
295 {
296 m_invInertiaLocal = diagInvInertia;
297 }
298
299 void setSleepingThresholds(btScalar linear, btScalar angular)
300 {
301 m_linearSleepingThreshold = linear;
302 m_angularSleepingThreshold = angular;
303 }
304
305 void applyTorque(const btVector3& torque)
306 {
307 m_totalTorque += torque * m_angularFactor;
308 #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
309 clampVelocity(m_totalTorque);
310 #endif
311 }
312
313 void applyForce(const btVector3& force, const btVector3& rel_pos)
314 {
315 applyCentralForce(force);
316 applyTorque(rel_pos.cross(force * m_linearFactor));
317 }
318
319 void applyCentralImpulse(const btVector3& impulse)
320 {
321 m_linearVelocity += impulse * m_linearFactor * m_inverseMass;
322 #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
323 clampVelocity(m_linearVelocity);
324 #endif
325 }
326
327 void applyTorqueImpulse(const btVector3& torque)
328 {
329 m_angularVelocity += m_invInertiaTensorWorld * torque * m_angularFactor;
330 #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
331 clampVelocity(m_angularVelocity);
332 #endif
333 }
334
335 void applyImpulse(const btVector3& impulse, const btVector3& rel_pos)
336 {
337 if (m_inverseMass != btScalar(0.))
338 {
339 applyCentralImpulse(impulse);
340 if (m_angularFactor)
341 {
342 applyTorqueImpulse(rel_pos.cross(impulse * m_linearFactor));
343 }
344 }
345 }
346
347 void applyPushImpulse(const btVector3& impulse, const btVector3& rel_pos)
348 {
349 if (m_inverseMass != btScalar(0.))
350 {
351 applyCentralPushImpulse(impulse);
352 if (m_angularFactor)
353 {
354 applyTorqueTurnImpulse(rel_pos.cross(impulse * m_linearFactor));
355 }
356 }
357 }
358
359 btVector3 getPushVelocity() const
360 {
361 return m_pushVelocity;
362 }
363
364 btVector3 getTurnVelocity() const
365 {
366 return m_turnVelocity;
367 }
368
369 void setPushVelocity(const btVector3& v)
370 {
371 m_pushVelocity = v;
372 }
373
374 #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
375 void clampVelocity(btVector3& v) const {
376 v.setX(
377 fmax(-BT_CLAMP_VELOCITY_TO,
378 fmin(BT_CLAMP_VELOCITY_TO, v.getX()))
379 );
380 v.setY(
381 fmax(-BT_CLAMP_VELOCITY_TO,
382 fmin(BT_CLAMP_VELOCITY_TO, v.getY()))
383 );
384 v.setZ(
385 fmax(-BT_CLAMP_VELOCITY_TO,
386 fmin(BT_CLAMP_VELOCITY_TO, v.getZ()))
387 );
388 }
389 #endif
390
391 void setTurnVelocity(const btVector3& v)
392 {
393 m_turnVelocity = v;
394 #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
395 clampVelocity(m_turnVelocity);
396 #endif
397 }
398
399 void applyCentralPushImpulse(const btVector3& impulse)
400 {
401 m_pushVelocity += impulse * m_linearFactor * m_inverseMass;
402 #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
403 clampVelocity(m_pushVelocity);
404 #endif
405 }
406
407 void applyTorqueTurnImpulse(const btVector3& torque)
408 {
409 m_turnVelocity += m_invInertiaTensorWorld * torque * m_angularFactor;
410 #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
411 clampVelocity(m_turnVelocity);
412 #endif
413 }
414
415 void clearForces()
416 {
417 m_totalForce.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0));
418 m_totalTorque.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0));
419 }
420
421 void updateInertiaTensor();
422
423 const btVector3& getCenterOfMassPosition() const
424 {
425 return m_worldTransform.getOrigin();
426 }
427 btQuaternion getOrientation() const;
428
429 const btTransform& getCenterOfMassTransform() const
430 {
431 return m_worldTransform;
432 }
433 const btVector3& getLinearVelocity() const
434 {
435 return m_linearVelocity;
436 }
437 const btVector3& getAngularVelocity() const
438 {
439 return m_angularVelocity;
440 }
441
442 inline void setLinearVelocity(const btVector3& lin_vel)
443 {
444 m_updateRevision++;
445 m_linearVelocity = lin_vel;
446 #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
447 clampVelocity(m_linearVelocity);
448 #endif
449 }
450
451 inline void setAngularVelocity(const btVector3& ang_vel)
452 {
453 m_updateRevision++;
454 m_angularVelocity = ang_vel;
455 #if defined(BT_CLAMP_VELOCITY_TO) && BT_CLAMP_VELOCITY_TO > 0
456 clampVelocity(m_angularVelocity);
457 #endif
458 }
459
460 btVector3 getVelocityInLocalPoint(const btVector3& rel_pos) const
461 {
462 //we also calculate lin/ang velocity for kinematic objects
463 return m_linearVelocity + m_angularVelocity.cross(rel_pos);
464
465 //for kinematic objects, we could also use use:
466 // return (m_worldTransform(rel_pos) - m_interpolationWorldTransform(rel_pos)) / m_kinematicTimeStep;
467 }
468
469 btVector3 getPushVelocityInLocalPoint(const btVector3& rel_pos) const
470 {
471 //we also calculate lin/ang velocity for kinematic objects
472 return m_pushVelocity + m_turnVelocity.cross(rel_pos);
473 }
474
475 void translate(const btVector3& v)
476 {
477 m_worldTransform.getOrigin() += v;
478 }
479
480 void getAabb(btVector3& aabbMin, btVector3& aabbMax) const;
481
482 SIMD_FORCE_INLINE btScalar computeImpulseDenominator(const btVector3& pos, const btVector3& normal) const
483 {
484 btVector3 r0 = pos - getCenterOfMassPosition();
485
486 btVector3 c0 = (r0).cross(normal);
487
488 btVector3 vec = (c0 * getInvInertiaTensorWorld()).cross(r0);
489
490 return m_inverseMass + normal.dot(vec);
491 }
492
493 SIMD_FORCE_INLINE btScalar computeAngularImpulseDenominator(const btVector3& axis) const
494 {
495 btVector3 vec = axis * getInvInertiaTensorWorld();
496 return axis.dot(vec);
497 }
498
499 SIMD_FORCE_INLINE void updateDeactivation(btScalar timeStep)
500 {
501 if ((getActivationState() == ISLAND_SLEEPING) || (getActivationState() == DISABLE_DEACTIVATION))
502 return;
503
504 if ((getLinearVelocity().length2() < m_linearSleepingThreshold * m_linearSleepingThreshold) &&
505 (getAngularVelocity().length2() < m_angularSleepingThreshold * m_angularSleepingThreshold))
506 {
507 m_deactivationTime += timeStep;
508 }
509 else
510 {
511 m_deactivationTime = btScalar(0.);
512 setActivationState(0);
513 }
514 }
515
516 SIMD_FORCE_INLINE bool wantsSleeping()
517 {
518 if (getActivationState() == DISABLE_DEACTIVATION)
519 return false;
520
521 //disable deactivation
522 if (gDisableDeactivation || (gDeactivationTime == btScalar(0.)))
523 return false;
524
525 if ((getActivationState() == ISLAND_SLEEPING) || (getActivationState() == WANTS_DEACTIVATION))
526 return true;
527
528 if (m_deactivationTime > gDeactivationTime)
529 {
530 return true;
531 }
532 return false;
533 }
534
535 const btBroadphaseProxy* getBroadphaseProxy() const
536 {
537 return m_broadphaseHandle;
538 }
539 btBroadphaseProxy* getBroadphaseProxy()
540 {
541 return m_broadphaseHandle;
542 }
543 void setNewBroadphaseProxy(btBroadphaseProxy* broadphaseProxy)
544 {
545 m_broadphaseHandle = broadphaseProxy;
546 }
547
548 //btMotionState allows to automatic synchronize the world transform for active objects
549 btMotionState* getMotionState()
550 {
551 return m_optionalMotionState;
552 }
553 const btMotionState* getMotionState() const
554 {
555 return m_optionalMotionState;
556 }
557 void setMotionState(btMotionState* motionState)
558 {
559 m_optionalMotionState = motionState;
560 if (m_optionalMotionState)
561 motionState->getWorldTransform(m_worldTransform);
562 }
563
564 //for experimental overriding of friction/contact solver func
565 int m_contactSolverType;
566 int m_frictionSolverType;
567
568 void setAngularFactor(const btVector3& angFac)
569 {
570 m_updateRevision++;
571 m_angularFactor = angFac;
572 }
573
574 void setAngularFactor(btScalar angFac)
575 {
576 m_updateRevision++;
577 m_angularFactor.setValue(angFac, angFac, angFac);
578 }
579 const btVector3& getAngularFactor() const
580 {
581 return m_angularFactor;
582 }
583
584 //is this rigidbody added to a btCollisionWorld/btDynamicsWorld/btBroadphase?
585 bool isInWorld() const
586 {
587 return (getBroadphaseProxy() != 0);
588 }
589
590 void addConstraintRef(btTypedConstraint* c);
591 void removeConstraintRef(btTypedConstraint* c);
592
593 btTypedConstraint* getConstraintRef(int index)
594 {
595 return m_constraintRefs[index];
596 }
597
598 int getNumConstraintRefs() const
599 {
600 return m_constraintRefs.size();
601 }
602
603 void setFlags(int flags)
604 {
605 m_rigidbodyFlags = flags;
606 }
607
608 int getFlags() const
609 {
610 return m_rigidbodyFlags;
611 }
612
614 btVector3 computeGyroscopicImpulseImplicit_World(btScalar dt) const;
615
617 btVector3 computeGyroscopicImpulseImplicit_Body(btScalar step) const;
618
620 btVector3 computeGyroscopicForceExplicit(btScalar maxGyroscopicForce) const;
621 btVector3 getLocalInertia() const;
622
624
625 virtual int calculateSerializeBufferSize() const;
626
628 virtual const char* serialize(void* dataBuffer, class btSerializer* serializer) const;
629
630 virtual void serializeSingleObject(class btSerializer* serializer) const;
631 };
632
633 //@todo add m_optionalMotionState and m_constraintRefs to btRigidBodyData
635 struct btRigidBodyFloatData
636 {
637 btCollisionObjectFloatData m_collisionObjectData;
638 btMatrix3x3FloatData m_invInertiaTensorWorld;
639 btVector3FloatData m_linearVelocity;
640 btVector3FloatData m_angularVelocity;
641 btVector3FloatData m_angularFactor;
642 btVector3FloatData m_linearFactor;
643 btVector3FloatData m_gravity;
644 btVector3FloatData m_gravity_acceleration;
645 btVector3FloatData m_invInertiaLocal;
646 btVector3FloatData m_totalForce;
647 btVector3FloatData m_totalTorque;
648 float m_inverseMass;
649 float m_linearDamping;
650 float m_angularDamping;
651 float m_additionalDampingFactor;
652 float m_additionalLinearDampingThresholdSqr;
653 float m_additionalAngularDampingThresholdSqr;
654 float m_additionalAngularDampingFactor;
655 float m_linearSleepingThreshold;
656 float m_angularSleepingThreshold;
657 int m_additionalDamping;
658 };
659
661 struct btRigidBodyDoubleData
662 {
663 btCollisionObjectDoubleData m_collisionObjectData;
664 btMatrix3x3DoubleData m_invInertiaTensorWorld;
665 btVector3DoubleData m_linearVelocity;
666 btVector3DoubleData m_angularVelocity;
667 btVector3DoubleData m_angularFactor;
668 btVector3DoubleData m_linearFactor;
669 btVector3DoubleData m_gravity;
670 btVector3DoubleData m_gravity_acceleration;
671 btVector3DoubleData m_invInertiaLocal;
672 btVector3DoubleData m_totalForce;
673 btVector3DoubleData m_totalTorque;
674 double m_inverseMass;
675 double m_linearDamping;
676 double m_angularDamping;
677 double m_additionalDampingFactor;
678 double m_additionalLinearDampingThresholdSqr;
679 double m_additionalAngularDampingThresholdSqr;
680 double m_additionalAngularDampingFactor;
681 double m_linearSleepingThreshold;
682 double m_angularSleepingThreshold;
683 int m_additionalDamping;
684 char m_padding[4];
685 };
686
687 #endif //BT_RIGIDBODY_H
btAlignedObjectArray.h
btBroadphaseProxy.h
btCollisionObject.h
DISABLE_DEACTIVATION
#define DISABLE_DEACTIVATION
Definition: btCollisionObject.h:25
WANTS_DEACTIVATION
#define WANTS_DEACTIVATION
Definition: btCollisionObject.h:24
ISLAND_SLEEPING
#define ISLAND_SLEEPING
Definition: btCollisionObject.h:23
gDisableDeactivation
bool gDisableDeactivation
Definition: btRigidBody.cpp:26
gDeactivationTime
btScalar gDeactivationTime
Definition: btRigidBody.cpp:25
btRigidBodyFlags
btRigidBodyFlags
Definition: btRigidBody.h:40
BT_ENABLE_GYROPSCOPIC_FORCE
@ BT_ENABLE_GYROPSCOPIC_FORCE
Definition: btRigidBody.h:48
BT_DISABLE_WORLD_GRAVITY
@ BT_DISABLE_WORLD_GRAVITY
Definition: btRigidBody.h:41
BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY
@ BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY
Definition: btRigidBody.h:47
BT_ENABLE_GYROSCOPIC_FORCE_EXPLICIT
@ BT_ENABLE_GYROSCOPIC_FORCE_EXPLICIT
BT_ENABLE_GYROPSCOPIC_FORCE flags is enabled by default in Bullet 2.83 and onwards.
Definition: btRigidBody.h:45
BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_WORLD
@ BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_WORLD
Definition: btRigidBody.h:46
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314
ATTRIBUTE_ALIGNED16
#define ATTRIBUTE_ALIGNED16(a)
Definition: btScalar.h:99
SIMD_FORCE_INLINE
#define SIMD_FORCE_INLINE
Definition: btScalar.h:98
btAssert
#define btAssert(x)
Definition: btScalar.h:153
btTransform.h
btAlignedObjectArray< btTypedConstraint * >
btAlignedObjectArray::size
int size() const
return the number of elements in the array
Definition: btAlignedObjectArray.h:142
btCollisionObject
btCollisionObject can be used to manage collision detection objects.
Definition: btCollisionObject.h:51
btCollisionObject::m_updateRevision
int m_updateRevision
internal update revision number. It will be increased when the object changes. This allows some subsy...
Definition: btCollisionObject.h:122
btCollisionObject::CO_RIGID_BODY
@ CO_RIGID_BODY
Definition: btCollisionObject.h:148
btCollisionObject::m_worldTransform
btTransform m_worldTransform
Definition: btCollisionObject.h:53
btCollisionObject::m_collisionShape
btCollisionShape * m_collisionShape
Definition: btCollisionObject.h:68
btCollisionObject::getInternalType
int getInternalType() const
reserved for Bullet internal usage
Definition: btCollisionObject.h:374
btCollisionObject::setActivationState
void setActivationState(int newState) const
Definition: btCollisionObject.cpp:61
btCollisionObject::m_deactivationTime
btScalar m_deactivationTime
Definition: btCollisionObject.h:84
btCollisionObject::m_broadphaseHandle
btBroadphaseProxy * m_broadphaseHandle
Definition: btCollisionObject.h:67
btCollisionObject::getActivationState
int getActivationState() const
Definition: btCollisionObject.h:289
btCollisionShape
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
Definition: btCollisionShape.h:28
btMatrix3x3
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
Definition: btMatrix3x3.h:50
btMotionState
The btMotionState interface class allows the dynamics world to synchronize and interpolate the update...
Definition: btMotionState.h:24
btMotionState::getWorldTransform
virtual void getWorldTransform(btTransform &worldTrans) const =0
btQuaternion
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
Definition: btQuaternion.h:50
btRigidBody
The btRigidBody is the main class for rigid body objects.
Definition: btRigidBody.h:60
btRigidBody::applyTorqueImpulse
void applyTorqueImpulse(const btVector3 &torque)
Definition: btRigidBody.h:327
btRigidBody::setLinearFactor
void setLinearFactor(const btVector3 &linearFactor)
Definition: btRigidBody.h:258
btRigidBody::getAabb
void getAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
Definition: btRigidBody.cpp:123
btRigidBody::computeAngularImpulseDenominator
btScalar computeAngularImpulseDenominator(const btVector3 &axis) const
Definition: btRigidBody.h:493
btRigidBody::m_additionalAngularDampingFactor
btScalar m_additionalAngularDampingFactor
Definition: btRigidBody.h:80
btRigidBody::getGravity
const btVector3 & getGravity() const
Definition: btRigidBody.h:213
btRigidBody::applyGravity
void applyGravity()
Definition: btRigidBody.cpp:205
btRigidBody::getAngularVelocity
const btVector3 & getAngularVelocity() const
Definition: btRigidBody.h:437
btRigidBody::wantsSleeping
bool wantsSleeping()
Definition: btRigidBody.h:516
btRigidBody::integrateVelocities
void integrateVelocities(btScalar step)
Definition: btRigidBody.cpp:372
btRigidBody::getVelocityInLocalPoint
btVector3 getVelocityInLocalPoint(const btVector3 &rel_pos) const
Definition: btRigidBody.h:460
btRigidBody::addConstraintRef
void addConstraintRef(btTypedConstraint *c)
Definition: btRigidBody.cpp:415
btRigidBody::serializeSingleObject
virtual void serializeSingleObject(class btSerializer *serializer) const
Definition: btRigidBody.cpp:500
btRigidBody::clearForces
void clearForces()
Definition: btRigidBody.h:415
btRigidBody::setNewBroadphaseProxy
void setNewBroadphaseProxy(btBroadphaseProxy *broadphaseProxy)
Definition: btRigidBody.h:543
btRigidBody::m_linearDamping
btScalar m_linearDamping
Definition: btRigidBody.h:73
btRigidBody::setFlags
void setFlags(int flags)
Definition: btRigidBody.h:603
btRigidBody::getFlags
int getFlags() const
Definition: btRigidBody.h:608
btRigidBody::getMotionState
btMotionState * getMotionState()
Definition: btRigidBody.h:549
btRigidBody::m_invInertiaTensorWorld
btMatrix3x3 m_invInertiaTensorWorld
Definition: btRigidBody.h:61
btRigidBody::m_frictionSolverType
int m_frictionSolverType
Definition: btRigidBody.h:566
btRigidBody::m_invInertiaLocal
btVector3 m_invInertiaLocal
Definition: btRigidBody.h:69
btRigidBody::getLinearSleepingThreshold
btScalar getLinearSleepingThreshold() const
Definition: btRigidBody.h:230
btRigidBody::upcast
static btRigidBody * upcast(btCollisionObject *colObj)
Definition: btRigidBody.h:195
btRigidBody::getLinearFactor
const btVector3 & getLinearFactor() const
Definition: btRigidBody.h:254
btRigidBody::applyDamping
void applyDamping(btScalar timeStep)
applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping
Definition: btRigidBody.cpp:149
btRigidBody::m_optionalMotionState
btMotionState * m_optionalMotionState
Definition: btRigidBody.h:86
btRigidBody::m_gravity
btVector3 m_gravity
Definition: btRigidBody.h:67
btRigidBody::m_contactSolverType
int m_contactSolverType
Definition: btRigidBody.h:565
btRigidBody::applyCentralForce
void applyCentralForce(const btVector3 &force)
Definition: btRigidBody.h:274
btRigidBody::getInvMass
btScalar getInvMass() const
Definition: btRigidBody.h:263
btRigidBody::getAngularDamping
btScalar getAngularDamping() const
Definition: btRigidBody.h:225
btRigidBody::serialize
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
Definition: btRigidBody.cpp:465
btRigidBody::getBroadphaseProxy
btBroadphaseProxy * getBroadphaseProxy()
Definition: btRigidBody.h:539
btRigidBody::m_turnVelocity
btVector3 m_turnVelocity
Definition: btRigidBody.h:101
btRigidBody::updateDeactivation
void updateDeactivation(btScalar timeStep)
Definition: btRigidBody.h:499
btRigidBody::m_additionalDampingFactor
btScalar m_additionalDampingFactor
Definition: btRigidBody.h:77
btRigidBody::calculateSerializeBufferSize
virtual int calculateSerializeBufferSize() const
Definition: btRigidBody.cpp:458
btRigidBody::upcast
static const btRigidBody * upcast(const btCollisionObject *colObj)
to keep collision detection and dynamics separate we don't store a rigidbody pointer but a rigidbody ...
Definition: btRigidBody.h:189
btRigidBody::m_rigidbodyFlags
int m_rigidbodyFlags
Definition: btRigidBody.h:91
btRigidBody::m_additionalAngularDampingThresholdSqr
btScalar m_additionalAngularDampingThresholdSqr
Definition: btRigidBody.h:79
btRigidBody::setGravity
void setGravity(const btVector3 &acceleration)
Definition: btRigidBody.cpp:128
btRigidBody::getMotionState
const btMotionState * getMotionState() const
Definition: btRigidBody.h:553
btRigidBody::getMass
btScalar getMass() const
Definition: btRigidBody.h:264
btRigidBody::getTotalTorque
const btVector3 & getTotalTorque() const
Definition: btRigidBody.h:284
btRigidBody::btRigidBody
btRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
btRigidBody constructor using construction info
Definition: btRigidBody.cpp:29
btRigidBody::m_linearSleepingThreshold
btScalar m_linearSleepingThreshold
Definition: btRigidBody.h:82
btRigidBody::getOrientation
btQuaternion getOrientation() const
Definition: btRigidBody.cpp:392
btRigidBody::proceedToTransform
void proceedToTransform(const btTransform &newTrans)
Definition: btRigidBody.cpp:221
btRigidBody::m_linearFactor
btVector3 m_linearFactor
Definition: btRigidBody.h:65
btRigidBody::saveKinematicState
void saveKinematicState(btScalar step)
Definition: btRigidBody.cpp:105
btRigidBody::getLocalInertia
btVector3 getLocalInertia() const
Definition: btRigidBody.cpp:254
btRigidBody::computeGyroscopicImpulseImplicit_World
btVector3 computeGyroscopicImpulseImplicit_World(btScalar dt) const
perform implicit force computation in world space
Definition: btRigidBody.cpp:336
btRigidBody::getBroadphaseProxy
const btBroadphaseProxy * getBroadphaseProxy() const
Definition: btRigidBody.h:535
btRigidBody::m_angularFactor
btVector3 m_angularFactor
Definition: btRigidBody.h:98
btRigidBody::m_totalForce
btVector3 m_totalForce
Definition: btRigidBody.h:70
btRigidBody::m_inverseMass
btScalar m_inverseMass
Definition: btRigidBody.h:64
btRigidBody::computeGyroscopicImpulseImplicit_Body
btVector3 computeGyroscopicImpulseImplicit_Body(btScalar step) const
perform implicit force computation in body space (inertial frame)
Definition: btRigidBody.cpp:297
btRigidBody::applyImpulse
void applyImpulse(const btVector3 &impulse, const btVector3 &rel_pos)
Definition: btRigidBody.h:335
btRigidBody::applyCentralImpulse
void applyCentralImpulse(const btVector3 &impulse)
Definition: btRigidBody.h:319
btRigidBody::m_totalTorque
btVector3 m_totalTorque
Definition: btRigidBody.h:71
btRigidBody::setTurnVelocity
void setTurnVelocity(const btVector3 &v)
Definition: btRigidBody.h:391
btRigidBody::m_angularDamping
btScalar m_angularDamping
Definition: btRigidBody.h:74
btRigidBody::getNumConstraintRefs
int getNumConstraintRefs() const
Definition: btRigidBody.h:598
btRigidBody::removeConstraintRef
void removeConstraintRef(btTypedConstraint *c)
Definition: btRigidBody.cpp:438
btRigidBody::getPushVelocityInLocalPoint
btVector3 getPushVelocityInLocalPoint(const btVector3 &rel_pos) const
Definition: btRigidBody.h:469
btRigidBody::setSleepingThresholds
void setSleepingThresholds(btScalar linear, btScalar angular)
Definition: btRigidBody.h:299
btRigidBody::setMassProps
void setMassProps(btScalar mass, const btVector3 &inertia)
Definition: btRigidBody.cpp:226
btRigidBody::m_deltaAngularVelocity
btVector3 m_deltaAngularVelocity
Definition: btRigidBody.h:97
btRigidBody::getCenterOfMassTransform
const btTransform & getCenterOfMassTransform() const
Definition: btRigidBody.h:429
btRigidBody::getLinearVelocity
const btVector3 & getLinearVelocity() const
Definition: btRigidBody.h:433
btRigidBody::m_pushVelocity
btVector3 m_pushVelocity
Definition: btRigidBody.h:100
btRigidBody::getAngularSleepingThreshold
btScalar getAngularSleepingThreshold() const
Definition: btRigidBody.h:235
btRigidBody::m_additionalDamping
bool m_additionalDamping
Definition: btRigidBody.h:76
btRigidBody::m_debugBodyId
int m_debugBodyId
Definition: btRigidBody.h:93
btRigidBody::setAngularFactor
void setAngularFactor(const btVector3 &angFac)
Definition: btRigidBody.h:568
btRigidBody::applyTorqueTurnImpulse
void applyTorqueTurnImpulse(const btVector3 &torque)
Definition: btRigidBody.h:407
btRigidBody::isInWorld
bool isInWorld() const
Definition: btRigidBody.h:585
btRigidBody::getCenterOfMassPosition
const btVector3 & getCenterOfMassPosition() const
Definition: btRigidBody.h:423
btRigidBody::getTotalForce
const btVector3 & getTotalForce() const
Definition: btRigidBody.h:279
btRigidBody::m_angularSleepingThreshold
btScalar m_angularSleepingThreshold
Definition: btRigidBody.h:83
btRigidBody::getInvInertiaTensorWorld
const btMatrix3x3 & getInvInertiaTensorWorld() const
Definition: btRigidBody.h:265
btRigidBody::~btRigidBody
virtual ~btRigidBody()
Definition: btRigidBody.h:173
btRigidBody::getLinearDamping
btScalar getLinearDamping() const
Definition: btRigidBody.h:220
btRigidBody::clearGravity
void clearGravity()
Definition: btRigidBody.cpp:213
btRigidBody::getConstraintRef
btTypedConstraint * getConstraintRef(int index)
Definition: btRigidBody.h:593
btRigidBody::getCollisionShape
const btCollisionShape * getCollisionShape() const
Definition: btRigidBody.h:242
btRigidBody::m_additionalLinearDampingThresholdSqr
btScalar m_additionalLinearDampingThresholdSqr
Definition: btRigidBody.h:78
btRigidBody::m_linearVelocity
btVector3 m_linearVelocity
Definition: btRigidBody.h:62
btRigidBody::setInvInertiaDiagLocal
void setInvInertiaDiagLocal(const btVector3 &diagInvInertia)
Definition: btRigidBody.h:294
btRigidBody::setAngularVelocity
void setAngularVelocity(const btVector3 &ang_vel)
Definition: btRigidBody.h:451
btRigidBody::setMotionState
void setMotionState(btMotionState *motionState)
Definition: btRigidBody.h:557
btRigidBody::translate
void translate(const btVector3 &v)
Definition: btRigidBody.h:475
btRigidBody::setPushVelocity
void setPushVelocity(const btVector3 &v)
Definition: btRigidBody.h:369
btRigidBody::applyCentralPushImpulse
void applyCentralPushImpulse(const btVector3 &impulse)
Definition: btRigidBody.h:399
btRigidBody::setDamping
void setDamping(btScalar lin_damping, btScalar ang_damping)
Definition: btRigidBody.cpp:137
btRigidBody::m_deltaLinearVelocity
btVector3 m_deltaLinearVelocity
Definition: btRigidBody.h:96
btRigidBody::setAngularFactor
void setAngularFactor(btScalar angFac)
Definition: btRigidBody.h:574
btRigidBody::m_angularVelocity
btVector3 m_angularVelocity
Definition: btRigidBody.h:63
btRigidBody::setLinearVelocity
void setLinearVelocity(const btVector3 &lin_vel)
Definition: btRigidBody.h:442
btRigidBody::applyPushImpulse
void applyPushImpulse(const btVector3 &impulse, const btVector3 &rel_pos)
Definition: btRigidBody.h:347
btRigidBody::setupRigidBody
void setupRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
setupRigidBody is only used internally by the constructor
Definition: btRigidBody.cpp:40
btRigidBody::setCenterOfMassTransform
void setCenterOfMassTransform(const btTransform &xform)
Definition: btRigidBody.cpp:399
btRigidBody::computeImpulseDenominator
btScalar computeImpulseDenominator(const btVector3 &pos, const btVector3 &normal) const
Definition: btRigidBody.h:482
btRigidBody::getAngularFactor
const btVector3 & getAngularFactor() const
Definition: btRigidBody.h:579
btRigidBody::getInvInertiaDiagLocal
const btVector3 & getInvInertiaDiagLocal() const
Definition: btRigidBody.h:289
btRigidBody::m_constraintRefs
btAlignedObjectArray< btTypedConstraint * > m_constraintRefs
Definition: btRigidBody.h:89
btRigidBody::updateInertiaTensor
void updateInertiaTensor()
Definition: btRigidBody.cpp:249
btRigidBody::applyTorque
void applyTorque(const btVector3 &torque)
Definition: btRigidBody.h:305
btRigidBody::applyForce
void applyForce(const btVector3 &force, const btVector3 &rel_pos)
Definition: btRigidBody.h:313
btRigidBody::getPushVelocity
btVector3 getPushVelocity() const
Definition: btRigidBody.h:359
btRigidBody::getTurnVelocity
btVector3 getTurnVelocity() const
Definition: btRigidBody.h:364
btRigidBody::predictIntegratedTransform
void predictIntegratedTransform(btScalar step, btTransform &predictedTransform)
continuous collision detection needs prediction
Definition: btRigidBody.cpp:100
btRigidBody::computeGyroscopicForceExplicit
btVector3 computeGyroscopicForceExplicit(btScalar maxGyroscopicForce) const
explicit version is best avoided, it gains energy
Definition: btRigidBody.cpp:283
btRigidBody::m_invMass
btVector3 m_invMass
Definition: btRigidBody.h:99
btRigidBody::getCollisionShape
btCollisionShape * getCollisionShape()
Definition: btRigidBody.h:247
btRigidBody::m_gravity_acceleration
btVector3 m_gravity_acceleration
Definition: btRigidBody.h:68
btSerializer
Definition: btSerializer.h:66
btTransform
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:30
btTransform::getOrigin
btVector3 & getOrigin()
Return the origin vector translation.
Definition: btTransform.h:113
btTransform::setIdentity
void setIdentity()
Set this transformation to the identity.
Definition: btTransform.h:166
btTypedConstraint
TypedConstraint is the baseclass for Bullet constraints and vehicles.
Definition: btTypedConstraint.h:76
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:82
btVector3::setZ
void setZ(btScalar _z)
Set the z value.
Definition: btVector3.h:571
btVector3::cross
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
Definition: btVector3.h:380
btVector3::getX
const btScalar & getX() const
Return the x value.
Definition: btVector3.h:561
btVector3::dot
btScalar dot(const btVector3 &v) const
Return the dot product.
Definition: btVector3.h:229
btVector3::getZ
const btScalar & getZ() const
Return the z value.
Definition: btVector3.h:565
btVector3::setValue
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
Definition: btVector3.h:640
btVector3::setY
void setY(btScalar _y)
Set the y value.
Definition: btVector3.h:569
btVector3::setX
void setX(btScalar _x)
Set the x value.
Definition: btVector3.h:567
btVector3::getY
const btScalar & getY() const
Return the y value.
Definition: btVector3.h:563
btBroadphaseProxy
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
Definition: btBroadphaseProxy.h:86
btCollisionObjectDoubleData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btCollisionObject.h:616
btCollisionObjectFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btCollisionObject.h:651
btMatrix3x3DoubleData
for serialization
Definition: btMatrix3x3.h:1397
btMatrix3x3FloatData
for serialization
Definition: btMatrix3x3.h:1391
btRigidBodyDoubleData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btRigidBody.h:662
btRigidBodyDoubleData::m_angularVelocity
btVector3DoubleData m_angularVelocity
Definition: btRigidBody.h:666
btRigidBodyDoubleData::m_collisionObjectData
btCollisionObjectDoubleData m_collisionObjectData
Definition: btRigidBody.h:663
btRigidBodyDoubleData::m_angularDamping
double m_angularDamping
Definition: btRigidBody.h:676
btRigidBodyDoubleData::m_totalForce
btVector3DoubleData m_totalForce
Definition: btRigidBody.h:672
btRigidBodyDoubleData::m_linearDamping
double m_linearDamping
Definition: btRigidBody.h:675
btRigidBodyDoubleData::m_linearFactor
btVector3DoubleData m_linearFactor
Definition: btRigidBody.h:668
btRigidBodyDoubleData::m_invInertiaLocal
btVector3DoubleData m_invInertiaLocal
Definition: btRigidBody.h:671
btRigidBodyDoubleData::m_totalTorque
btVector3DoubleData m_totalTorque
Definition: btRigidBody.h:673
btRigidBodyDoubleData::m_additionalLinearDampingThresholdSqr
double m_additionalLinearDampingThresholdSqr
Definition: btRigidBody.h:678
btRigidBodyDoubleData::m_angularFactor
btVector3DoubleData m_angularFactor
Definition: btRigidBody.h:667
btRigidBodyDoubleData::m_invInertiaTensorWorld
btMatrix3x3DoubleData m_invInertiaTensorWorld
Definition: btRigidBody.h:664
btRigidBodyDoubleData::m_angularSleepingThreshold
double m_angularSleepingThreshold
Definition: btRigidBody.h:682
btRigidBodyDoubleData::m_padding
char m_padding[4]
Definition: btRigidBody.h:684
btRigidBodyDoubleData::m_linearVelocity
btVector3DoubleData m_linearVelocity
Definition: btRigidBody.h:665
btRigidBodyDoubleData::m_additionalAngularDampingThresholdSqr
double m_additionalAngularDampingThresholdSqr
Definition: btRigidBody.h:679
btRigidBodyDoubleData::m_gravity
btVector3DoubleData m_gravity
Definition: btRigidBody.h:669
btRigidBodyDoubleData::m_additionalAngularDampingFactor
double m_additionalAngularDampingFactor
Definition: btRigidBody.h:680
btRigidBodyDoubleData::m_linearSleepingThreshold
double m_linearSleepingThreshold
Definition: btRigidBody.h:681
btRigidBodyDoubleData::m_additionalDamping
int m_additionalDamping
Definition: btRigidBody.h:683
btRigidBodyDoubleData::m_inverseMass
double m_inverseMass
Definition: btRigidBody.h:674
btRigidBodyDoubleData::m_additionalDampingFactor
double m_additionalDampingFactor
Definition: btRigidBody.h:677
btRigidBodyDoubleData::m_gravity_acceleration
btVector3DoubleData m_gravity_acceleration
Definition: btRigidBody.h:670
btRigidBodyFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btRigidBody.h:636
btRigidBodyFloatData::m_linearDamping
float m_linearDamping
Definition: btRigidBody.h:649
btRigidBodyFloatData::m_totalTorque
btVector3FloatData m_totalTorque
Definition: btRigidBody.h:647
btRigidBodyFloatData::m_linearFactor
btVector3FloatData m_linearFactor
Definition: btRigidBody.h:642
btRigidBodyFloatData::m_totalForce
btVector3FloatData m_totalForce
Definition: btRigidBody.h:646
btRigidBodyFloatData::m_angularVelocity
btVector3FloatData m_angularVelocity
Definition: btRigidBody.h:640
btRigidBodyFloatData::m_angularFactor
btVector3FloatData m_angularFactor
Definition: btRigidBody.h:641
btRigidBodyFloatData::m_invInertiaLocal
btVector3FloatData m_invInertiaLocal
Definition: btRigidBody.h:645
btRigidBodyFloatData::m_invInertiaTensorWorld
btMatrix3x3FloatData m_invInertiaTensorWorld
Definition: btRigidBody.h:638
btRigidBodyFloatData::m_additionalLinearDampingThresholdSqr
float m_additionalLinearDampingThresholdSqr
Definition: btRigidBody.h:652
btRigidBodyFloatData::m_additionalAngularDampingFactor
float m_additionalAngularDampingFactor
Definition: btRigidBody.h:654
btRigidBodyFloatData::m_collisionObjectData
btCollisionObjectFloatData m_collisionObjectData
Definition: btRigidBody.h:637
btRigidBodyFloatData::m_linearVelocity
btVector3FloatData m_linearVelocity
Definition: btRigidBody.h:639
btRigidBodyFloatData::m_angularSleepingThreshold
float m_angularSleepingThreshold
Definition: btRigidBody.h:656
btRigidBodyFloatData::m_gravity
btVector3FloatData m_gravity
Definition: btRigidBody.h:643
btRigidBodyFloatData::m_additionalDampingFactor
float m_additionalDampingFactor
Definition: btRigidBody.h:651
btRigidBodyFloatData::m_inverseMass
float m_inverseMass
Definition: btRigidBody.h:648
btRigidBodyFloatData::m_gravity_acceleration
btVector3FloatData m_gravity_acceleration
Definition: btRigidBody.h:644
btRigidBodyFloatData::m_angularDamping
float m_angularDamping
Definition: btRigidBody.h:650
btRigidBodyFloatData::m_linearSleepingThreshold
float m_linearSleepingThreshold
Definition: btRigidBody.h:655
btRigidBodyFloatData::m_additionalDamping
int m_additionalDamping
Definition: btRigidBody.h:657
btRigidBodyFloatData::m_additionalAngularDampingThresholdSqr
float m_additionalAngularDampingThresholdSqr
Definition: btRigidBody.h:653
btRigidBody::btRigidBodyConstructionInfo
The btRigidBodyConstructionInfo structure provides information to create a rigid body.
Definition: btRigidBody.h:110
btRigidBody::btRigidBodyConstructionInfo::m_friction
btScalar m_friction
best simulation results when friction is non-zero
Definition: btRigidBody.h:124
btRigidBody::btRigidBodyConstructionInfo::m_additionalDamping
bool m_additionalDamping
Definition: btRigidBody.h:138
btRigidBody::btRigidBodyConstructionInfo::btRigidBodyConstructionInfo
btRigidBodyConstructionInfo(btScalar mass, btMotionState *motionState, btCollisionShape *collisionShape, const btVector3 &localInertia=btVector3(0, 0, 0))
Definition: btRigidBody.h:144
btRigidBody::btRigidBodyConstructionInfo::m_linearSleepingThreshold
btScalar m_linearSleepingThreshold
Definition: btRigidBody.h:133
btRigidBody::btRigidBodyConstructionInfo::m_spinningFriction
btScalar m_spinningFriction
Definition: btRigidBody.h:128
btRigidBody::btRigidBodyConstructionInfo::m_restitution
btScalar m_restitution
best simulation results using zero restitution.
Definition: btRigidBody.h:131
btRigidBody::btRigidBodyConstructionInfo::m_motionState
btMotionState * m_motionState
When a motionState is provided, the rigid body will initialize its world transform from the motion st...
Definition: btRigidBody.h:115
btRigidBody::btRigidBodyConstructionInfo::m_additionalAngularDampingFactor
btScalar m_additionalAngularDampingFactor
Definition: btRigidBody.h:142
btRigidBody::btRigidBodyConstructionInfo::m_additionalLinearDampingThresholdSqr
btScalar m_additionalLinearDampingThresholdSqr
Definition: btRigidBody.h:140
btRigidBody::btRigidBodyConstructionInfo::m_angularDamping
btScalar m_angularDamping
Definition: btRigidBody.h:121
btRigidBody::btRigidBodyConstructionInfo::m_linearDamping
btScalar m_linearDamping
Definition: btRigidBody.h:120
btRigidBody::btRigidBodyConstructionInfo::m_localInertia
btVector3 m_localInertia
Definition: btRigidBody.h:119
btRigidBody::btRigidBodyConstructionInfo::m_rollingFriction
btScalar m_rollingFriction
the m_rollingFriction prevents rounded shapes, such as spheres, cylinders and capsules from rolling f...
Definition: btRigidBody.h:127
btRigidBody::btRigidBodyConstructionInfo::m_additionalDampingFactor
btScalar m_additionalDampingFactor
Definition: btRigidBody.h:139
btRigidBody::btRigidBodyConstructionInfo::m_angularSleepingThreshold
btScalar m_angularSleepingThreshold
Definition: btRigidBody.h:134
btRigidBody::btRigidBodyConstructionInfo::m_collisionShape
btCollisionShape * m_collisionShape
Definition: btRigidBody.h:118
btRigidBody::btRigidBodyConstructionInfo::m_startWorldTransform
btTransform m_startWorldTransform
Definition: btRigidBody.h:116
btRigidBody::btRigidBodyConstructionInfo::m_mass
btScalar m_mass
Definition: btRigidBody.h:111
btRigidBody::btRigidBodyConstructionInfo::m_additionalAngularDampingThresholdSqr
btScalar m_additionalAngularDampingThresholdSqr
Definition: btRigidBody.h:141
btVector3DoubleData
Definition: btVector3.h:1287
btVector3FloatData
Definition: btVector3.h:1282