Bullet Collision Detection & Physics Library
|
btCollisionObject can be used to manage collision detection objects. More...
#include <btCollisionObject.h>
Public Types | |
enum | CollisionFlags { CF_STATIC_OBJECT = 1, CF_KINEMATIC_OBJECT = 2, CF_NO_CONTACT_RESPONSE = 4, CF_CUSTOM_MATERIAL_CALLBACK = 8, CF_CHARACTER_OBJECT = 16, CF_DISABLE_VISUALIZE_OBJECT = 32, CF_DISABLE_SPU_COLLISION_PROCESSING = 64, CF_HAS_CONTACT_STIFFNESS_DAMPING = 128, CF_HAS_CUSTOM_DEBUG_RENDERING_COLOR = 256, CF_HAS_FRICTION_ANCHOR = 512, CF_HAS_COLLISION_SOUND_TRIGGER = 1024 } |
enum | CollisionObjectTypes { CO_COLLISION_OBJECT = 1, CO_RIGID_BODY = 2, CO_GHOST_OBJECT = 4, CO_SOFT_BODY = 8, CO_HF_FLUID = 16, CO_USER_TYPE = 32, CO_FEATHERSTONE_LINK = 64 } |
enum | AnisotropicFrictionFlags { CF_ANISOTROPIC_FRICTION_DISABLED = 0, CF_ANISOTROPIC_FRICTION = 1, CF_ANISOTROPIC_ROLLING_FRICTION = 2 } |
Public Member Functions | |
BT_DECLARE_ALIGNED_ALLOCATOR () | |
bool | mergesSimulationIslands () const |
const btVector3 & | getAnisotropicFriction () const |
void | setAnisotropicFriction (const btVector3 &anisotropicFriction, int frictionMode=CF_ANISOTROPIC_FRICTION) |
bool | hasAnisotropicFriction (int frictionMode=CF_ANISOTROPIC_FRICTION) const |
void | setContactProcessingThreshold (btScalar contactProcessingThreshold) |
the constraint solver can discard solving contacts, if the distance is above this threshold. More... | |
btScalar | getContactProcessingThreshold () const |
bool | isStaticObject () const |
bool | isKinematicObject () const |
bool | isStaticOrKinematicObject () const |
bool | hasContactResponse () const |
btCollisionObject () | |
virtual | ~btCollisionObject () |
virtual void | setCollisionShape (btCollisionShape *collisionShape) |
const btCollisionShape * | getCollisionShape () const |
btCollisionShape * | getCollisionShape () |
void | setIgnoreCollisionCheck (const btCollisionObject *co, bool ignoreCollisionCheck) |
virtual bool | checkCollideWithOverride (const btCollisionObject *co) const |
void * | internalGetExtensionPointer () const |
Avoid using this internal API call, the extension pointer is used by some Bullet extensions. More... | |
void | internalSetExtensionPointer (void *pointer) |
Avoid using this internal API call, the extension pointer is used by some Bullet extensions If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead. More... | |
int | getActivationState () const |
void | setActivationState (int newState) const |
void | setDeactivationTime (btScalar time) |
btScalar | getDeactivationTime () const |
void | forceActivationState (int newState) const |
void | activate (bool forceActivation=false) const |
bool | isActive () const |
void | setRestitution (btScalar rest) |
btScalar | getRestitution () const |
void | setFriction (btScalar frict) |
btScalar | getFriction () const |
void | setRollingFriction (btScalar frict) |
btScalar | getRollingFriction () const |
void | setSpinningFriction (btScalar frict) |
btScalar | getSpinningFriction () const |
void | setContactStiffnessAndDamping (btScalar stiffness, btScalar damping) |
btScalar | getContactStiffness () const |
btScalar | getContactDamping () const |
int | getInternalType () const |
reserved for Bullet internal usage More... | |
btTransform & | getWorldTransform () |
const btTransform & | getWorldTransform () const |
void | setWorldTransform (const btTransform &worldTrans) |
btBroadphaseProxy * | getBroadphaseHandle () |
const btBroadphaseProxy * | getBroadphaseHandle () const |
void | setBroadphaseHandle (btBroadphaseProxy *handle) |
const btTransform & | getInterpolationWorldTransform () const |
btTransform & | getInterpolationWorldTransform () |
void | setInterpolationWorldTransform (const btTransform &trans) |
void | setInterpolationLinearVelocity (const btVector3 &linvel) |
void | setInterpolationAngularVelocity (const btVector3 &angvel) |
const btVector3 & | getInterpolationLinearVelocity () const |
const btVector3 & | getInterpolationAngularVelocity () const |
int | getIslandTag () const |
void | setIslandTag (int tag) |
int | getCompanionId () const |
void | setCompanionId (int id) |
int | getWorldArrayIndex () const |
void | setWorldArrayIndex (int ix) |
btScalar | getHitFraction () const |
void | setHitFraction (btScalar hitFraction) |
int | getCollisionFlags () const |
void | setCollisionFlags (int flags) |
btScalar | getCcdSweptSphereRadius () const |
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: More... | |
void | setCcdSweptSphereRadius (btScalar radius) |
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: More... | |
btScalar | getCcdMotionThreshold () const |
btScalar | getCcdSquareMotionThreshold () const |
void | setCcdMotionThreshold (btScalar ccdMotionThreshold) |
Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold. More... | |
void * | getUserPointer () const |
users can point to their objects, userPointer is not used by Bullet More... | |
int | getUserIndex () const |
int | getUserIndex2 () const |
int | getUserIndex3 () const |
void | setUserPointer (void *userPointer) |
users can point to their objects, userPointer is not used by Bullet More... | |
void | setUserIndex (int index) |
users can point to their objects, userPointer is not used by Bullet More... | |
void | setUserIndex2 (int index) |
void | setUserIndex3 (int index) |
int | getUpdateRevisionInternal () const |
void | setCustomDebugColor (const btVector3 &colorRGB) |
void | removeCustomDebugColor () |
bool | getCustomDebugColor (btVector3 &colorRGB) const |
bool | checkCollideWith (const btCollisionObject *co) const |
virtual int | calculateSerializeBufferSize () const |
virtual const char * | serialize (void *dataBuffer, class btSerializer *serializer) const |
fills the dataBuffer and returns the struct name (and 0 on failure) More... | |
virtual void | serializeSingleObject (class btSerializer *serializer) const |
Protected Attributes | |
btTransform | m_worldTransform |
btTransform | m_interpolationWorldTransform |
m_interpolationWorldTransform is used for CCD and interpolation it can be either previous or future (predicted) transform More... | |
btVector3 | m_interpolationLinearVelocity |
btVector3 | m_interpolationAngularVelocity |
btVector3 | m_anisotropicFriction |
int | m_hasAnisotropicFriction |
btScalar | m_contactProcessingThreshold |
btBroadphaseProxy * | m_broadphaseHandle |
btCollisionShape * | m_collisionShape |
void * | m_extensionPointer |
m_extensionPointer is used by some internal low-level Bullet extensions. More... | |
btCollisionShape * | m_rootCollisionShape |
m_rootCollisionShape is temporarily used to store the original collision shape The m_collisionShape might be temporarily replaced by a child collision shape during collision detection purposes If it is NULL, the m_collisionShape is not temporarily replaced. More... | |
int | m_collisionFlags |
int | m_islandTag1 |
int | m_companionId |
int | m_worldArrayIndex |
int | m_activationState1 |
btScalar | m_deactivationTime |
btScalar | m_friction |
btScalar | m_restitution |
btScalar | m_rollingFriction |
btScalar | m_spinningFriction |
btScalar | m_contactDamping |
btScalar | m_contactStiffness |
int | m_internalType |
m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody, btSoftBody, btGhostObject etc. More... | |
void * | m_userObjectPointer |
users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer More... | |
int | m_userIndex2 |
int | m_userIndex |
int | m_userIndex3 |
btScalar | m_hitFraction |
time of impact calculation More... | |
btScalar | m_ccdSweptSphereRadius |
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: More... | |
btScalar | m_ccdMotionThreshold |
Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold. More... | |
int | m_checkCollideWith |
If some object should have elaborate collision filtering by sub-classes. More... | |
btAlignedObjectArray< const btCollisionObject * > | m_objectsWithoutCollisionCheck |
int | m_updateRevision |
internal update revision number. It will be increased when the object changes. This allows some subsystems to perform lazy evaluation. More... | |
btVector3 | m_customDebugColorRGB |
btCollisionObject can be used to manage collision detection objects.
btCollisionObject maintains all information that is needed for a collision detection: Shape, Transform and AABB proxy. They can be added to the btCollisionWorld.
Definition at line 48 of file btCollisionObject.h.
Enumerator | |
---|---|
CF_ANISOTROPIC_FRICTION_DISABLED | |
CF_ANISOTROPIC_FRICTION | |
CF_ANISOTROPIC_ROLLING_FRICTION |
Definition at line 156 of file btCollisionObject.h.
Definition at line 128 of file btCollisionObject.h.
Definition at line 143 of file btCollisionObject.h.
btCollisionObject::btCollisionObject | ( | ) |
Definition at line 20 of file btCollisionObject.cpp.
|
virtual |
Definition at line 57 of file btCollisionObject.cpp.
void btCollisionObject::activate | ( | bool | forceActivation = false | ) | const |
Definition at line 72 of file btCollisionObject.cpp.
btCollisionObject::BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
|
inlinevirtual |
Reimplemented in btSoftBody, btRigidBody, and btMultiBodyLinkCollider.
Definition at line 673 of file btCollisionObject.h.
|
inline |
Definition at line 584 of file btCollisionObject.h.
|
inlinevirtual |
Reimplemented in btMultiBodyLinkCollider.
Definition at line 254 of file btCollisionObject.h.
void btCollisionObject::forceActivationState | ( | int | newState | ) | const |
Definition at line 67 of file btCollisionObject.cpp.
|
inline |
Definition at line 277 of file btCollisionObject.h.
|
inline |
Definition at line 169 of file btCollisionObject.h.
|
inline |
Definition at line 383 of file btCollisionObject.h.
|
inline |
Definition at line 388 of file btCollisionObject.h.
|
inline |
Definition at line 499 of file btCollisionObject.h.
|
inline |
Definition at line 504 of file btCollisionObject.h.
|
inline |
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
Definition at line 488 of file btCollisionObject.h.
|
inline |
Definition at line 477 of file btCollisionObject.h.
|
inline |
Definition at line 231 of file btCollisionObject.h.
|
inline |
Definition at line 226 of file btCollisionObject.h.
|
inline |
Definition at line 446 of file btCollisionObject.h.
|
inline |
Definition at line 356 of file btCollisionObject.h.
|
inline |
Definition at line 190 of file btCollisionObject.h.
|
inline |
Definition at line 351 of file btCollisionObject.h.
|
inline |
Definition at line 574 of file btCollisionObject.h.
|
inline |
Definition at line 285 of file btCollisionObject.h.
|
inline |
Definition at line 313 of file btCollisionObject.h.
|
inline |
Definition at line 467 of file btCollisionObject.h.
|
inline |
reserved for Bullet internal usage
Definition at line 362 of file btCollisionObject.h.
|
inline |
Definition at line 431 of file btCollisionObject.h.
|
inline |
Definition at line 426 of file btCollisionObject.h.
|
inline |
Definition at line 403 of file btCollisionObject.h.
|
inline |
Definition at line 398 of file btCollisionObject.h.
|
inline |
Definition at line 436 of file btCollisionObject.h.
|
inline |
Definition at line 304 of file btCollisionObject.h.
|
inline |
Definition at line 323 of file btCollisionObject.h.
|
inline |
Definition at line 332 of file btCollisionObject.h.
|
inline |
Definition at line 558 of file btCollisionObject.h.
|
inline |
Definition at line 521 of file btCollisionObject.h.
|
inline |
Definition at line 526 of file btCollisionObject.h.
|
inline |
Definition at line 531 of file btCollisionObject.h.
|
inline |
users can point to their objects, userPointer is not used by Bullet
Definition at line 516 of file btCollisionObject.h.
|
inline |
Definition at line 456 of file btCollisionObject.h.
|
inline |
Definition at line 367 of file btCollisionObject.h.
|
inline |
Definition at line 372 of file btCollisionObject.h.
|
inline |
Definition at line 179 of file btCollisionObject.h.
|
inline |
Definition at line 210 of file btCollisionObject.h.
|
inline |
Avoid using this internal API call, the extension pointer is used by some Bullet extensions.
If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead.
Definition at line 266 of file btCollisionObject.h.
|
inline |
Avoid using this internal API call, the extension pointer is used by some Bullet extensions If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead.
Definition at line 272 of file btCollisionObject.h.
|
inline |
Definition at line 294 of file btCollisionObject.h.
|
inline |
Definition at line 200 of file btCollisionObject.h.
|
inline |
Definition at line 195 of file btCollisionObject.h.
|
inline |
Definition at line 205 of file btCollisionObject.h.
|
inline |
static objects, kinematic and object without contact response don't merge islands
Definition at line 163 of file btCollisionObject.h.
|
inline |
Definition at line 569 of file btCollisionObject.h.
|
virtual |
fills the dataBuffer and returns the struct name (and 0 on failure)
Reimplemented in btSoftBody, btRigidBody, and btMultiBodyLinkCollider.
Definition at line 81 of file btCollisionObject.cpp.
|
virtual |
Reimplemented in btRigidBody.
Definition at line 132 of file btCollisionObject.cpp.
void btCollisionObject::setActivationState | ( | int | newState | ) | const |
Definition at line 61 of file btCollisionObject.cpp.
|
inline |
Definition at line 173 of file btCollisionObject.h.
|
inline |
Definition at line 393 of file btCollisionObject.h.
|
inline |
Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold.
Definition at line 510 of file btCollisionObject.h.
|
inline |
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
Definition at line 494 of file btCollisionObject.h.
|
inline |
Definition at line 482 of file btCollisionObject.h.
|
inlinevirtual |
Reimplemented in btSoftBody.
Definition at line 219 of file btCollisionObject.h.
|
inline |
Definition at line 451 of file btCollisionObject.h.
|
inline |
the constraint solver can discard solving contacts, if the distance is above this threshold.
0 by default. Note that using contacts with positive distance can improve stability. It increases, however, the chance of colliding with degerate contacts, such as 'interior' triangle edges
Definition at line 186 of file btCollisionObject.h.
|
inline |
Definition at line 336 of file btCollisionObject.h.
|
inline |
Definition at line 563 of file btCollisionObject.h.
|
inline |
Definition at line 281 of file btCollisionObject.h.
|
inline |
Definition at line 308 of file btCollisionObject.h.
|
inline |
Definition at line 472 of file btCollisionObject.h.
|
inline |
Definition at line 236 of file btCollisionObject.h.
|
inline |
Definition at line 420 of file btCollisionObject.h.
|
inline |
Definition at line 414 of file btCollisionObject.h.
|
inline |
Definition at line 408 of file btCollisionObject.h.
|
inline |
Definition at line 441 of file btCollisionObject.h.
|
inline |
Definition at line 299 of file btCollisionObject.h.
|
inline |
Definition at line 318 of file btCollisionObject.h.
|
inline |
Definition at line 327 of file btCollisionObject.h.
|
inline |
users can point to their objects, userPointer is not used by Bullet
Definition at line 543 of file btCollisionObject.h.
|
inline |
Definition at line 548 of file btCollisionObject.h.
|
inline |
Definition at line 553 of file btCollisionObject.h.
|
inline |
users can point to their objects, userPointer is not used by Bullet
Definition at line 537 of file btCollisionObject.h.
|
inline |
Definition at line 462 of file btCollisionObject.h.
|
inline |
Definition at line 377 of file btCollisionObject.h.
|
mutableprotected |
Definition at line 82 of file btCollisionObject.h.
|
protected |
Definition at line 62 of file btCollisionObject.h.
|
protected |
Definition at line 66 of file btCollisionObject.h.
|
protected |
Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold.
Definition at line 113 of file btCollisionObject.h.
|
protected |
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
Definition at line 110 of file btCollisionObject.h.
|
protected |
If some object should have elaborate collision filtering by sub-classes.
Definition at line 116 of file btCollisionObject.h.
|
protected |
Definition at line 76 of file btCollisionObject.h.
|
protected |
Definition at line 67 of file btCollisionObject.h.
|
protected |
Definition at line 79 of file btCollisionObject.h.
|
protected |
Definition at line 89 of file btCollisionObject.h.
|
protected |
Definition at line 64 of file btCollisionObject.h.
|
protected |
Definition at line 90 of file btCollisionObject.h.
|
protected |
Definition at line 123 of file btCollisionObject.h.
|
mutableprotected |
Definition at line 83 of file btCollisionObject.h.
|
protected |
m_extensionPointer is used by some internal low-level Bullet extensions.
Definition at line 69 of file btCollisionObject.h.
|
protected |
Definition at line 85 of file btCollisionObject.h.
|
protected |
Definition at line 63 of file btCollisionObject.h.
|
protected |
time of impact calculation
Definition at line 107 of file btCollisionObject.h.
|
protected |
m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody, btSoftBody, btGhostObject etc.
do not assign your own m_internalType unless you write a new dynamics object class.
Definition at line 94 of file btCollisionObject.h.
|
protected |
Definition at line 60 of file btCollisionObject.h.
|
protected |
Definition at line 59 of file btCollisionObject.h.
|
protected |
m_interpolationWorldTransform is used for CCD and interpolation it can be either previous or future (predicted) transform
Definition at line 56 of file btCollisionObject.h.
|
protected |
Definition at line 78 of file btCollisionObject.h.
|
protected |
Definition at line 118 of file btCollisionObject.h.
|
protected |
Definition at line 86 of file btCollisionObject.h.
|
protected |
Definition at line 87 of file btCollisionObject.h.
|
protected |
m_rootCollisionShape is temporarily used to store the original collision shape The m_collisionShape might be temporarily replaced by a child collision shape during collision detection purposes If it is NULL, the m_collisionShape is not temporarily replaced.
Definition at line 74 of file btCollisionObject.h.
|
protected |
Definition at line 88 of file btCollisionObject.h.
|
protected |
internal update revision number. It will be increased when the object changes. This allows some subsystems to perform lazy evaluation.
Definition at line 121 of file btCollisionObject.h.
|
protected |
Definition at line 102 of file btCollisionObject.h.
|
protected |
Definition at line 100 of file btCollisionObject.h.
|
protected |
Definition at line 104 of file btCollisionObject.h.
|
protected |
users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer
Definition at line 98 of file btCollisionObject.h.
|
protected |
Definition at line 80 of file btCollisionObject.h.
|
protected |
Definition at line 52 of file btCollisionObject.h.