16 #ifndef BT_COLLISION_OBJECT_H
17 #define BT_COLLISION_OBJECT_H
23 #define ISLAND_SLEEPING 2
24 #define WANTS_DEACTIVATION 3
25 #define DISABLE_DEACTIVATION 4
26 #define DISABLE_SIMULATION 5
37 #ifdef BT_USE_DOUBLE_PRECISION
38 #define btCollisionObjectData btCollisionObjectDoubleData
39 #define btCollisionObjectDataName "btCollisionObjectDoubleData"
41 #define btCollisionObjectData btCollisionObjectFloatData
42 #define btCollisionObjectDataName "btCollisionObjectFloatData"
176 bool isUnity = (anisotropicFriction[0] != 1.f) || (anisotropicFriction[1] != 1.f) || (anisotropicFriction[2] != 1.f);
238 if (ignoreCollisionCheck)
591 return hasCustomColor;
void internalSetExtensionPointer(void *pointer)
void removeCustomDebugColor()
btScalar m_contactStiffness
btVector3 m_interpolationAngularVelocity
BT_DECLARE_ALIGNED_ALLOCATOR()
void setUserPointer(void *userPointer)
users can point to their objects, userPointer is not used by Bullet
btScalar getDeactivationTime() const
btScalar getFriction() const
const btVector3 & getInterpolationAngularVelocity() const
void setWorldArrayIndex(int ix)
SIMD_FORCE_INLINE int getWorldArrayIndex() const
SIMD_FORCE_INLINE int getCompanionId() const
SIMD_FORCE_INLINE bool isStaticOrKinematicObject() const
btVector3 m_anisotropicFriction
SIMD_FORCE_INLINE btBroadphaseProxy * getBroadphaseHandle()
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
#define btCollisionObjectData
void setWorldTransform(const btTransform &worldTrans)
btScalar getContactStiffness() const
virtual int calculateSerializeBufferSize() const
void * m_extensionPointer
m_extensionPointer is used by some internal low-level Bullet extensions.
int m_hasAnisotropicFriction
void activate(bool forceActivation=false) const
SIMD_FORCE_INLINE int getCollisionFlags() const
btScalar m_ccdMotionThreshold
Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold...
void setCcdSweptSphereRadius(btScalar radius)
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
void setRestitution(btScalar rest)
void setHitFraction(btScalar hitFraction)
void setUserIndex3(int index)
void setCcdMotionThreshold(btScalar ccdMotionThreshold)
Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold...
void setIslandTag(int tag)
btScalar m_deactivationTime
void setAnisotropicFriction(const btVector3 &anisotropicFriction, int frictionMode=CF_ANISOTROPIC_FRICTION)
@ CF_HAS_COLLISION_SOUND_TRIGGER
@ CF_HAS_CONTACT_STIFFNESS_DAMPING
@ CF_DISABLE_VISUALIZE_OBJECT
@ CF_HAS_CUSTOM_DEBUG_RENDERING_COLOR
@ CF_DISABLE_SPU_COLLISION_PROCESSING
@ CF_CUSTOM_MATERIAL_CALLBACK
btTransform m_interpolationWorldTransform
void setActivationState(int newState) const
const btVector3 & getAnisotropicFriction() const
void setDeactivationTime(btScalar time)
btScalar m_contactProcessingThreshold
void * m_userObjectPointer
users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPoin...
void setContactProcessingThreshold(btScalar contactProcessingThreshold)
int m_checkCollideWith
If some object should have elaborate collision filtering by sub-classes.
const btCollisionObject * getObjectWithoutCollision(int index)
virtual bool checkCollideWithOverride(const btCollisionObject *co) const
void setInterpolationLinearVelocity(const btVector3 &linvel)
int getUserIndex3() const
btScalar m_hitFraction
time of impact calculation
btScalar m_rollingFriction
btVector3 m_customDebugColorRGB
void setCustomDebugColor(const btVector3 &colorRGB)
btAlignedObjectArray< class btCollisionObject * > btCollisionObjectArray
void setInterpolationAngularVelocity(const btVector3 &angvel)
void setContactStiffnessAndDamping(btScalar stiffness, btScalar damping)
int getNumObjectsWithoutCollision() const
void setUserIndex(int index)
users can point to their objects, userPointer is not used by Bullet
btScalar m_spinningFriction
void setRollingFriction(btScalar frict)
SIMD_FORCE_INLINE int getActivationState() const
bool checkCollideWith(const btCollisionObject *co) const
void forceActivationState(int newState) const
int getInternalType() const
reserved for Bullet internal usage
bool getCustomDebugColor(btVector3 &colorRGB) const
virtual ~btCollisionObject()
void * getUserPointer() const
users can point to their objects, userPointer is not used by Bullet
btCollisionShape * m_rootCollisionShape
void setUserIndex2(int index)
void setFriction(btScalar frict)
void setCompanionId(int id)
SIMD_FORCE_INLINE bool isKinematicObject() const
@ CF_ANISOTROPIC_FRICTION
@ CF_ANISOTROPIC_ROLLING_FRICTION
@ CF_ANISOTROPIC_FRICTION_DISABLED
virtual void setCollisionShape(btCollisionShape *collisionShape)
bool hasAnisotropicFriction(int frictionMode=CF_ANISOTROPIC_FRICTION) const
void setCollisionFlags(int flags)
SIMD_FORCE_INLINE bool isActive() const
btScalar getContactDamping() const
btScalar getRollingFriction() const
SIMD_FORCE_INLINE bool mergesSimulationIslands() const
btScalar m_ccdSweptSphereRadius
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
void * internalGetExtensionPointer() const
SIMD_FORCE_INLINE bool hasContactResponse() const
SIMD_FORCE_INLINE int getIslandTag() const
int getUpdateRevisionInternal() const
btVector3 m_interpolationLinearVelocity
SIMD_FORCE_INLINE btScalar getHitFraction() const
btScalar getCcdMotionThreshold() const
const btVector3 & getInterpolationLinearVelocity() const
const btTransform & getInterpolationWorldTransform() const
btScalar getSpinningFriction() const
btScalar getRestitution() const
btScalar getCcdSquareMotionThreshold() const
SIMD_FORCE_INLINE const btCollisionShape * getCollisionShape() const
btTransform & getWorldTransform()
void setInterpolationWorldTransform(const btTransform &trans)
#define DISABLE_SIMULATION
btScalar getContactProcessingThreshold() const
void setIgnoreCollisionCheck(const btCollisionObject *co, bool ignoreCollisionCheck)
void setSpinningFriction(btScalar frict)
btScalar getCcdSweptSphereRadius() const
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
virtual void serializeSingleObject(class btSerializer *serializer) const
btScalar m_contactDamping
void setBroadphaseHandle(btBroadphaseProxy *handle)
btAlignedObjectArray< const btCollisionObject * > m_objectsWithoutCollisionCheck
int m_updateRevision
internal update revision number. It will be increased when the object changes. This allows some subsy...
SIMD_FORCE_INLINE bool isStaticObject() const
int getUserIndex2() const
btCollisionShape * m_collisionShape
btBroadphaseProxy * m_broadphaseHandle
btCollisionShape
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
#define SIMD_FORCE_INLINE
btTransform m_worldTransform
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
int findLinearSearch(const T &key) const
SIMD_FORCE_INLINE int size() const
return the number of elements in the array
void remove(const T &key)
SIMD_FORCE_INLINE void push_back(const T &_Val)
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btVector3DoubleData m_anisotropicFriction
btVector3DoubleData m_interpolationLinearVelocity
int m_collisionFilterMask
double m_deactivationTime
double m_contactProcessingThreshold
int m_hasAnisotropicFriction
double m_ccdSweptSphereRadius
btTransformDoubleData m_interpolationWorldTransform
int m_collisionFilterGroup
btTransformDoubleData m_worldTransform
void * m_broadphaseHandle
double m_contactStiffness
btVector3DoubleData m_interpolationAngularVelocity
btCollisionShapeData * m_rootCollisionShape
double m_ccdMotionThreshold
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btVector3FloatData m_interpolationLinearVelocity
float m_ccdSweptSphereRadius
btVector3FloatData m_anisotropicFriction
float m_contactProcessingThreshold
int m_collisionFilterMask
btTransformFloatData m_interpolationWorldTransform
float m_ccdMotionThreshold
btVector3FloatData m_interpolationAngularVelocity
btTransformFloatData m_worldTransform
int m_collisionFilterGroup
int m_hasAnisotropicFriction
btCollisionShapeData * m_rootCollisionShape
void * m_broadphaseHandle
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64