mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-10-29 20:15:35 +00:00
bug fixes and parameter tuning
This commit is contained in:
@@ -8327,6 +8327,7 @@ bool PhysicsServerCommandProcessor::processLoadSoftBodyCommand(const struct Shar
|
||||
if (use_bending_spring)
|
||||
{
|
||||
psb->generateBendingConstraints(2);
|
||||
psb->generateBendingConstraints(2);
|
||||
}
|
||||
}
|
||||
btSoftBody::Material* pm = psb->appendMaterial();
|
||||
|
||||
@@ -3942,8 +3942,8 @@ void btSoftBody::defaultCollisionHandler(const btCollisionObjectWrapper* pcoWrap
|
||||
docollideFace.psb = this;
|
||||
docollideFace.m_colObj1Wrap = pcoWrap;
|
||||
docollideFace.m_rigidBody = prb1;
|
||||
docollideFace.dynmargin = 0.05*(basemargin + timemargin);
|
||||
docollideFace.stamargin = 0.05*basemargin;
|
||||
docollideFace.dynmargin = 0.5*(basemargin + timemargin);
|
||||
docollideFace.stamargin = 0.5*basemargin;
|
||||
m_fdbvt.collideTV(m_fdbvt.m_root, volume, docollideFace);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1581,7 +1581,7 @@ void btSoftBodyHelpers::extrapolateBarycentricWeights(btSoftBody* psb)
|
||||
const btSoftBody::Face& f = psb->m_faces[j];
|
||||
btVector3 n = btCross(f.m_n[1]->m_x - f.m_n[0]->m_x, f.m_n[2]->m_x - f.m_n[0]->m_x);
|
||||
btVector3 unit_n = n.normalized();
|
||||
dist = p.dot(unit_n);
|
||||
dist = (p-f.m_n[0]->m_x).dot(unit_n);
|
||||
btVector3 proj_p = p - dist*unit_n;
|
||||
getBarycentricWeights(f.m_n[0]->m_x, f.m_n[1]->m_x, f.m_n[2]->m_x, proj_p, bary);
|
||||
btScalar new_min_bary_weight = bary[0];
|
||||
|
||||
Reference in New Issue
Block a user