mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:49:34 +02:00
remove debug logging and add some comments
This commit is contained in:
parent
83b8ef8131
commit
2e30f0916c
1 changed files with 2 additions and 1 deletions
|
@ -70,14 +70,15 @@ btConvexHullShape* ShapeFactory::createConvexHull(const QVector<glm::vec3>& poin
|
||||||
// create hull approximation
|
// create hull approximation
|
||||||
btShapeHull shapeHull(hull);
|
btShapeHull shapeHull(hull);
|
||||||
shapeHull.buildHull(margin);
|
shapeHull.buildHull(margin);
|
||||||
|
// we cannot copy Bullet shapes so we must create a new one...
|
||||||
btConvexHullShape* newHull = new btConvexHullShape();
|
btConvexHullShape* newHull = new btConvexHullShape();
|
||||||
const btVector3* newPoints = shapeHull.getVertexPointer();
|
const btVector3* newPoints = shapeHull.getVertexPointer();
|
||||||
for (int i = 0; i < shapeHull.numVertices(); ++i) {
|
for (int i = 0; i < shapeHull.numVertices(); ++i) {
|
||||||
newHull->addPoint(newPoints[i], false);
|
newHull->addPoint(newPoints[i], false);
|
||||||
}
|
}
|
||||||
|
// ...and delete the old one
|
||||||
delete hull;
|
delete hull;
|
||||||
hull = newHull;
|
hull = newHull;
|
||||||
qDebug() << "reduced hull with" << points.size() << "points down to" << hull->getNumPoints(); // TODO: remove after testing
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hull->recalcLocalAabb();
|
hull->recalcLocalAabb();
|
||||||
|
|
Loading…
Reference in a new issue