Commit 91ebd2ed authored by Méso Star's avatar Méso Star

Revert the STL vertex ordering

The STL and Star-3D front face vertex ordering are not the same. Switch
the vertex order in order to ensure that the front and back faces are
not inverted.
parent f145d816
......@@ -65,9 +65,12 @@ get_indices(const unsigned itri, unsigned ids[3], void* ctx)
const unsigned* indices;
ASSERT(ctx && ids && itri < desc->triangles_count);
indices = desc->indices + itri*3;
ids[0] = indices[0];
/* Note that in the Star-STL loader, front faces are CCW ordered while in to
* the Star-3D library front faces are CW ordered. Flip the vertex index in
* order to ensure that the 3D and the STL front faces are the same */
ids[0] = indices[2];
ids[1] = indices[1];
ids[2] = indices[2];
ids[2] = indices[0];
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment