From c804a2dc526d5ef7b3bb220ca8171231237a33e6 Mon Sep 17 00:00:00 2001 From: Irlan <-> Date: Sat, 4 Aug 2018 15:28:22 -0300 Subject: [PATCH] update tests --- examples/testbed/tests/cloth_test.h | 5 +++++ examples/testbed/tests/self_collision.h | 2 -- examples/testbed/tests/table_cloth.h | 13 +++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/examples/testbed/tests/cloth_test.h b/examples/testbed/tests/cloth_test.h index 3d737d8..3f95cce 100644 --- a/examples/testbed/tests/cloth_test.h +++ b/examples/testbed/tests/cloth_test.h @@ -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); diff --git a/examples/testbed/tests/self_collision.h b/examples/testbed/tests/self_collision.h index 981eebf..9a3ed52 100644 --- a/examples/testbed/tests/self_collision.h +++ b/examples/testbed/tests/self_collision.h @@ -77,8 +77,6 @@ public: b3RectangleGarment m_rectangleGarment; b3GarmentMesh m_rectangleGarmentMesh; b3GarmentClothMesh m_rectangleClothMesh; - - b3BoxHull m_boxHull; }; #endif \ No newline at end of file diff --git a/examples/testbed/tests/table_cloth.h b/examples/testbed/tests/table_cloth.h index fba0787..c0ec318 100644 --- a/examples/testbed/tests/table_cloth.h +++ b/examples/testbed/tests/table_cloth.h @@ -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;