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

Bullet Collision Detection & Physics Library

btCollisionObject.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_COLLISION_OBJECT_H
17 #define BT_COLLISION_OBJECT_H
18
19 #include "LinearMath/btTransform.h"
20
21 //island management, m_activationState1
22 #define ACTIVE_TAG 1
23 #define ISLAND_SLEEPING 2
24 #define WANTS_DEACTIVATION 3
25 #define DISABLE_DEACTIVATION 4
26 #define DISABLE_SIMULATION 5
27
28 struct btBroadphaseProxy;
29 class btCollisionShape;
30 struct btCollisionShapeData;
31 #include "LinearMath/btMotionState.h"
32 #include "LinearMath/btAlignedAllocator.h"
33 #include "LinearMath/btAlignedObjectArray.h"
34
35 typedef btAlignedObjectArray<class btCollisionObject*> btCollisionObjectArray;
36
37 #ifdef BT_USE_DOUBLE_PRECISION
38 #define btCollisionObjectData btCollisionObjectDoubleData
39 #define btCollisionObjectDataName "btCollisionObjectDoubleData"
40 #else
41 #define btCollisionObjectData btCollisionObjectFloatData
42 #define btCollisionObjectDataName "btCollisionObjectFloatData"
43 #endif
44
48 ATTRIBUTE_ALIGNED16(class)
49 btCollisionObject
50 {
51 protected:
52 btTransform m_worldTransform;
53
56 btTransform m_interpolationWorldTransform;
57 //those two are experimental: just added for bullet time effect, so you can still apply impulses (directly modifying velocities)
58 //without destroying the continuous interpolated motion (which uses this interpolation velocities)
59 btVector3 m_interpolationLinearVelocity;
60 btVector3 m_interpolationAngularVelocity;
61
62 btVector3 m_anisotropicFriction;
63 int m_hasAnisotropicFriction;
64 btScalar m_contactProcessingThreshold;
65
66 btBroadphaseProxy* m_broadphaseHandle;
67 btCollisionShape* m_collisionShape;
69 void* m_extensionPointer;
70
74 btCollisionShape* m_rootCollisionShape;
75
76 int m_collisionFlags;
77
78 int m_islandTag1;
79 int m_companionId;
80 int m_worldArrayIndex; // index of object in world's collisionObjects array
81
82 mutable int m_activationState1;
83 mutable btScalar m_deactivationTime;
84
85 btScalar m_friction;
86 btScalar m_restitution;
87 btScalar m_rollingFriction; //torsional friction orthogonal to contact normal (useful to stop spheres rolling forever)
88 btScalar m_spinningFriction; // torsional friction around the contact normal (useful for grasping)
89 btScalar m_contactDamping;
90 btScalar m_contactStiffness;
91
94 int m_internalType;
95
97
98 void* m_userObjectPointer;
99
100 int m_userIndex2;
101
102 int m_userIndex;
103
104 int m_userIndex3;
105
107 btScalar m_hitFraction;
108
110 btScalar m_ccdSweptSphereRadius;
111
113 btScalar m_ccdMotionThreshold;
114
116 int m_checkCollideWith;
117
118 btAlignedObjectArray<const btCollisionObject*> m_objectsWithoutCollisionCheck;
119
121 int m_updateRevision;
122
123 btVector3 m_customDebugColorRGB;
124
125 public:
126 BT_DECLARE_ALIGNED_ALLOCATOR();
127
128 enum CollisionFlags
129 {
130 CF_DYNAMIC_OBJECT = 0,
131 CF_STATIC_OBJECT = 1,
132 CF_KINEMATIC_OBJECT = 2,
133 CF_NO_CONTACT_RESPONSE = 4,
134 CF_CUSTOM_MATERIAL_CALLBACK = 8, //this allows per-triangle material (friction/restitution)
135 CF_CHARACTER_OBJECT = 16,
136 CF_DISABLE_VISUALIZE_OBJECT = 32, //disable debug drawing
137 CF_DISABLE_SPU_COLLISION_PROCESSING = 64, //disable parallel/SPU processing
138 CF_HAS_CONTACT_STIFFNESS_DAMPING = 128,
139 CF_HAS_CUSTOM_DEBUG_RENDERING_COLOR = 256,
140 CF_HAS_FRICTION_ANCHOR = 512,
141 CF_HAS_COLLISION_SOUND_TRIGGER = 1024
142 };
143
144 enum CollisionObjectTypes
145 {
146 CO_COLLISION_OBJECT = 1,
147 CO_RIGID_BODY = 2,
150 CO_GHOST_OBJECT = 4,
151 CO_SOFT_BODY = 8,
152 CO_HF_FLUID = 16,
153 CO_USER_TYPE = 32,
154 CO_FEATHERSTONE_LINK = 64
155 };
156
157 enum AnisotropicFrictionFlags
158 {
159 CF_ANISOTROPIC_FRICTION_DISABLED = 0,
160 CF_ANISOTROPIC_FRICTION = 1,
161 CF_ANISOTROPIC_ROLLING_FRICTION = 2
162 };
163
164 SIMD_FORCE_INLINE bool mergesSimulationIslands() const
165 {
167 return ((m_collisionFlags & (CF_STATIC_OBJECT | CF_KINEMATIC_OBJECT | CF_NO_CONTACT_RESPONSE)) == 0);
168 }
169
170 const btVector3& getAnisotropicFriction() const
171 {
172 return m_anisotropicFriction;
173 }
174 void setAnisotropicFriction(const btVector3& anisotropicFriction, int frictionMode = CF_ANISOTROPIC_FRICTION)
175 {
176 m_anisotropicFriction = anisotropicFriction;
177 bool isUnity = (anisotropicFriction[0] != 1.f) || (anisotropicFriction[1] != 1.f) || (anisotropicFriction[2] != 1.f);
178 m_hasAnisotropicFriction = isUnity ? frictionMode : 0;
179 }
180 bool hasAnisotropicFriction(int frictionMode = CF_ANISOTROPIC_FRICTION) const
181 {
182 return (m_hasAnisotropicFriction & frictionMode) != 0;
183 }
184
187 void setContactProcessingThreshold(btScalar contactProcessingThreshold)
188 {
189 m_contactProcessingThreshold = contactProcessingThreshold;
190 }
191 btScalar getContactProcessingThreshold() const
192 {
193 return m_contactProcessingThreshold;
194 }
195
196 SIMD_FORCE_INLINE bool isStaticObject() const
197 {
198 return (m_collisionFlags & CF_STATIC_OBJECT) != 0;
199 }
200
201 SIMD_FORCE_INLINE bool isKinematicObject() const
202 {
203 return (m_collisionFlags & CF_KINEMATIC_OBJECT) != 0;
204 }
205
206 SIMD_FORCE_INLINE bool isStaticOrKinematicObject() const
207 {
208 return (m_collisionFlags & (CF_KINEMATIC_OBJECT | CF_STATIC_OBJECT)) != 0;
209 }
210
211 SIMD_FORCE_INLINE bool hasContactResponse() const
212 {
213 return (m_collisionFlags & CF_NO_CONTACT_RESPONSE) == 0;
214 }
215
216 btCollisionObject();
217
218 virtual ~btCollisionObject();
219
220 virtual void setCollisionShape(btCollisionShape * collisionShape)
221 {
222 m_updateRevision++;
223 m_collisionShape = collisionShape;
224 m_rootCollisionShape = collisionShape;
225 }
226
227 SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const
228 {
229 return m_collisionShape;
230 }
231
232 SIMD_FORCE_INLINE btCollisionShape* getCollisionShape()
233 {
234 return m_collisionShape;
235 }
236
237 void setIgnoreCollisionCheck(const btCollisionObject* co, bool ignoreCollisionCheck)
238 {
239 if (ignoreCollisionCheck)
240 {
241 //We don't check for duplicates. Is it ok to leave that up to the user of this API?
242 //int index = m_objectsWithoutCollisionCheck.findLinearSearch(co);
243 //if (index == m_objectsWithoutCollisionCheck.size())
244 //{
245 m_objectsWithoutCollisionCheck.push_back(co);
246 //}
247 }
248 else
249 {
250 m_objectsWithoutCollisionCheck.remove(co);
251 }
252 m_checkCollideWith = m_objectsWithoutCollisionCheck.size() > 0;
253 }
254
255 int getNumObjectsWithoutCollision() const
256 {
257 return m_objectsWithoutCollisionCheck.size();
258 }
259
260 const btCollisionObject* getObjectWithoutCollision(int index)
261 {
262 return m_objectsWithoutCollisionCheck[index];
263 }
264
265 virtual bool checkCollideWithOverride(const btCollisionObject* co) const
266 {
267 int index = m_objectsWithoutCollisionCheck.findLinearSearch(co);
268 if (index < m_objectsWithoutCollisionCheck.size())
269 {
270 return false;
271 }
272 return true;
273 }
274
277 void* internalGetExtensionPointer() const
278 {
279 return m_extensionPointer;
280 }
283 void internalSetExtensionPointer(void* pointer)
284 {
285 m_extensionPointer = pointer;
286 }
287
288 SIMD_FORCE_INLINE int getActivationState() const { return m_activationState1; }
289
290 void setActivationState(int newState) const;
291
292 void setDeactivationTime(btScalar time)
293 {
294 m_deactivationTime = time;
295 }
296 btScalar getDeactivationTime() const
297 {
298 return m_deactivationTime;
299 }
300
301 void forceActivationState(int newState) const;
302
303 void activate(bool forceActivation = false) const;
304
305 SIMD_FORCE_INLINE bool isActive() const
306 {
307 return ((getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION));
308 }
309
310 void setRestitution(btScalar rest)
311 {
312 m_updateRevision++;
313 m_restitution = rest;
314 }
315 btScalar getRestitution() const
316 {
317 return m_restitution;
318 }
319 void setFriction(btScalar frict)
320 {
321 m_updateRevision++;
322 m_friction = frict;
323 }
324 btScalar getFriction() const
325 {
326 return m_friction;
327 }
328
329 void setRollingFriction(btScalar frict)
330 {
331 m_updateRevision++;
332 m_rollingFriction = frict;
333 }
334 btScalar getRollingFriction() const
335 {
336 return m_rollingFriction;
337 }
338 void setSpinningFriction(btScalar frict)
339 {
340 m_updateRevision++;
341 m_spinningFriction = frict;
342 }
343 btScalar getSpinningFriction() const
344 {
345 return m_spinningFriction;
346 }
347 void setContactStiffnessAndDamping(btScalar stiffness, btScalar damping)
348 {
349 m_updateRevision++;
350 m_contactStiffness = stiffness;
351 m_contactDamping = damping;
352
353 m_collisionFlags |= CF_HAS_CONTACT_STIFFNESS_DAMPING;
354
355 //avoid divisions by zero...
356 if (m_contactStiffness < SIMD_EPSILON)
357 {
358 m_contactStiffness = SIMD_EPSILON;
359 }
360 }
361
362 btScalar getContactStiffness() const
363 {
364 return m_contactStiffness;
365 }
366
367 btScalar getContactDamping() const
368 {
369 return m_contactDamping;
370 }
371
373 int getInternalType() const
374 {
375 return m_internalType;
376 }
377
378 btTransform& getWorldTransform()
379 {
380 return m_worldTransform;
381 }
382
383 const btTransform& getWorldTransform() const
384 {
385 return m_worldTransform;
386 }
387
388 void setWorldTransform(const btTransform& worldTrans)
389 {
390 m_updateRevision++;
391 m_worldTransform = worldTrans;
392 }
393
394 SIMD_FORCE_INLINE btBroadphaseProxy* getBroadphaseHandle()
395 {
396 return m_broadphaseHandle;
397 }
398
399 SIMD_FORCE_INLINE const btBroadphaseProxy* getBroadphaseHandle() const
400 {
401 return m_broadphaseHandle;
402 }
403
404 void setBroadphaseHandle(btBroadphaseProxy * handle)
405 {
406 m_broadphaseHandle = handle;
407 }
408
409 const btTransform& getInterpolationWorldTransform() const
410 {
411 return m_interpolationWorldTransform;
412 }
413
414 btTransform& getInterpolationWorldTransform()
415 {
416 return m_interpolationWorldTransform;
417 }
418
419 void setInterpolationWorldTransform(const btTransform& trans)
420 {
421 m_updateRevision++;
422 m_interpolationWorldTransform = trans;
423 }
424
425 void setInterpolationLinearVelocity(const btVector3& linvel)
426 {
427 m_updateRevision++;
428 m_interpolationLinearVelocity = linvel;
429 }
430
431 void setInterpolationAngularVelocity(const btVector3& angvel)
432 {
433 m_updateRevision++;
434 m_interpolationAngularVelocity = angvel;
435 }
436
437 const btVector3& getInterpolationLinearVelocity() const
438 {
439 return m_interpolationLinearVelocity;
440 }
441
442 const btVector3& getInterpolationAngularVelocity() const
443 {
444 return m_interpolationAngularVelocity;
445 }
446
447 SIMD_FORCE_INLINE int getIslandTag() const
448 {
449 return m_islandTag1;
450 }
451
452 void setIslandTag(int tag)
453 {
454 m_islandTag1 = tag;
455 }
456
457 SIMD_FORCE_INLINE int getCompanionId() const
458 {
459 return m_companionId;
460 }
461
462 void setCompanionId(int id)
463 {
464 m_companionId = id;
465 }
466
467 SIMD_FORCE_INLINE int getWorldArrayIndex() const
468 {
469 return m_worldArrayIndex;
470 }
471
472 // only should be called by CollisionWorld
473 void setWorldArrayIndex(int ix)
474 {
475 m_worldArrayIndex = ix;
476 }
477
478 SIMD_FORCE_INLINE btScalar getHitFraction() const
479 {
480 return m_hitFraction;
481 }
482
483 void setHitFraction(btScalar hitFraction)
484 {
485 m_hitFraction = hitFraction;
486 }
487
488 SIMD_FORCE_INLINE int getCollisionFlags() const
489 {
490 return m_collisionFlags;
491 }
492
493 void setCollisionFlags(int flags)
494 {
495 m_collisionFlags = flags;
496 }
497
499 btScalar getCcdSweptSphereRadius() const
500 {
501 return m_ccdSweptSphereRadius;
502 }
503
505 void setCcdSweptSphereRadius(btScalar radius)
506 {
507 m_ccdSweptSphereRadius = radius;
508 }
509
510 btScalar getCcdMotionThreshold() const
511 {
512 return m_ccdMotionThreshold;
513 }
514
515 btScalar getCcdSquareMotionThreshold() const
516 {
517 return m_ccdMotionThreshold * m_ccdMotionThreshold;
518 }
519
521 void setCcdMotionThreshold(btScalar ccdMotionThreshold)
522 {
523 m_ccdMotionThreshold = ccdMotionThreshold;
524 }
525
527 void* getUserPointer() const
528 {
529 return m_userObjectPointer;
530 }
531
532 int getUserIndex() const
533 {
534 return m_userIndex;
535 }
536
537 int getUserIndex2() const
538 {
539 return m_userIndex2;
540 }
541
542 int getUserIndex3() const
543 {
544 return m_userIndex3;
545 }
546
548 void setUserPointer(void* userPointer)
549 {
550 m_userObjectPointer = userPointer;
551 }
552
554 void setUserIndex(int index)
555 {
556 m_userIndex = index;
557 }
558
559 void setUserIndex2(int index)
560 {
561 m_userIndex2 = index;
562 }
563
564 void setUserIndex3(int index)
565 {
566 m_userIndex3 = index;
567 }
568
569 int getUpdateRevisionInternal() const
570 {
571 return m_updateRevision;
572 }
573
574 void setCustomDebugColor(const btVector3& colorRGB)
575 {
576 m_customDebugColorRGB = colorRGB;
577 m_collisionFlags |= CF_HAS_CUSTOM_DEBUG_RENDERING_COLOR;
578 }
579
580 void removeCustomDebugColor()
581 {
582 m_collisionFlags &= ~CF_HAS_CUSTOM_DEBUG_RENDERING_COLOR;
583 }
584
585 bool getCustomDebugColor(btVector3 & colorRGB) const
586 {
587 bool hasCustomColor = (0 != (m_collisionFlags & CF_HAS_CUSTOM_DEBUG_RENDERING_COLOR));
588 if (hasCustomColor)
589 {
590 colorRGB = m_customDebugColorRGB;
591 }
592 return hasCustomColor;
593 }
594
595 inline bool checkCollideWith(const btCollisionObject* co) const
596 {
597 if (m_checkCollideWith)
598 return checkCollideWithOverride(co);
599
600 return true;
601 }
602
603 virtual int calculateSerializeBufferSize() const;
604
606 virtual const char* serialize(void* dataBuffer, class btSerializer* serializer) const;
607
608 virtual void serializeSingleObject(class btSerializer * serializer) const;
609 };
610
611 // clang-format off
612
614 struct btCollisionObjectDoubleData
615 {
616 void *m_broadphaseHandle;
617 void *m_collisionShape;
618 btCollisionShapeData *m_rootCollisionShape;
619 char *m_name;
620
621 btTransformDoubleData m_worldTransform;
622 btTransformDoubleData m_interpolationWorldTransform;
623 btVector3DoubleData m_interpolationLinearVelocity;
624 btVector3DoubleData m_interpolationAngularVelocity;
625 btVector3DoubleData m_anisotropicFriction;
626 double m_contactProcessingThreshold;
627 double m_deactivationTime;
628 double m_friction;
629 double m_rollingFriction;
630 double m_contactDamping;
631 double m_contactStiffness;
632 double m_restitution;
633 double m_hitFraction;
634 double m_ccdSweptSphereRadius;
635 double m_ccdMotionThreshold;
636 int m_hasAnisotropicFriction;
637 int m_collisionFlags;
638 int m_islandTag1;
639 int m_companionId;
640 int m_activationState1;
641 int m_internalType;
642 int m_checkCollideWith;
643 int m_collisionFilterGroup;
644 int m_collisionFilterMask;
645 int m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc.
646 };
647
649 struct btCollisionObjectFloatData
650 {
651 void *m_broadphaseHandle;
652 void *m_collisionShape;
653 btCollisionShapeData *m_rootCollisionShape;
654 char *m_name;
655
656 btTransformFloatData m_worldTransform;
657 btTransformFloatData m_interpolationWorldTransform;
658 btVector3FloatData m_interpolationLinearVelocity;
659 btVector3FloatData m_interpolationAngularVelocity;
660 btVector3FloatData m_anisotropicFriction;
661 float m_contactProcessingThreshold;
662 float m_deactivationTime;
663 float m_friction;
664 float m_rollingFriction;
665 float m_contactDamping;
666 float m_contactStiffness;
667 float m_restitution;
668 float m_hitFraction;
669 float m_ccdSweptSphereRadius;
670 float m_ccdMotionThreshold;
671 int m_hasAnisotropicFriction;
672 int m_collisionFlags;
673 int m_islandTag1;
674 int m_companionId;
675 int m_activationState1;
676 int m_internalType;
677 int m_checkCollideWith;
678 int m_collisionFilterGroup;
679 int m_collisionFilterMask;
680 int m_uniqueId;
681 };
682 // clang-format on
683
684 SIMD_FORCE_INLINE int btCollisionObject::calculateSerializeBufferSize() const
685 {
686 return sizeof(btCollisionObjectData);
687 }
688
689 #endif //BT_COLLISION_OBJECT_H
SIMD_EPSILON
#define SIMD_EPSILON
Definition: btScalar.h:543
btCollisionShapeData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btCollisionShape.h:163
btCollisionObject::checkCollideWithOverride
virtual bool checkCollideWithOverride(const btCollisionObject *co) const
Definition: btCollisionObject.h:265
btTransformDoubleData
Definition: btTransform.h:251
btCollisionObject::m_userIndex
int m_userIndex
Definition: btCollisionObject.h:102
btCollisionObject
btCollisionObject can be used to manage collision detection objects.
Definition: btCollisionObject.h:50
DISABLE_SIMULATION
#define DISABLE_SIMULATION
Definition: btCollisionObject.h:26
btCollisionObjectDoubleData::m_collisionFilterMask
int m_collisionFilterMask
Definition: btCollisionObject.h:644
btCollisionObject::getContactDamping
btScalar getContactDamping() const
Definition: btCollisionObject.h:367
btBroadphaseProxy
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
Definition: btBroadphaseProxy.h:86
btCollisionObject::getUserIndex2
int getUserIndex2() const
Definition: btCollisionObject.h:537
btCollisionObjectDoubleData::m_ccdMotionThreshold
double m_ccdMotionThreshold
Definition: btCollisionObject.h:635
btCollisionObject::getUpdateRevisionInternal
int getUpdateRevisionInternal() const
Definition: btCollisionObject.h:569
btCollisionObjectFloatData::m_collisionFlags
int m_collisionFlags
Definition: btCollisionObject.h:672
btCollisionObject::m_ccdSweptSphereRadius
btScalar m_ccdSweptSphereRadius
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
Definition: btCollisionObject.h:110
btCollisionObjectFloatData::m_checkCollideWith
int m_checkCollideWith
Definition: btCollisionObject.h:677
btCollisionObject::m_interpolationWorldTransform
btTransform m_interpolationWorldTransform
m_interpolationWorldTransform is used for CCD and interpolation it can be either previous or future (...
Definition: btCollisionObject.h:56
btCollisionObjectDoubleData::m_islandTag1
int m_islandTag1
Definition: btCollisionObject.h:638
btCollisionObject::AnisotropicFrictionFlags
AnisotropicFrictionFlags
Definition: btCollisionObject.h:158
btCollisionObject::setContactStiffnessAndDamping
void setContactStiffnessAndDamping(btScalar stiffness, btScalar damping)
Definition: btCollisionObject.h:347
btCollisionObjectDoubleData::m_uniqueId
int m_uniqueId
Definition: btCollisionObject.h:645
btCollisionObject::getBroadphaseHandle
const btBroadphaseProxy * getBroadphaseHandle() const
Definition: btCollisionObject.h:399
btCollisionObjectFloatData::m_internalType
int m_internalType
Definition: btCollisionObject.h:676
btCollisionObjectFloatData::m_islandTag1
int m_islandTag1
Definition: btCollisionObject.h:673
btCollisionObjectFloatData::m_name
char * m_name
Definition: btCollisionObject.h:654
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314
btMotionState.h
btCollisionObjectFloatData::m_collisionFilterGroup
int m_collisionFilterGroup
Definition: btCollisionObject.h:678
btCollisionObjectDoubleData::m_rollingFriction
double m_rollingFriction
Definition: btCollisionObject.h:629
btCollisionObjectDoubleData::m_companionId
int m_companionId
Definition: btCollisionObject.h:639
btCollisionObjectDoubleData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btCollisionObject.h:615
btCollisionObject::setCcdMotionThreshold
void setCcdMotionThreshold(btScalar ccdMotionThreshold)
Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold...
Definition: btCollisionObject.h:521
btCollisionObject::m_objectsWithoutCollisionCheck
btAlignedObjectArray< const btCollisionObject * > m_objectsWithoutCollisionCheck
Definition: btCollisionObject.h:118
btCollisionObject::mergesSimulationIslands
bool mergesSimulationIslands() const
Definition: btCollisionObject.h:164
btCollisionObjectFloatData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btCollisionObject.h:650
btCollisionObject::setWorldArrayIndex
void setWorldArrayIndex(int ix)
Definition: btCollisionObject.h:473
btCollisionObjectDoubleData::m_broadphaseHandle
void * m_broadphaseHandle
Definition: btCollisionObject.h:616
btCollisionObject::m_ccdMotionThreshold
btScalar m_ccdMotionThreshold
Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold...
Definition: btCollisionObject.h:113
btAlignedObjectArray::findLinearSearch
int findLinearSearch(const T &key) const
Definition: btAlignedObjectArray.h:438
btCollisionObject::removeCustomDebugColor
void removeCustomDebugColor()
Definition: btCollisionObject.h:580
btCollisionObjectFloatData::m_interpolationWorldTransform
btTransformFloatData m_interpolationWorldTransform
Definition: btCollisionObject.h:657
btCollisionObjectData
#define btCollisionObjectData
Definition: btCollisionObject.h:41
btCollisionObject::getActivationState
int getActivationState() const
Definition: btCollisionObject.h:288
btCollisionObject::m_worldTransform
btTransform m_worldTransform
Definition: btCollisionObject.h:52
btCollisionObjectDoubleData::m_interpolationWorldTransform
btTransformDoubleData m_interpolationWorldTransform
Definition: btCollisionObject.h:622
btCollisionObject::setCustomDebugColor
void setCustomDebugColor(const btVector3 &colorRGB)
Definition: btCollisionObject.h:574
btCollisionObjectDoubleData::m_worldTransform
btTransformDoubleData m_worldTransform
Definition: btCollisionObject.h:621
btCollisionObject::getContactStiffness
btScalar getContactStiffness() const
Definition: btCollisionObject.h:362
btCollisionObjectDoubleData::m_collisionShape
void * m_collisionShape
Definition: btCollisionObject.h:617
btCollisionObject::m_hitFraction
btScalar m_hitFraction
time of impact calculation
Definition: btCollisionObject.h:107
btCollisionObject::getWorldTransform
const btTransform & getWorldTransform() const
Definition: btCollisionObject.h:383
btCollisionObject::setHitFraction
void setHitFraction(btScalar hitFraction)
Definition: btCollisionObject.h:483
btCollisionObjectFloatData::m_rootCollisionShape
btCollisionShapeData * m_rootCollisionShape
Definition: btCollisionObject.h:653
btCollisionObject::isKinematicObject
bool isKinematicObject() const
Definition: btCollisionObject.h:201
btCollisionObject::m_contactDamping
btScalar m_contactDamping
Definition: btCollisionObject.h:89
btCollisionObjectDoubleData::m_interpolationLinearVelocity
btVector3DoubleData m_interpolationLinearVelocity
Definition: btCollisionObject.h:623
btCollisionObject::getInterpolationLinearVelocity
const btVector3 & getInterpolationLinearVelocity() const
Definition: btCollisionObject.h:437
btCollisionObject::m_deactivationTime
btScalar m_deactivationTime
Definition: btCollisionObject.h:83
btCollisionObjectFloatData::m_collisionFilterMask
int m_collisionFilterMask
Definition: btCollisionObject.h:679
btCollisionObjectFloatData::m_ccdMotionThreshold
float m_ccdMotionThreshold
Definition: btCollisionObject.h:670
btVector3FloatData
Definition: btVector3.h:1282
btCollisionObjectDoubleData::m_restitution
double m_restitution
Definition: btCollisionObject.h:632
btCollisionObjectFloatData::m_deactivationTime
float m_deactivationTime
Definition: btCollisionObject.h:662
btCollisionObject::m_spinningFriction
btScalar m_spinningFriction
Definition: btCollisionObject.h:88
btCollisionObjectFloatData::m_restitution
float m_restitution
Definition: btCollisionObject.h:667
btCollisionObjectFloatData::m_uniqueId
int m_uniqueId
Definition: btCollisionObject.h:680
btCollisionObject::isStaticOrKinematicObject
bool isStaticOrKinematicObject() const
Definition: btCollisionObject.h:206
btCollisionObjectDoubleData::m_deactivationTime
double m_deactivationTime
Definition: btCollisionObject.h:627
btCollisionObject::m_internalType
int m_internalType
m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody,...
Definition: btCollisionObject.h:94
btCollisionObjectFloatData::m_broadphaseHandle
void * m_broadphaseHandle
Definition: btCollisionObject.h:651
btCollisionObject::setIgnoreCollisionCheck
void setIgnoreCollisionCheck(const btCollisionObject *co, bool ignoreCollisionCheck)
Definition: btCollisionObject.h:237
btCollisionObject::m_hasAnisotropicFriction
int m_hasAnisotropicFriction
Definition: btCollisionObject.h:63
btCollisionObjectFloatData::m_collisionShape
void * m_collisionShape
Definition: btCollisionObject.h:652
btCollisionObject::getWorldTransform
btTransform & getWorldTransform()
Definition: btCollisionObject.h:378
btCollisionObject::checkCollideWith
bool checkCollideWith(const btCollisionObject *co) const
Definition: btCollisionObject.h:595
btCollisionObject::getObjectWithoutCollision
const btCollisionObject * getObjectWithoutCollision(int index)
Definition: btCollisionObject.h:260
btCollisionShape
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
Definition: btCollisionShape.h:28
ISLAND_SLEEPING
#define ISLAND_SLEEPING
Definition: btCollisionObject.h:23
btCollisionObjectDoubleData::m_contactDamping
double m_contactDamping
Definition: btCollisionObject.h:630
btCollisionObject::setRestitution
void setRestitution(btScalar rest)
Definition: btCollisionObject.h:310
btCollisionObject::m_collisionShape
btCollisionShape * m_collisionShape
Definition: btCollisionObject.h:67
btCollisionObject::setUserIndex3
void setUserIndex3(int index)
Definition: btCollisionObject.h:564
btCollisionObject::m_worldArrayIndex
int m_worldArrayIndex
Definition: btCollisionObject.h:80
btVector3DoubleData
Definition: btVector3.h:1287
btCollisionObject::getCcdSquareMotionThreshold
btScalar getCcdSquareMotionThreshold() const
Definition: btCollisionObject.h:515
btCollisionObject::setCcdSweptSphereRadius
void setCcdSweptSphereRadius(btScalar radius)
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
Definition: btCollisionObject.h:505
btCollisionObject::setCollisionShape
virtual void setCollisionShape(btCollisionShape *collisionShape)
Definition: btCollisionObject.h:220
btCollisionObject::m_anisotropicFriction
btVector3 m_anisotropicFriction
Definition: btCollisionObject.h:62
btCollisionObject::m_rootCollisionShape
btCollisionShape * m_rootCollisionShape
m_rootCollisionShape is temporarily used to store the original collision shape The m_collisionShape m...
Definition: btCollisionObject.h:74
btCollisionObjectFloatData::m_rollingFriction
float m_rollingFriction
Definition: btCollisionObject.h:664
btCollisionObject::setSpinningFriction
void setSpinningFriction(btScalar frict)
Definition: btCollisionObject.h:338
btCollisionObject::setUserIndex
void setUserIndex(int index)
users can point to their objects, userPointer is not used by Bullet
Definition: btCollisionObject.h:554
btCollisionObject::getDeactivationTime
btScalar getDeactivationTime() const
Definition: btCollisionObject.h:296
btCollisionObjectFloatData::m_activationState1
int m_activationState1
Definition: btCollisionObject.h:675
btAlignedAllocator.h
btCollisionObjectFloatData::m_worldTransform
btTransformFloatData m_worldTransform
Definition: btCollisionObject.h:656
btCollisionObject::getAnisotropicFriction
const btVector3 & getAnisotropicFriction() const
Definition: btCollisionObject.h:170
btCollisionObject::m_customDebugColorRGB
btVector3 m_customDebugColorRGB
Definition: btCollisionObject.h:123
btCollisionObjectFloatData::m_interpolationAngularVelocity
btVector3FloatData m_interpolationAngularVelocity
Definition: btCollisionObject.h:659
btCollisionObject::m_userIndex3
int m_userIndex3
Definition: btCollisionObject.h:104
btCollisionObject::getBroadphaseHandle
btBroadphaseProxy * getBroadphaseHandle()
Definition: btCollisionObject.h:394
btCollisionObject::setFriction
void setFriction(btScalar frict)
Definition: btCollisionObject.h:319
btCollisionObject::getInterpolationWorldTransform
const btTransform & getInterpolationWorldTransform() const
Definition: btCollisionObject.h:409
btCollisionObject::setWorldTransform
void setWorldTransform(const btTransform &worldTrans)
Definition: btCollisionObject.h:388
btCollisionObject::getRollingFriction
btScalar getRollingFriction() const
Definition: btCollisionObject.h:334
btTransform.h
btCollisionObject::getUserIndex3
int getUserIndex3() const
Definition: btCollisionObject.h:542
btCollisionObject::calculateSerializeBufferSize
virtual int calculateSerializeBufferSize() const
Definition: btCollisionObject.h:684
btCollisionObject::setCompanionId
void setCompanionId(int id)
Definition: btCollisionObject.h:462
btTransform
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:30
btCollisionObject::m_activationState1
int m_activationState1
Definition: btCollisionObject.h:82
btCollisionObject::getUserIndex
int getUserIndex() const
Definition: btCollisionObject.h:532
btCollisionObject::getCollisionFlags
int getCollisionFlags() const
Definition: btCollisionObject.h:488
btCollisionObject::setDeactivationTime
void setDeactivationTime(btScalar time)
Definition: btCollisionObject.h:292
btCollisionObjectFloatData::m_anisotropicFriction
btVector3FloatData m_anisotropicFriction
Definition: btCollisionObject.h:660
btCollisionObject::isStaticObject
bool isStaticObject() const
Definition: btCollisionObject.h:196
btCollisionObject::setInterpolationAngularVelocity
void setInterpolationAngularVelocity(const btVector3 &angvel)
Definition: btCollisionObject.h:431
btCollisionObject::setInterpolationWorldTransform
void setInterpolationWorldTransform(const btTransform &trans)
Definition: btCollisionObject.h:419
btCollisionObjectDoubleData::m_activationState1
int m_activationState1
Definition: btCollisionObject.h:640
btCollisionObject::getRestitution
btScalar getRestitution() const
Definition: btCollisionObject.h:315
btCollisionObject::getInterpolationWorldTransform
btTransform & getInterpolationWorldTransform()
Definition: btCollisionObject.h:414
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:82
btCollisionObject::getContactProcessingThreshold
btScalar getContactProcessingThreshold() const
Definition: btCollisionObject.h:191
btCollisionObject::m_rollingFriction
btScalar m_rollingFriction
Definition: btCollisionObject.h:87
btCollisionObject::setAnisotropicFriction
void setAnisotropicFriction(const btVector3 &anisotropicFriction, int frictionMode=CF_ANISOTROPIC_FRICTION)
Definition: btCollisionObject.h:174
btCollisionObject::hasContactResponse
bool hasContactResponse() const
Definition: btCollisionObject.h:211
btCollisionObject::m_extensionPointer
void * m_extensionPointer
m_extensionPointer is used by some internal low-level Bullet extensions.
Definition: btCollisionObject.h:69
btCollisionObject::setUserPointer
void setUserPointer(void *userPointer)
users can point to their objects, userPointer is not used by Bullet
Definition: btCollisionObject.h:548
btCollisionObjectArray
btAlignedObjectArray< class btCollisionObject * > btCollisionObjectArray
Definition: btCollisionObject.h:30
btCollisionObject::getCcdMotionThreshold
btScalar getCcdMotionThreshold() const
Definition: btCollisionObject.h:510
btCollisionObjectFloatData::m_companionId
int m_companionId
Definition: btCollisionObject.h:674
btCollisionObject::m_contactProcessingThreshold
btScalar m_contactProcessingThreshold
Definition: btCollisionObject.h:64
btCollisionObjectDoubleData::m_contactProcessingThreshold
double m_contactProcessingThreshold
Definition: btCollisionObject.h:626
btCollisionObject::getWorldArrayIndex
int getWorldArrayIndex() const
Definition: btCollisionObject.h:467
btCollisionObject::getIslandTag
int getIslandTag() const
Definition: btCollisionObject.h:447
ATTRIBUTE_ALIGNED16
#define ATTRIBUTE_ALIGNED16(a)
Definition: btScalar.h:99
btCollisionObject::m_collisionFlags
int m_collisionFlags
Definition: btCollisionObject.h:76
btCollisionObject::m_interpolationAngularVelocity
btVector3 m_interpolationAngularVelocity
Definition: btCollisionObject.h:60
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:121
btTransformFloatData
for serialization
Definition: btTransform.h:245
btAlignedObjectArray
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
Definition: btAlignedObjectArray.h:46
btCollisionObject::internalGetExtensionPointer
void * internalGetExtensionPointer() const
Avoid using this internal API call, the extension pointer is used by some Bullet extensions.
Definition: btCollisionObject.h:277
btCollisionObjectFloatData::m_contactProcessingThreshold
float m_contactProcessingThreshold
Definition: btCollisionObject.h:661
btCollisionObject::CollisionFlags
CollisionFlags
Definition: btCollisionObject.h:129
btCollisionObjectDoubleData::m_ccdSweptSphereRadius
double m_ccdSweptSphereRadius
Definition: btCollisionObject.h:634
btCollisionObjectDoubleData::m_contactStiffness
double m_contactStiffness
Definition: btCollisionObject.h:631
btCollisionObject::setRollingFriction
void setRollingFriction(btScalar frict)
Definition: btCollisionObject.h:329
SIMD_FORCE_INLINE
#define SIMD_FORCE_INLINE
Definition: btScalar.h:98
btCollisionObject::getCollisionShape
btCollisionShape * getCollisionShape()
Definition: btCollisionObject.h:232
btCollisionObject::internalSetExtensionPointer
void internalSetExtensionPointer(void *pointer)
Avoid using this internal API call, the extension pointer is used by some Bullet extensions If you ne...
Definition: btCollisionObject.h:283
btSerializer
Definition: btSerializer.h:66
btCollisionObject::CollisionObjectTypes
CollisionObjectTypes
Definition: btCollisionObject.h:145
btCollisionObject::setBroadphaseHandle
void setBroadphaseHandle(btBroadphaseProxy *handle)
Definition: btCollisionObject.h:404
btCollisionObjectFloatData::m_hasAnisotropicFriction
int m_hasAnisotropicFriction
Definition: btCollisionObject.h:671
btCollisionObject::m_restitution
btScalar m_restitution
Definition: btCollisionObject.h:86
btCollisionObject::setCollisionFlags
void setCollisionFlags(int flags)
Definition: btCollisionObject.h:493
btCollisionObject::setInterpolationLinearVelocity
void setInterpolationLinearVelocity(const btVector3 &linvel)
Definition: btCollisionObject.h:425
btCollisionObject::getHitFraction
btScalar getHitFraction() const
Definition: btCollisionObject.h:478
btCollisionObject::getSpinningFriction
btScalar getSpinningFriction() const
Definition: btCollisionObject.h:343
btCollisionObjectDoubleData::m_collisionFlags
int m_collisionFlags
Definition: btCollisionObject.h:637
btCollisionObject::getInternalType
int getInternalType() const
reserved for Bullet internal usage
Definition: btCollisionObject.h:373
btCollisionObject::m_broadphaseHandle
btBroadphaseProxy * m_broadphaseHandle
Definition: btCollisionObject.h:66
btCollisionObject::setIslandTag
void setIslandTag(int tag)
Definition: btCollisionObject.h:452
btCollisionObject::isActive
bool isActive() const
Definition: btCollisionObject.h:305
btCollisionObjectDoubleData::m_name
char * m_name
Definition: btCollisionObject.h:619
btCollisionObjectFloatData::m_friction
float m_friction
Definition: btCollisionObject.h:663
btCollisionObjectDoubleData::m_interpolationAngularVelocity
btVector3DoubleData m_interpolationAngularVelocity
Definition: btCollisionObject.h:624
btCollisionObject::m_checkCollideWith
int m_checkCollideWith
If some object should have elaborate collision filtering by sub-classes.
Definition: btCollisionObject.h:116
btCollisionObject::getNumObjectsWithoutCollision
int getNumObjectsWithoutCollision() const
Definition: btCollisionObject.h:255
btCollisionObjectDoubleData::m_hasAnisotropicFriction
int m_hasAnisotropicFriction
Definition: btCollisionObject.h:636
btCollisionObject::getCustomDebugColor
bool getCustomDebugColor(btVector3 &colorRGB) const
Definition: btCollisionObject.h:585
btAlignedObjectArray.h
btCollisionObjectFloatData::m_contactDamping
float m_contactDamping
Definition: btCollisionObject.h:665
btCollisionObject::getCcdSweptSphereRadius
btScalar getCcdSweptSphereRadius() const
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
Definition: btCollisionObject.h:499
btCollisionObject::setContactProcessingThreshold
void setContactProcessingThreshold(btScalar contactProcessingThreshold)
the constraint solver can discard solving contacts, if the distance is above this threshold.
Definition: btCollisionObject.h:187
btCollisionObject::m_contactStiffness
btScalar m_contactStiffness
Definition: btCollisionObject.h:90
btCollisionObject::hasAnisotropicFriction
bool hasAnisotropicFriction(int frictionMode=CF_ANISOTROPIC_FRICTION) const
Definition: btCollisionObject.h:180
btCollisionObjectFloatData::m_contactStiffness
float m_contactStiffness
Definition: btCollisionObject.h:666
btCollisionObject::m_userObjectPointer
void * m_userObjectPointer
users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPoin...
Definition: btCollisionObject.h:98
btCollisionObjectFloatData::m_hitFraction
float m_hitFraction
Definition: btCollisionObject.h:668
btCollisionObjectDoubleData::m_anisotropicFriction
btVector3DoubleData m_anisotropicFriction
Definition: btCollisionObject.h:625
btCollisionObject::m_islandTag1
int m_islandTag1
Definition: btCollisionObject.h:78
btAlignedObjectArray::push_back
void push_back(const T &_Val)
Definition: btAlignedObjectArray.h:257
btCollisionObjectDoubleData::m_hitFraction
double m_hitFraction
Definition: btCollisionObject.h:633
btCollisionObjectDoubleData::m_rootCollisionShape
btCollisionShapeData * m_rootCollisionShape
Definition: btCollisionObject.h:618
btAlignedObjectArray::remove
void remove(const T &key)
Definition: btAlignedObjectArray.h:480
btCollisionObjectFloatData::m_interpolationLinearVelocity
btVector3FloatData m_interpolationLinearVelocity
Definition: btCollisionObject.h:658
btCollisionObject::getFriction
btScalar getFriction() const
Definition: btCollisionObject.h:324
btCollisionObjectFloatData::m_ccdSweptSphereRadius
float m_ccdSweptSphereRadius
Definition: btCollisionObject.h:669
btCollisionObject::m_interpolationLinearVelocity
btVector3 m_interpolationLinearVelocity
Definition: btCollisionObject.h:59
btCollisionObject::getUserPointer
void * getUserPointer() const
users can point to their objects, userPointer is not used by Bullet
Definition: btCollisionObject.h:527
btCollisionObjectDoubleData::m_collisionFilterGroup
int m_collisionFilterGroup
Definition: btCollisionObject.h:643
btCollisionObjectDoubleData::m_internalType
int m_internalType
Definition: btCollisionObject.h:641
btCollisionObject::setUserIndex2
void setUserIndex2(int index)
Definition: btCollisionObject.h:559
btCollisionObject::BT_DECLARE_ALIGNED_ALLOCATOR
BT_DECLARE_ALIGNED_ALLOCATOR()
btCollisionObjectDoubleData::m_friction
double m_friction
Definition: btCollisionObject.h:628
btCollisionObject::m_companionId
int m_companionId
Definition: btCollisionObject.h:79
btCollisionObject::m_friction
btScalar m_friction
Definition: btCollisionObject.h:85
btCollisionObject::m_userIndex2
int m_userIndex2
Definition: btCollisionObject.h:100
btAlignedObjectArray::size
int size() const
return the number of elements in the array
Definition: btAlignedObjectArray.h:142
btCollisionObject::getInterpolationAngularVelocity
const btVector3 & getInterpolationAngularVelocity() const
Definition: btCollisionObject.h:442
btCollisionObject::getCollisionShape
const btCollisionShape * getCollisionShape() const
Definition: btCollisionObject.h:227
btCollisionObjectDoubleData::m_checkCollideWith
int m_checkCollideWith
Definition: btCollisionObject.h:642
btCollisionObject::getCompanionId
int getCompanionId() const
Definition: btCollisionObject.h:457