Add soft body anchor 'm_influence' to control the solver.

Thanks to Gregory Jaegy, see Issue 502
Avoid using btTransform to update btSoftBody (bounds are already in worldspace)
Use btConvexHullComputer for soft body cluster debug rendering
Fix soft body demo issue of invisible soft bodies (rendering was not enabled properly)
This commit is contained in:
erwin.coumans
2011-04-05 20:32:59 +00:00
parent 624dac6128
commit 563654fb6e
5 changed files with 56 additions and 23 deletions

View File

@@ -282,6 +282,7 @@ public:
Node* m_node; // Node pointer
btVector3 m_local; // Anchor position in body space
btRigidBody* m_body; // Body
btScalar m_influence;
btMatrix3x3 m_c0; // Impulse matrix
btVector3 m_c1; // Relative anchor
btScalar m_c2; // ima*dt
@@ -752,8 +753,8 @@ public:
/* Append anchor */
void appendAnchor( int node,
btRigidBody* body, bool disableCollisionBetweenLinkedBodies=false);
void appendAnchor(int node,btRigidBody* body, const btVector3& localPivot,bool disableCollisionBetweenLinkedBodies=false);
btRigidBody* body, bool disableCollisionBetweenLinkedBodies=false,btScalar influence = 1);
void appendAnchor(int node,btRigidBody* body, const btVector3& localPivot,bool disableCollisionBetweenLinkedBodies=false,btScalar influence = 1);
/* Append linear joint */
void appendLinearJoint(const LJoint::Specs& specs,Cluster* body0,Body body1);
void appendLinearJoint(const LJoint::Specs& specs,Body body=Body());