From 2e30f0916cc9a365b5a93171527499e22f5385cb Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 20 May 2016 15:07:47 -0700 Subject: [PATCH] remove debug logging and add some comments --- libraries/physics/src/ShapeFactory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/physics/src/ShapeFactory.cpp b/libraries/physics/src/ShapeFactory.cpp index 8c1d44b273..71b919b7ee 100644 --- a/libraries/physics/src/ShapeFactory.cpp +++ b/libraries/physics/src/ShapeFactory.cpp @@ -70,14 +70,15 @@ btConvexHullShape* ShapeFactory::createConvexHull(const QVector& poin // create hull approximation btShapeHull shapeHull(hull); shapeHull.buildHull(margin); + // we cannot copy Bullet shapes so we must create a new one... btConvexHullShape* newHull = new btConvexHullShape(); const btVector3* newPoints = shapeHull.getVertexPointer(); for (int i = 0; i < shapeHull.numVertices(); ++i) { newHull->addPoint(newPoints[i], false); } + // ...and delete the old one delete hull; hull = newHull; - qDebug() << "reduced hull with" << points.size() << "points down to" << hull->getNumPoints(); // TODO: remove after testing } hull->recalcLocalAabb();