|
Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
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
bool(* ContactDestroyedCallback)(void *userPersistentData)
void setContactProcessingThreshold(btScalar contactProcessingThreshold)
void setContactBreakingThreshold(btScalar contactBreakingThreshold)
btCollisionObject can be used to manage collision detection objects.
btManifoldPoint m_pointCache[MANIFOLD_CACHE_SIZE]
void refreshContactPoints(const btTransform &trA, const btTransform &trB)
calculated new worldspace coordinates and depth, and reject points that exceed the collision margin
ContactStartedCallback gContactStartedCallback
void setNumContacts(int cachedPoints)
the setNumContacts API is usually not used, except when you gather/fill all contacts manually
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
bool(* ContactProcessedCallback)(btManifoldPoint &cp, void *body0, void *body1)
ContactProcessedCallback gContactProcessedCallback
void(* ContactStartedCallback)(btPersistentManifold *const &manifold)
const btCollisionObject * getBody0() const
void clearUserCache(btManifoldPoint &pt)
int getNumContacts() const
int sortCachedPoints(const btManifoldPoint &pt)
sort cached points so most isolated points come first
btScalar m_contactProcessingThreshold
bool validContactDistance(const btManifoldPoint &pt) const
@ BT_CONTACT_FLAG_FRICTION_ANCHOR
ContactEndedCallback gContactEndedCallback
ManifoldContactPoint collects and maintains persistent contactpoints.
void * m_userPersistentData
btScalar getContactProcessingThreshold() const
void removeContactPoint(int index)
#define BT_DECLARE_ALIGNED_ALLOCATOR()
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
int addManifoldPoint(const btManifoldPoint &newPoint, bool isPredictive=false)
void setBodies(const btCollisionObject *body0, const btCollisionObject *body1)
#define ATTRIBUTE_ALIGNED16(a)
void replaceContactPoint(const btManifoldPoint &newPoint, int insertIndex)
btManifoldPoint & getContactPoint(int index)
btScalar m_appliedImpulseLateral1
#define SIMD_FORCE_INLINE
#define MANIFOLD_CACHE_SIZE
rudimentary class to provide type info
@ BT_PERSISTENT_MANIFOLD_TYPE
@ MIN_CONTACT_MANIFOLD_TYPE
const btManifoldPoint & getContactPoint(int index) const
btScalar m_contactBreakingThreshold
const btCollisionObject * m_body1
int findContactPoint(const btManifoldPoint *unUsed, int numUnused, const btManifoldPoint &pt)
btPersistentManifold(const btCollisionObject *body0, const btCollisionObject *body1, int, btScalar contactBreakingThreshold, btScalar contactProcessingThreshold)
const btCollisionObject * getBody1() const
btScalar m_appliedImpulse
btScalar gContactBreakingThreshold
maximum contact breaking and merging threshold
ContactDestroyedCallback gContactDestroyedCallback
int getCacheEntry(const btManifoldPoint &newPoint) const
btScalar m_appliedImpulseLateral2
btScalar getContactBreakingThreshold() const
btScalar m_combinedFriction
void(* ContactEndedCallback)(btPersistentManifold *const &manifold)
const btCollisionObject * m_body0
this two body pointers can point to the physics rigidbody class.