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

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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