fix FBXGeometry::convexHullContains crash

This commit is contained in:
Seth Alves 2016-03-17 10:55:24 -07:00
parent e47c8896db
commit cea97aa317

View file

@ -76,7 +76,7 @@ bool FBXGeometry::convexHullContains(const glm::vec3& point) const {
auto checkEachPrimitive = [=](FBXMesh& mesh, QVector<int> indices, int primitiveSize) -> bool {
// Check whether the point is "behind" all the primitives.
for (int j = 0; j < indices.size(); j += primitiveSize) {
for (int j = 0; j < indices.size() - 2; j += primitiveSize) {
if (!isPointBehindTrianglesPlane(point,
mesh.vertices[indices[j]],
mesh.vertices[indices[j + 1]],