btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping in the broadphase. More...
#include <btPersistentManifold.h>


Public Member Functions | |
| BT_DECLARE_ALIGNED_ALLOCATOR () | |
| btPersistentManifold () | |
| btPersistentManifold (void *body0, void *body1, int, btScalar contactBreakingThreshold, btScalar contactProcessingThreshold) | |
| SIMD_FORCE_INLINE void * | getBody0 () |
| SIMD_FORCE_INLINE void * | getBody1 () |
| SIMD_FORCE_INLINE const void * | getBody0 () const |
| SIMD_FORCE_INLINE const void * | getBody1 () const |
| void | setBodies (void *body0, void *body1) |
| void | clearUserCache (btManifoldPoint &pt) |
| SIMD_FORCE_INLINE int | getNumContacts () const |
| SIMD_FORCE_INLINE const btManifoldPoint & | getContactPoint (int index) const |
| SIMD_FORCE_INLINE btManifoldPoint & | getContactPoint (int index) |
| btScalar | getContactBreakingThreshold () const |
| btScalar | getContactProcessingThreshold () const |
| int | getCacheEntry (const btManifoldPoint &newPoint) const |
| int | addManifoldPoint (const btManifoldPoint &newPoint) |
| void | removeContactPoint (int index) |
| void | replaceContactPoint (const btManifoldPoint &newPoint, int insertIndex) |
| bool | validContactDistance (const btManifoldPoint &pt) const |
| void | refreshContactPoints (const btTransform &trA, const btTransform &trB) |
| calculated new worldspace coordinates and depth, and reject points that exceed the collision margin | |
| SIMD_FORCE_INLINE void | clearManifold () |
Public Attributes | |
| int | m_index1a |
Private Member Functions | |
| int | sortCachedPoints (const btManifoldPoint &pt) |
| sort cached points so most isolated points come first | |
| int | findContactPoint (const btManifoldPoint *unUsed, int numUnused, const btManifoldPoint &pt) |
Private Attributes | |
| btManifoldPoint | m_pointCache [4] |
| void * | m_body0 |
| this two body pointers can point to the physics rigidbody class. | |
| void * | m_body1 |
| int | m_cachedPoints |
| btScalar | m_contactBreakingThreshold |
| btScalar | m_contactProcessingThreshold |
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping in the broadphase.
Those contact points are created by the collision narrow phase. The cache can be empty, or hold 1,2,3 or 4 points. Some collision algorithms (GJK) might only add one point at a time. updates/refreshes old contact points, and throw them away if necessary (distance becomes too large) reduces the cache to 4 points, when more then 4 points are added, using following rules: the contact point with deepest penetration is always kept, and it tries to maximuze the area covered by the points note that some pairs of objects might have more then one contact manifold.
Definition at line 51 of file btPersistentManifold.h.
| btPersistentManifold::btPersistentManifold | ( | ) |
Definition at line 27 of file btPersistentManifold.cpp.
| btPersistentManifold::btPersistentManifold | ( | void * | body0, | |
| void * | body1, | |||
| int | , | |||
| btScalar | contactBreakingThreshold, | |||
| btScalar | contactProcessingThreshold | |||
| ) | [inline] |
Definition at line 79 of file btPersistentManifold.h.
| int btPersistentManifold::addManifoldPoint | ( | const btManifoldPoint & | newPoint | ) |
Definition at line 166 of file btPersistentManifold.cpp.
| btPersistentManifold::BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
| SIMD_FORCE_INLINE void btPersistentManifold::clearManifold | ( | ) | [inline] |
Definition at line 189 of file btPersistentManifold.h.
| void btPersistentManifold::clearUserCache | ( | btManifoldPoint & | pt | ) |
Definition at line 52 of file btPersistentManifold.cpp.
| int btPersistentManifold::findContactPoint | ( | const btManifoldPoint * | unUsed, | |
| int | numUnused, | |||
| const btManifoldPoint & | pt | |||
| ) | [private] |
| SIMD_FORCE_INLINE const void* btPersistentManifold::getBody0 | ( | ) | const [inline] |
Definition at line 90 of file btPersistentManifold.h.
| SIMD_FORCE_INLINE void* btPersistentManifold::getBody0 | ( | ) | [inline] |
Definition at line 87 of file btPersistentManifold.h.
| SIMD_FORCE_INLINE const void* btPersistentManifold::getBody1 | ( | ) | const [inline] |
Definition at line 91 of file btPersistentManifold.h.
| SIMD_FORCE_INLINE void* btPersistentManifold::getBody1 | ( | ) | [inline] |
Definition at line 88 of file btPersistentManifold.h.
| int btPersistentManifold::getCacheEntry | ( | const btManifoldPoint & | newPoint | ) | const |
Definition at line 146 of file btPersistentManifold.cpp.
| btScalar btPersistentManifold::getContactBreakingThreshold | ( | ) | const |
Definition at line 195 of file btPersistentManifold.cpp.
| SIMD_FORCE_INLINE btManifoldPoint& btPersistentManifold::getContactPoint | ( | int | index | ) | [inline] |
Definition at line 113 of file btPersistentManifold.h.
| SIMD_FORCE_INLINE const btManifoldPoint& btPersistentManifold::getContactPoint | ( | int | index | ) | const [inline] |
Definition at line 107 of file btPersistentManifold.h.
| btScalar btPersistentManifold::getContactProcessingThreshold | ( | ) | const [inline] |
Definition at line 122 of file btPersistentManifold.h.
| SIMD_FORCE_INLINE int btPersistentManifold::getNumContacts | ( | ) | const [inline] |
Definition at line 105 of file btPersistentManifold.h.
| void btPersistentManifold::refreshContactPoints | ( | const btTransform & | trA, | |
| const btTransform & | trB | |||
| ) |
calculated new worldspace coordinates and depth, and reject points that exceed the collision margin
first refresh worldspace positions and distance
then
Definition at line 202 of file btPersistentManifold.cpp.
| void btPersistentManifold::removeContactPoint | ( | int | index | ) | [inline] |
Definition at line 131 of file btPersistentManifold.h.
| void btPersistentManifold::replaceContactPoint | ( | const btManifoldPoint & | newPoint, | |
| int | insertIndex | |||
| ) | [inline] |
Definition at line 152 of file btPersistentManifold.h.
| void btPersistentManifold::setBodies | ( | void * | body0, | |
| void * | body1 | |||
| ) | [inline] |
Definition at line 93 of file btPersistentManifold.h.
| int btPersistentManifold::sortCachedPoints | ( | const btManifoldPoint & | pt | ) | [private] |
sort cached points so most isolated points come first
Definition at line 88 of file btPersistentManifold.cpp.
| bool btPersistentManifold::validContactDistance | ( | const btManifoldPoint & | pt | ) | const [inline] |
Definition at line 181 of file btPersistentManifold.h.
void* btPersistentManifold::m_body0 [private] |
this two body pointers can point to the physics rigidbody class.
void* will allow any rigidbody class
Definition at line 58 of file btPersistentManifold.h.
void* btPersistentManifold::m_body1 [private] |
Definition at line 59 of file btPersistentManifold.h.
int btPersistentManifold::m_cachedPoints [private] |
Definition at line 60 of file btPersistentManifold.h.
Definition at line 62 of file btPersistentManifold.h.
Definition at line 63 of file btPersistentManifold.h.
Definition at line 75 of file btPersistentManifold.h.
btManifoldPoint btPersistentManifold::m_pointCache[4] [private] |
Definition at line 54 of file btPersistentManifold.h.
1.6.1