Blender
V3.3
|
#include "LinearMath/btVector3.h"
#include "LinearMath/btTransform.h"
#include "btManifoldPoint.h"
#include "LinearMath/btAlignedAllocator.h"
Go to the source code of this file.
Classes | |
struct | btPersistentManifoldDoubleData |
struct | btPersistentManifoldFloatData |
Macros | |
#define | MANIFOLD_CACHE_SIZE 4 |
#define | MAINTAIN_PERSISTENCY 1 |
#define | btPersistentManifoldData btPersistentManifoldFloatData |
#define | btPersistentManifoldDataName "btPersistentManifoldFloatData" |
Typedefs | |
typedef bool(* | ContactDestroyedCallback) (void *userPersistentData) |
typedef bool(* | ContactProcessedCallback) (btManifoldPoint &cp, void *body0, void *body1) |
typedef void(* | ContactStartedCallback) (btPersistentManifold *const &manifold) |
typedef void(* | ContactEndedCallback) (btPersistentManifold *const &manifold) |
Enumerations | |
enum | btContactManifoldTypes { MIN_CONTACT_MANIFOLD_TYPE = 1024 , BT_PERSISTENT_MANIFOLD_TYPE } |
Variables | |
btScalar | gContactBreakingThreshold |
maximum contact breaking and merging threshold More... | |
ContactDestroyedCallback | gContactDestroyedCallback |
ContactProcessedCallback | gContactProcessedCallback |
ContactStartedCallback | gContactStartedCallback |
ContactEndedCallback | gContactEndedCallback |
btPersistentManifold | __pad0__ |
const btCollisionObject * | m_body0 |
this two body pointers can point to the physics rigidbody class. More... | |
const btCollisionObject * | m_body1 |
int | m_cachedPoints |
btScalar | m_contactBreakingThreshold |
btScalar | m_contactProcessingThreshold |
int | m_companionIdA |
int | m_companionIdB |
int | m_index1a |
#define btPersistentManifoldData btPersistentManifoldFloatData |
Definition at line 370 of file btPersistentManifold.h.
#define btPersistentManifoldDataName "btPersistentManifoldFloatData" |
Definition at line 371 of file btPersistentManifold.h.
#define MAINTAIN_PERSISTENCY 1 |
#define MANIFOLD_CACHE_SIZE 4 |
Definition at line 52 of file btPersistentManifold.h.
Definition at line 35 of file btPersistentManifold.h.
typedef void(* ContactEndedCallback) (btPersistentManifold *const &manifold) |
Definition at line 38 of file btPersistentManifold.h.
typedef bool(* ContactProcessedCallback) (btManifoldPoint &cp, void *body0, void *body1) |
Definition at line 36 of file btPersistentManifold.h.
typedef void(* ContactStartedCallback) (btPersistentManifold *const &manifold) |
Definition at line 37 of file btPersistentManifold.h.
Enumerator | |
---|---|
MIN_CONTACT_MANIFOLD_TYPE | |
BT_PERSISTENT_MANIFOLD_TYPE |
Definition at line 46 of file btPersistentManifold.h.
int btPersistentManifold::addManifoldPoint | ( | const btManifoldPoint & | newPoint, |
bool | isPredictive = false |
||
) |
Definition at line 212 of file btPersistentManifold.cpp.
References btAssert, clearUserCache(), getNumContacts(), m_cachedPoints, MANIFOLD_CACHE_SIZE, sortCachedPoints(), and validContactDistance().
BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
btPersistentManifold::btPersistentManifold | ( | ) |
Definition at line 35 of file btPersistentManifold.cpp.
Referenced by btSimulationIslandManagerMt::addManifoldsToIslands(), btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(), btSimulationIslandManagerMt::buildAndProcessIslands(), btSimulationIslandManager::buildIslands(), btMultiBodyDynamicsWorld::calculateSimulationIslands(), convertContacts(), createPredictiveContactsInternal(), btCollisionWorld::debugDrawWorld(), btCollisionDispatcher::getNewManifold(), btCollisionDispatcherMt::getNewManifold(), internalCollectContactManifoldCachedInfo(), btClosestNotMeConvexResultCallback::needsCollision(), btCompoundCompoundCollisionAlgorithm::processCollision(), InplaceSolverIslandCallback::processConstraints(), MultiBodyInplaceSolverIslandCallback::processConstraints(), DeformableBodyInplaceSolverIslandCallback::processConstraints(), btSimulationIslandManager::processIslands(), recoverFromPenetration(), releasePredictiveContacts(), btCollisionWorld::serializeContactManifolds(), btSimulationIslandManagerMt::solveIsland(), and btSimpleDynamicsWorld::stepSimulation().
btPersistentManifold | ( | const btCollisionObject * | body0, |
const btCollisionObject * | body1, | ||
int | , | ||
btScalar | contactBreakingThreshold, | ||
btScalar | contactProcessingThreshold | ||
) |
Definition at line 92 of file btPersistentManifold.h.
int calculateSerializeBufferSize | ( | ) | const |
SIMD_FORCE_INLINE void clearManifold | ( | ) |
Definition at line 248 of file btPersistentManifold.h.
References clearUserCache(), gContactEndedCallback, and m_cachedPoints.
void btPersistentManifold::clearUserCache | ( | btManifoldPoint & | pt | ) |
Definition at line 59 of file btPersistentManifold.cpp.
References btAssert, gContactDestroyedCallback, m_cachedPoints, and btManifoldPoint::m_userPersistentData.
Referenced by addManifoldPoint(), clearManifold(), removeContactPoint(), and replaceContactPoint().
void deSerialize | ( | const struct btPersistentManifoldDoubleData * | manifoldDataPtr | ) |
void deSerialize | ( | const struct btPersistentManifoldFloatData * | manifoldDataPtr | ) |
int findContactPoint | ( | const btManifoldPoint * | unUsed, |
int | numUnused, | ||
const btManifoldPoint & | pt | ||
) |
SIMD_FORCE_INLINE const btCollisionObject* getBody0 | ( | ) | const |
Definition at line 105 of file btPersistentManifold.h.
References m_body0.
SIMD_FORCE_INLINE const btCollisionObject* getBody1 | ( | ) | const |
Definition at line 106 of file btPersistentManifold.h.
References m_body1.
int btPersistentManifold::getCacheEntry | ( | const btManifoldPoint & | newPoint | ) | const |
Definition at line 192 of file btPersistentManifold.cpp.
References btVector3, getContactBreakingThreshold(), getNumContacts(), btManifoldPoint::m_localPointA, and size().
btScalar btPersistentManifold::getContactBreakingThreshold | ( | ) | const |
Definition at line 242 of file btPersistentManifold.cpp.
References m_contactBreakingThreshold.
Referenced by validContactDistance().
SIMD_FORCE_INLINE btManifoldPoint & getContactPoint | ( | int | index | ) | const |
Definition at line 130 of file btPersistentManifold.h.
References btAssert, and m_cachedPoints.
btScalar getContactProcessingThreshold | ( | ) | const |
Definition at line 145 of file btPersistentManifold.h.
References m_contactProcessingThreshold.
SIMD_FORCE_INLINE int getNumContacts | ( | ) | const |
Definition at line 120 of file btPersistentManifold.h.
References m_cachedPoints.
Referenced by addManifoldPoint(), getCacheEntry(), btCompoundCollisionAlgorithm::processCollision(), btCompoundCompoundCollisionAlgorithm::processCollision(), and removeContactPoint().
void refreshContactPoints | ( | const btTransform & | trA, |
const btTransform & | trB | ||
) |
calculated new worldspace coordinates and depth, and reject points that exceed the collision margin
void removeContactPoint | ( | int | index | ) |
Definition at line 164 of file btPersistentManifold.h.
References btAssert, clearUserCache(), gContactEndedCallback, getNumContacts(), btManifoldPoint::m_appliedImpulse, btManifoldPoint::m_appliedImpulseLateral1, btManifoldPoint::m_appliedImpulseLateral2, m_cachedPoints, btManifoldPoint::m_contactPointFlags, btManifoldPoint::m_lifeTime, btManifoldPoint::m_prevRHS, and btManifoldPoint::m_userPersistentData.
void replaceContactPoint | ( | const btManifoldPoint & | newPoint, |
int | insertIndex | ||
) |
we keep existing contact points for friction anchors if the friction force is within the Coulomb friction cone
Definition at line 191 of file btPersistentManifold.h.
References Freestyle::a, usdtokens::b(), BT_CONTACT_FLAG_FRICTION_ANCHOR, btAssert, clearUserCache(), eps, btManifoldPoint::getLifeTime(), btManifoldPoint::m_appliedImpulse, btManifoldPoint::m_appliedImpulseLateral1, btManifoldPoint::m_appliedImpulseLateral2, btManifoldPoint::m_combinedFriction, btManifoldPoint::m_contactPointFlags, btManifoldPoint::m_lifeTime, btManifoldPoint::m_prevRHS, btManifoldPoint::m_userPersistentData, and validContactDistance().
const char* serialize | ( | const class btPersistentManifold * | manifold, |
void * | dataBuffer, | ||
class btSerializer * | serializer | ||
) | const |
void setBodies | ( | const btCollisionObject * | body0, |
const btCollisionObject * | body1 | ||
) |
Definition at line 108 of file btPersistentManifold.h.
Definition at line 150 of file btPersistentManifold.h.
References m_contactBreakingThreshold.
Definition at line 155 of file btPersistentManifold.h.
References m_contactProcessingThreshold.
void setNumContacts | ( | int | cachedPoints | ) |
the setNumContacts API is usually not used, except when you gather/fill all contacts manually
Definition at line 125 of file btPersistentManifold.h.
References m_cachedPoints.
int btPersistentManifold::sortCachedPoints | ( | const btManifoldPoint & | pt | ) |
sort cached points so most isolated points come first
Definition at line 111 of file btPersistentManifold.cpp.
References btVector3, calcArea4Points(), btVector4::closestAxis4(), blender::math::cross(), gContactCalcArea3Points, btManifoldPoint::getDistance(), and btManifoldPoint::m_localPointA.
Referenced by addManifoldPoint().
bool validContactDistance | ( | const btManifoldPoint & | pt | ) | const |
Definition at line 241 of file btPersistentManifold.h.
References getContactBreakingThreshold(), and btManifoldPoint::m_distance1.
Referenced by addManifoldPoint(), and replaceContactPoint().
btPersistentManifold __pad0__ |
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 64 of file btPersistentManifold.h.
|
extern |
maximum contact breaking and merging threshold
Definition at line 26 of file btPersistentManifold.cpp.
|
extern |
Definition at line 27 of file btPersistentManifold.cpp.
Referenced by clearUserCache().
|
extern |
Definition at line 30 of file btPersistentManifold.cpp.
Referenced by clearManifold(), and removeContactPoint().
|
extern |
Definition at line 28 of file btPersistentManifold.cpp.
|
extern |
Definition at line 29 of file btPersistentManifold.cpp.
Referenced by btManifoldResult::addContactPoint().
const btCollisionObject* m_body0 |
this two body pointers can point to the physics rigidbody class.
Definition at line 69 of file btPersistentManifold.h.
Referenced by getBody0(), and setBodies().
const btCollisionObject* m_body1 |
Definition at line 70 of file btPersistentManifold.h.
Referenced by getBody1(), and setBodies().
int m_cachedPoints |
Definition at line 72 of file btPersistentManifold.h.
Referenced by addManifoldPoint(), clearManifold(), clearUserCache(), getContactPoint(), getNumContacts(), removeContactPoint(), and setNumContacts().
int m_companionIdA |
Definition at line 85 of file btPersistentManifold.h.
int m_companionIdB |
Definition at line 86 of file btPersistentManifold.h.
btScalar m_contactBreakingThreshold |
Definition at line 74 of file btPersistentManifold.h.
Referenced by getContactBreakingThreshold(), and setContactBreakingThreshold().
btScalar m_contactProcessingThreshold |
Definition at line 75 of file btPersistentManifold.h.
Referenced by getContactProcessingThreshold(), and setContactProcessingThreshold().
int m_index1a |
Definition at line 88 of file btPersistentManifold.h.