Blender V4.3
btRigidBody.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_RIGIDBODY_H
17#define BT_RIGIDBODY_H
18
23
25class btMotionState;
26class btTypedConstraint;
27
29extern 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
50
59class 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
90
91 int m_rigidbodyFlags;
92
93 int m_debugBodyId;
94
95protected:
98 btVector3 m_angularFactor;
99 btVector3 m_invMass;
100 btVector3 m_pushVelocity;
101 btVector3 m_turnVelocity;
102
103public:
110 {
112
117
119 btVector3 m_localInertia;
122
128 btScalar m_spinningFriction; //torsional friction around contact normal
129
132
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
143
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
180protected:
182 void setupRigidBody(const btRigidBodyConstructionInfo& constructionInfo);
183
184public:
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
221 {
222 return m_linearDamping;
223 }
224
226 {
227 return m_angularDamping;
228 }
229
231 {
232 return m_linearSleepingThreshold;
233 }
234
236 {
237 return m_angularSleepingThreshold;
238 }
239
240 void applyDamping(btScalar timeStep);
241
246
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; }
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
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 {
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 {
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 {
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
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 }
428
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 {
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 {
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
494 {
495 btVector3 vec = axis * getInvInertiaTensorWorld();
496 return axis.dot(vec);
497 }
498
500 {
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 {
513 }
514 }
515
517 {
519 return false;
520
521 //disable deactivation
523 return false;
524
526 return true;
527
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
550 {
551 return m_optionalMotionState;
552 }
554 {
555 return m_optionalMotionState;
556 }
557 void setMotionState(btMotionState* motionState)
558 {
559 m_optionalMotionState = motionState;
560 if (m_optionalMotionState)
562 }
563
564 //for experimental overriding of friction/contact solver func
567
568 void setAngularFactor(const btVector3& angFac)
569 {
571 m_angularFactor = angFac;
572 }
573
575 {
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
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
615
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
659
686
687#endif //BT_RIGIDBODY_H
ATTR_WARN_UNUSED_RESULT const BMVert * v
#define DISABLE_DEACTIVATION
btScalar m_deactivationTime
void setActivationState(int newState) const
SIMD_FORCE_INLINE int getActivationState() const
#define WANTS_DEACTIVATION
#define ISLAND_SLEEPING
int m_updateRevision
internal update revision number. It will be increased when the object changes. This allows some subsy...
btCollisionShape * m_collisionShape
btBroadphaseProxy * m_broadphaseHandle
btCollisionShape
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
btScalar m_angularDamping
btScalar m_linearDamping
btMatrix3x3
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
Definition btMatrix3x3.h:50
bool gDisableDeactivation
btScalar gDeactivationTime
btRigidBodyFlags
Definition btRigidBody.h:40
@ BT_ENABLE_GYROPSCOPIC_FORCE
Definition btRigidBody.h:48
@ BT_DISABLE_WORLD_GRAVITY
Definition btRigidBody.h:41
@ BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY
Definition btRigidBody.h:47
@ BT_ENABLE_GYROSCOPIC_FORCE_EXPLICIT
Definition btRigidBody.h:45
@ BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_WORLD
Definition btRigidBody.h:46
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition btScalar.h:314
#define SIMD_FORCE_INLINE
Definition btScalar.h:280
#define btAssert(x)
Definition btScalar.h:295
btTransform m_worldTransform
btVector3 m_deltaLinearVelocity
btVector3 m_linearFactor
btVector3 m_angularVelocity
btVector3 m_linearVelocity
btTransform
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition btTransform.h:30
SIMD_FORCE_INLINE btScalar length2() const
Return the length of the vector squared.
Definition btVector3.h:251
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
Definition btVector3.h:82
SIMD_FORCE_INLINE int size() const
return the number of elements in the array
virtual void getWorldTransform(btTransform &worldTrans) const =0
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
void applyTorqueImpulse(const btVector3 &torque)
void setLinearFactor(const btVector3 &linearFactor)
void getAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
void applyGravity()
void integrateVelocities(btScalar step)
SIMD_FORCE_INLINE btScalar computeAngularImpulseDenominator(const btVector3 &axis) const
btVector3 getVelocityInLocalPoint(const btVector3 &rel_pos) const
void addConstraintRef(btTypedConstraint *c)
virtual void serializeSingleObject(class btSerializer *serializer) const
void clearForces()
void setNewBroadphaseProxy(btBroadphaseProxy *broadphaseProxy)
SIMD_FORCE_INLINE btCollisionShape * getCollisionShape()
const btVector3 & getTotalTorque() const
void setFlags(int flags)
int getFlags() const
ATTRIBUTE_ALIGNED16(btVector3 m_deltaLinearVelocity)
const btVector3 & getGravity() const
int m_frictionSolverType
btScalar getLinearSleepingThreshold() const
void applyDamping(btScalar timeStep)
applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping
int m_contactSolverType
void applyCentralForce(const btVector3 &force)
btScalar getInvMass() const
btScalar getAngularDamping() const
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btVector3 m_turnVelocity
virtual int calculateSerializeBufferSize() const
void setGravity(const btVector3 &acceleration)
const btVector3 & getLinearFactor() const
btScalar getMass() const
const btVector3 & getInvInertiaDiagLocal() const
btRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
btRigidBody constructor using construction info
btQuaternion getOrientation() const
void proceedToTransform(const btTransform &newTrans)
const btTransform & getCenterOfMassTransform() const
void saveKinematicState(btScalar step)
btVector3 getLocalInertia() const
btVector3 computeGyroscopicImpulseImplicit_World(btScalar dt) const
perform implicit force computation in world space
btVector3 m_angularFactor
Definition btRigidBody.h:98
btVector3 computeGyroscopicImpulseImplicit_Body(btScalar step) const
perform implicit force computation in body space (inertial frame)
void applyImpulse(const btVector3 &impulse, const btVector3 &rel_pos)
void applyCentralImpulse(const btVector3 &impulse)
const btVector3 & getAngularVelocity() const
const btMotionState * getMotionState() const
btMotionState * getMotionState()
void setTurnVelocity(const btVector3 &v)
SIMD_FORCE_INLINE btScalar computeImpulseDenominator(const btVector3 &pos, const btVector3 &normal) const
int getNumConstraintRefs() const
static btRigidBody * upcast(btCollisionObject *colObj)
void removeConstraintRef(btTypedConstraint *c)
btVector3 getPushVelocityInLocalPoint(const btVector3 &rel_pos) const
void setSleepingThresholds(btScalar linear, btScalar angular)
void setMassProps(btScalar mass, const btVector3 &inertia)
const btVector3 & getCenterOfMassPosition() const
btVector3 m_deltaAngularVelocity
Definition btRigidBody.h:97
btVector3 m_pushVelocity
btScalar getAngularSleepingThreshold() const
void setAngularFactor(const btVector3 &angFac)
void applyTorqueTurnImpulse(const btVector3 &torque)
SIMD_FORCE_INLINE bool wantsSleeping()
SIMD_FORCE_INLINE void updateDeactivation(btScalar timeStep)
btBroadphaseProxy * getBroadphaseProxy()
bool isInWorld() const
const btVector3 & getTotalForce() const
SIMD_FORCE_INLINE const btCollisionShape * getCollisionShape() const
virtual ~btRigidBody()
btScalar getLinearDamping() const
void clearGravity()
const btVector3 & getAngularFactor() const
btTypedConstraint * getConstraintRef(int index)
void setInvInertiaDiagLocal(const btVector3 &diagInvInertia)
void setAngularVelocity(const btVector3 &ang_vel)
void setMotionState(btMotionState *motionState)
void translate(const btVector3 &v)
void setPushVelocity(const btVector3 &v)
void applyCentralPushImpulse(const btVector3 &impulse)
void setDamping(btScalar lin_damping, btScalar ang_damping)
void setAngularFactor(btScalar angFac)
void setLinearVelocity(const btVector3 &lin_vel)
void applyPushImpulse(const btVector3 &impulse, const btVector3 &rel_pos)
void setupRigidBody(const btRigidBodyConstructionInfo &constructionInfo)
setupRigidBody is only used internally by the constructor
const btBroadphaseProxy * getBroadphaseProxy() const
void setCenterOfMassTransform(const btTransform &xform)
static const btRigidBody * upcast(const btCollisionObject *colObj)
void updateInertiaTensor()
void applyTorque(const btVector3 &torque)
void applyForce(const btVector3 &force, const btVector3 &rel_pos)
btVector3 getPushVelocity() const
btVector3 getTurnVelocity() const
const btMatrix3x3 & getInvInertiaTensorWorld() const
void predictIntegratedTransform(btScalar step, btTransform &predictedTransform)
continuous collision detection needs prediction
btVector3 computeGyroscopicForceExplicit(btScalar maxGyroscopicForce) const
explicit version is best avoided, it gains energy
btVector3 m_invMass
Definition btRigidBody.h:99
const btVector3 & getLinearVelocity() const
ccl_device_inline float cross(const float2 a, const float2 b)
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
for serialization
for serialization
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btVector3DoubleData m_angularVelocity
btCollisionObjectDoubleData m_collisionObjectData
btVector3DoubleData m_totalForce
btVector3DoubleData m_linearFactor
btVector3DoubleData m_invInertiaLocal
btVector3DoubleData m_totalTorque
double m_additionalLinearDampingThresholdSqr
btVector3DoubleData m_angularFactor
btMatrix3x3DoubleData m_invInertiaTensorWorld
double m_angularSleepingThreshold
btVector3DoubleData m_linearVelocity
double m_additionalAngularDampingThresholdSqr
btVector3DoubleData m_gravity
double m_additionalAngularDampingFactor
btVector3DoubleData m_gravity_acceleration
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btVector3FloatData m_totalTorque
btVector3FloatData m_linearFactor
btVector3FloatData m_totalForce
btVector3FloatData m_angularVelocity
btVector3FloatData m_angularFactor
btVector3FloatData m_invInertiaLocal
btMatrix3x3FloatData m_invInertiaTensorWorld
float m_additionalLinearDampingThresholdSqr
float m_additionalAngularDampingFactor
btCollisionObjectFloatData m_collisionObjectData
btVector3FloatData m_linearVelocity
btVector3FloatData m_gravity
btVector3FloatData m_gravity_acceleration
float m_additionalAngularDampingThresholdSqr
btScalar m_friction
best simulation results when friction is non-zero
btRigidBodyConstructionInfo(btScalar mass, btMotionState *motionState, btCollisionShape *collisionShape, const btVector3 &localInertia=btVector3(0, 0, 0))
btScalar m_restitution
best simulation results using zero restitution.