bugfix
This commit is contained in:
parent
86cfec55f0
commit
93f04140b9
@ -891,6 +891,7 @@ void b3Cloth::Solve(float32 dt, const b3Vec3& gravity)
|
|||||||
solverDef.forceCapacity = m_forceList.m_count;
|
solverDef.forceCapacity = m_forceList.m_count;
|
||||||
solverDef.bodyContactCapacity = m_particleList.m_count;
|
solverDef.bodyContactCapacity = m_particleList.m_count;
|
||||||
solverDef.particleContactCapacity = m_particleContactList.m_count;
|
solverDef.particleContactCapacity = m_particleContactList.m_count;
|
||||||
|
solverDef.triangleContactCapacity = m_triangleContactList.m_count;
|
||||||
|
|
||||||
b3ClothSolver solver(solverDef);
|
b3ClothSolver solver(solverDef);
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ void b3ClothSolver::Solve(float32 dt, const b3Vec3& gravity)
|
|||||||
InitializeParticleContactConstraints();
|
InitializeParticleContactConstraints();
|
||||||
|
|
||||||
// Initialize triangle contact constraints
|
// Initialize triangle contact constraints
|
||||||
// InitializeTriangleContactConstraints();
|
InitializeTriangleContactConstraints();
|
||||||
|
|
||||||
// Warm start velocity constraints
|
// Warm start velocity constraints
|
||||||
WarmStart();
|
WarmStart();
|
||||||
@ -291,7 +291,7 @@ void b3ClothSolver::Solve(float32 dt, const b3Vec3& gravity)
|
|||||||
{
|
{
|
||||||
SolveBodyContactVelocityConstraints();
|
SolveBodyContactVelocityConstraints();
|
||||||
SolveParticleContactVelocityConstraints();
|
SolveParticleContactVelocityConstraints();
|
||||||
// SolveTriangleContactVelocityConstraints();
|
SolveTriangleContactVelocityConstraints();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store impulses to improve convergence
|
// Store impulses to improve convergence
|
||||||
@ -307,9 +307,8 @@ void b3ClothSolver::Solve(float32 dt, const b3Vec3& gravity)
|
|||||||
for (u32 i = 0; i < kPositionIterations; ++i)
|
for (u32 i = 0; i < kPositionIterations; ++i)
|
||||||
{
|
{
|
||||||
bool particleContactsSolved = SolveParticleContactPositionConstraints();
|
bool particleContactsSolved = SolveParticleContactPositionConstraints();
|
||||||
// bool triangleContactsSolved = SolveTriangleContactPositionConstraints();
|
bool triangleContactsSolved = SolveTriangleContactPositionConstraints();
|
||||||
//if (particleContactsSolved && triangleContactsSolved)
|
if (particleContactsSolved && triangleContactsSolved)
|
||||||
if (particleContactsSolved)
|
|
||||||
{
|
{
|
||||||
positionSolved = true;
|
positionSolved = true;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user