From a6faeed545d7a86eaaeea2f677b28ffea5e41c85 Mon Sep 17 00:00:00 2001 From: Irlan <-> Date: Fri, 20 Apr 2018 03:09:28 -0300 Subject: [PATCH] zero convex hull counters --- include/bounce/collision/shapes/qhull.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/bounce/collision/shapes/qhull.h b/include/bounce/collision/shapes/qhull.h index c17738a..82043ab 100644 --- a/include/bounce/collision/shapes/qhull.h +++ b/include/bounce/collision/shapes/qhull.h @@ -38,13 +38,17 @@ struct b3QHull : public b3Hull b3Face hullFaces[B3_MAX_HULL_FACES]; b3Plane hullPlanes[B3_MAX_HULL_FACES]; - // b3QHull() { + // Zero the counters since the user manipulates via setters vertices = hullVertices; + vertexCount = 0; edges = hullEdges; + edgeCount = 0; faces = hullFaces; + faceCount = 0; planes = hullPlanes; + centroid.SetZero(); } // Create a convex hull from an array of points.