From 16d351ecac661ceb5486a6cfd6924a03e1f8f93b Mon Sep 17 00:00:00 2001 From: Irlan <-> Date: Thu, 26 Apr 2018 21:53:29 -0300 Subject: [PATCH] stress quickhull --- examples/testbed/tests/convex_hull.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/testbed/tests/convex_hull.h b/examples/testbed/tests/convex_hull.h index 675e650..662cea7 100644 --- a/examples/testbed/tests/convex_hull.h +++ b/examples/testbed/tests/convex_hull.h @@ -51,13 +51,18 @@ public: m_count = 0; for (u32 i = 0; i < e_count; ++i) { - // Clamp to force coplanarities. - // This will stress the generation code. float32 x = 3.0f * RandomFloat(-1.0f, 1.0f); float32 y = 3.0f * RandomFloat(-1.0f, 1.0f); float32 z = 3.0f * RandomFloat(-1.0f, 1.0f); + + // Clamp to force coplanarities. + // This will stress the convex hull creation code. + x = b3Clamp(x, -2.5f, 2.5f); + y = b3Clamp(y, -2.5f, 2.5f); + z = b3Clamp(z, -2.5f, 2.5f); b3Vec3 p(x, y, z); + m_points[m_count++] = p; } }