update tests

This commit is contained in:
Irlan 2018-08-04 15:28:22 -03:00
parent 26b956720c
commit c804a2dc52
3 changed files with 12 additions and 8 deletions

View File

@ -34,6 +34,11 @@ public:
m_cloth->Draw();
if (m_clothDragger.IsDragging() == true)
{
g_draw->DrawSegment(m_clothDragger.GetPointA(), m_clothDragger.GetPointB(), b3Color_white);
}
extern u32 b3_clothSolverIterations;
g_draw->DrawString(b3Color_white, "Iterations = %u", b3_clothSolverIterations);

View File

@ -77,8 +77,6 @@ public:
b3RectangleGarment m_rectangleGarment;
b3GarmentMesh m_rectangleGarmentMesh;
b3GarmentClothMesh m_rectangleClothMesh;
b3BoxHull m_boxHull;
};
#endif

View File

@ -37,7 +37,7 @@ public:
m_rectangleClothMesh.vertices[i] = dq * m_rectangleClothMesh.vertices[i];
m_rectangleClothMesh.vertices[i].y += 5.0f;
}
b3ClothDef def;
def.mesh = &m_rectangleClothMesh;
def.density = 0.2f;
@ -47,6 +47,12 @@ public:
m_cloth = m_world.CreateCloth(def);
for (b3Particle* p = m_cloth->GetParticleList().m_head; p; p = p->GetNext())
{
p->SetRadius(0.2f);
p->SetFriction(0.2f);
}
{
b3BodyDef bd;
bd.type = e_staticBody;
@ -59,11 +65,6 @@ 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;