Noisy constant for number of vertices in a triangle.

This commit is contained in:
Howard Stearns 2015-04-29 15:45:38 -07:00
parent 3c88146d17
commit fb825f6d10

View file

@ -152,7 +152,8 @@ bool OBJFace::add(QByteArray vertexIndex, QByteArray textureIndex, QByteArray no
}
QVector<OBJFace> OBJFace::triangulate() {
QVector<OBJFace> newFaces;
if (vertexIndices.count() == 3) {
const int nVerticesInATriangle = 3;
if (vertexIndices.count() == nVerticesInATriangle) {
newFaces.append(*this);
} else {
for (int i = 1; i < vertexIndices.count() - 1; i++) {