16 #ifndef BT_PERSISTENT_MANIFOLD_H 17 #define BT_PERSISTENT_MANIFOLD_H 26 struct btCollisionResult;
51 #define MANIFOLD_CACHE_SIZE 4 113 #ifdef DEBUG_PERSISTENCY 114 void DebugPersistency();
168 if(index != lastUsedIndex)
192 #define MAINTAIN_PERSISTENCY 1 193 #ifdef MAINTAIN_PERSISTENCY 199 bool replacePoint =
true;
210 btScalar a = appliedLateralImpulse1 * appliedLateralImpulse1 + appliedLateralImpulse2 * appliedLateralImpulse2;
211 btScalar b = eps + mu * appliedImpulse;
213 replacePoint = (a) > (b);
268 #endif //BT_PERSISTENT_MANIFOLD_H
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
const btCollisionObject * m_body1
btScalar getContactBreakingThreshold() const
void refreshContactPoints(const btTransform &trA, const btTransform &trB)
calculated new worldspace coordinates and depth, and reject points that exceed the collision margin ...
btScalar m_appliedImpulseLateral1
int getNumContacts() const
btScalar m_appliedImpulse
bool validContactDistance(const btManifoldPoint &pt) const
#define SIMD_FORCE_INLINE
ContactDestroyedCallback gContactDestroyedCallback
ManifoldContactPoint collects and maintains persistent contactpoints.
#define MANIFOLD_CACHE_SIZE
int sortCachedPoints(const btManifoldPoint &pt)
sort cached points so most isolated points come first
const btManifoldPoint & getContactPoint(int index) const
void setNumContacts(int cachedPoints)
the setNumContacts API is usually not used, except when you gather/fill all contacts manually ...
void * m_userPersistentData
btManifoldPoint & getContactPoint(int index)
const btCollisionObject * getBody0() const
btScalar m_appliedImpulseLateral2
void(* ContactEndedCallback)(btPersistentManifold *const &manifold)
btScalar gContactBreakingThreshold
maximum contact breaking and merging threshold
btCollisionObject can be used to manage collision detection objects.
btScalar getContactProcessingThreshold() const
ContactStartedCallback gContactStartedCallback
bool(* ContactDestroyedCallback)(void *userPersistentData)
void(* ContactStartedCallback)(btPersistentManifold *const &manifold)
#define ATTRIBUTE_ALIGNED16(a)
void removeContactPoint(int index)
ContactProcessedCallback gContactProcessedCallback
bool(* ContactProcessedCallback)(btManifoldPoint &cp, void *body0, void *body1)
rudimentary class to provide type info
const btCollisionObject * getBody1() const
void clearUserCache(btManifoldPoint &pt)
#define BT_DECLARE_ALIGNED_ALLOCATOR()
btScalar m_combinedFriction
btScalar m_contactProcessingThreshold
void setContactProcessingThreshold(btScalar contactProcessingThreshold)
btScalar m_contactBreakingThreshold
btPersistentManifold(const btCollisionObject *body0, const btCollisionObject *body1, int, btScalar contactBreakingThreshold, btScalar contactProcessingThreshold)
void replaceContactPoint(const btManifoldPoint &newPoint, int insertIndex)
int findContactPoint(const btManifoldPoint *unUsed, int numUnused, const btManifoldPoint &pt)
void setContactBreakingThreshold(btScalar contactBreakingThreshold)
const btCollisionObject * m_body0
this two body pointers can point to the physics rigidbody class.
ContactEndedCallback gContactEndedCallback
int addManifoldPoint(const btManifoldPoint &newPoint, bool isPredictive=false)
void setBodies(const btCollisionObject *body0, const btCollisionObject *body1)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btManifoldPoint m_pointCache[MANIFOLD_CACHE_SIZE]
int getCacheEntry(const btManifoldPoint &newPoint) const