through an acceleration constraint, the solver can remove acceleration from kinematic particles; consistency; in effect test update
This commit is contained in:
@ -118,13 +118,13 @@ public:
|
||||
b3Vec3 dx = B - A;
|
||||
|
||||
b3Particle* p1 = m_cloth->GetParticle(t->v1);
|
||||
m_cloth->Translate(p1, dx);
|
||||
m_cloth->ApplyTranslation(p1, dx);
|
||||
|
||||
b3Particle* p2 = m_cloth->GetParticle(t->v2);
|
||||
m_cloth->Translate(p2, dx);
|
||||
m_cloth->ApplyTranslation(p2, dx);
|
||||
|
||||
b3Particle* p3 = m_cloth->GetParticle(t->v3);
|
||||
m_cloth->Translate(p3, dx);
|
||||
m_cloth->ApplyTranslation(p3, dx);
|
||||
}
|
||||
|
||||
void StopDragging()
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
{
|
||||
if (p->type == e_staticParticle)
|
||||
{
|
||||
m_cloth->Translate(p, d);
|
||||
m_cloth->ApplyTranslation(p, d);
|
||||
}
|
||||
|
||||
if (p->type == e_kinematicParticle)
|
||||
|
@ -69,6 +69,11 @@ public:
|
||||
tableShape.m_hull = &m_tableHull;
|
||||
tableShape.m_radius = 0.2f;
|
||||
|
||||
//b3CapsuleShape tableShape;
|
||||
//tableShape.m_centers[0].Set(0.0f, 0.0f, -1.0f);
|
||||
//tableShape.m_centers[1].Set(0.0f, 0.0f, 1.0f);
|
||||
//tableShape.m_radius = 2.0f;
|
||||
|
||||
b3ShapeDef sd;
|
||||
sd.shape = &tableShape;
|
||||
sd.friction = 1.0f;
|
||||
@ -82,6 +87,7 @@ public:
|
||||
return new TableCloth();
|
||||
}
|
||||
|
||||
//b3GridMesh<2, 2> m_gridMesh;
|
||||
b3GridMesh<10, 10> m_gridMesh;
|
||||
b3ClothMeshMesh m_gridClothMeshMesh;
|
||||
b3ClothMesh m_gridClothMesh;
|
||||
|
@ -124,8 +124,8 @@ public:
|
||||
u32 i1 = m_cloth->GetParticleIndex(p1);
|
||||
u32 i2 = m_cloth->GetParticleIndex(p2);
|
||||
|
||||
tension[i1] += s->tension;
|
||||
tension[i2] -= s->tension;
|
||||
tension[i1] += s->f;
|
||||
tension[i2] -= s->f;
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < m_gridClothMesh.triangleCount; ++i)
|
||||
|
Reference in New Issue
Block a user