Differential D1739 Diff 5899 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
Changeset View
Changeset View
Standalone View
Standalone View
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h
| Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | protected: | ||||
| btScalar m_restitution; | btScalar m_restitution; | ||||
| btScalar m_rollingFriction; | btScalar m_rollingFriction; | ||||
| ///m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody, btSoftBody, btGhostObject etc. | ///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. | ///do not assign your own m_internalType unless you write a new dynamics object class. | ||||
| int m_internalType; | int m_internalType; | ||||
| ///users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer | ///users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer | ||||
| union | |||||
| { | |||||
| void* m_userObjectPointer; | void* m_userObjectPointer; | ||||
| int m_userIndex; | int m_userIndex; | ||||
| }; | |||||
| ///time of impact calculation | ///time of impact calculation | ||||
| btScalar m_hitFraction; | btScalar m_hitFraction; | ||||
| ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: | ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: | ||||
| btScalar m_ccdSweptSphereRadius; | btScalar m_ccdSweptSphereRadius; | ||||
| /// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold | /// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold | ||||
| btScalar m_ccdMotionThreshold; | btScalar m_ccdMotionThreshold; | ||||
| /// If some object should have elaborate collision filtering by sub-classes | /// If some object should have elaborate collision filtering by sub-classes | ||||
| int m_checkCollideWith; | int m_checkCollideWith; | ||||
| btAlignedObjectArray<const btCollisionObject*> m_objectsWithoutCollisionCheck; | |||||
| ///internal update revision number. It will be increased when the object changes. This allows some subsystems to perform lazy evaluation. | ///internal update revision number. It will be increased when the object changes. This allows some subsystems to perform lazy evaluation. | ||||
| int m_updateRevision; | int m_updateRevision; | ||||
| virtual bool checkCollideWithOverride(const btCollisionObject* /* co */) const | |||||
| { | |||||
| return true; | |||||
| } | |||||
| public: | public: | ||||
| BT_DECLARE_ALIGNED_ALLOCATOR(); | BT_DECLARE_ALIGNED_ALLOCATOR(); | ||||
| enum CollisionFlags | enum CollisionFlags | ||||
| { | { | ||||
| CF_STATIC_OBJECT= 1, | CF_STATIC_OBJECT= 1, | ||||
| ▲ Show 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const | ||||
| return m_collisionShape; | return m_collisionShape; | ||||
| } | } | ||||
| SIMD_FORCE_INLINE btCollisionShape* getCollisionShape() | SIMD_FORCE_INLINE btCollisionShape* getCollisionShape() | ||||
| { | { | ||||
| return m_collisionShape; | return m_collisionShape; | ||||
| } | } | ||||
| void setIgnoreCollisionCheck(const btCollisionObject* co, bool ignoreCollisionCheck) | |||||
| { | |||||
| if (ignoreCollisionCheck) | |||||
| { | |||||
| //We don't check for duplicates. Is it ok to leave that up to the user of this API? | |||||
| //int index = m_objectsWithoutCollisionCheck.findLinearSearch(co); | |||||
| //if (index == m_objectsWithoutCollisionCheck.size()) | |||||
| //{ | |||||
| m_objectsWithoutCollisionCheck.push_back(co); | |||||
| //} | |||||
| } | |||||
| else | |||||
| { | |||||
| m_objectsWithoutCollisionCheck.remove(co); | |||||
| } | |||||
| m_checkCollideWith = m_objectsWithoutCollisionCheck.size() > 0; | |||||
| } | |||||
| virtual bool checkCollideWithOverride(const btCollisionObject* co) const | |||||
| { | |||||
| int index = m_objectsWithoutCollisionCheck.findLinearSearch(co); | |||||
| if (index < m_objectsWithoutCollisionCheck.size()) | |||||
| { | |||||
| return false; | |||||
| } | |||||
| return true; | |||||
| } | |||||
| ///Avoid using this internal API call, the extension pointer is used by some Bullet extensions. | ///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. | ///If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead. | ||||
| void* internalGetExtensionPointer() const | void* internalGetExtensionPointer() const | ||||
| { | { | ||||
| return m_extensionPointer; | return m_extensionPointer; | ||||
| ▲ Show 20 Lines • Show All 329 Lines • Show Last 20 Lines | |||||