Synchronized changes of Bullet, from Blender.
Added optional flag btSoftBody::appendAnchor( int node,btRigidBody* body, bool disableCollisionBetweenLinkedBodies=false), to disable collision between soft body and rigid body, when pinned Added btCollisionObject::setAnisotropicFriction, to scale friction in x,y,z direction. Added btCollisionObject::setContactProcessingThreshold(float threshold), to avoid collision resolution of contact above a certain distance. Avoid collisions between static objects (causes the CharacterDemo to assert, when a dynamic object hits character)
This commit is contained in:
@@ -55,6 +55,7 @@ ATTRIBUTE_ALIGNED16( class) btPersistentManifold
|
||||
int m_cachedPoints;
|
||||
|
||||
btScalar m_contactBreakingThreshold;
|
||||
btScalar m_contactProcessingThreshold;
|
||||
|
||||
|
||||
/// sort cached points so most isolated points come first
|
||||
@@ -70,9 +71,10 @@ public:
|
||||
|
||||
btPersistentManifold();
|
||||
|
||||
btPersistentManifold(void* body0,void* body1,int , btScalar contactBreakingThreshold)
|
||||
btPersistentManifold(void* body0,void* body1,int , btScalar contactBreakingThreshold,btScalar contactProcessingThreshold)
|
||||
: m_body0(body0),m_body1(body1),m_cachedPoints(0),
|
||||
m_contactBreakingThreshold(contactBreakingThreshold)
|
||||
m_contactBreakingThreshold(contactBreakingThreshold),
|
||||
m_contactProcessingThreshold(contactProcessingThreshold)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -111,6 +113,11 @@ public:
|
||||
|
||||
///@todo: get this margin from the current physics / collision environment
|
||||
btScalar getContactBreakingThreshold() const;
|
||||
|
||||
btScalar getContactProcessingThreshold() const
|
||||
{
|
||||
return m_contactProcessingThreshold;
|
||||
}
|
||||
|
||||
int getCacheEntry(const btManifoldPoint& newPoint) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user