move post-solving body synchronize
This commit is contained in:
parent
ba601c2390
commit
8ca75343dc
@ -272,16 +272,6 @@ void b3ClothSolver::Solve(float32 dt, const b3Vec3& gravity)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Copy state buffers back to the particles
|
|
||||||
for (u32 i = 0; i < m_particleCount; ++i)
|
|
||||||
{
|
|
||||||
b3Particle* p = m_particles[i];
|
|
||||||
|
|
||||||
p->m_position = sx[i];
|
|
||||||
p->m_velocity = sv[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Synchronize bodies
|
// Synchronize bodies
|
||||||
for (u32 i = 0; i < m_contactCount; ++i)
|
for (u32 i = 0; i < m_contactCount; ++i)
|
||||||
@ -294,6 +284,16 @@ void b3ClothSolver::Solve(float32 dt, const b3Vec3& gravity)
|
|||||||
|
|
||||||
body->SynchronizeShapes();
|
body->SynchronizeShapes();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Copy state buffers back to the particles
|
||||||
|
for (u32 i = 0; i < m_particleCount; ++i)
|
||||||
|
{
|
||||||
|
b3Particle* p = m_particles[i];
|
||||||
|
|
||||||
|
p->m_position = sx[i];
|
||||||
|
p->m_velocity = sv[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void b3ClothSolver::Solve(b3DenseVec3& x, u32& iterations,
|
void b3ClothSolver::Solve(b3DenseVec3& x, u32& iterations,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user