WIP: uv-simple-select #1

Closed
Chris Blackbourn wants to merge 182 commits from uv-simple-select into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 11 additions and 0 deletions
Showing only changes of commit 4bfffa41a6 - Show all commits

View File

@ -86,6 +86,7 @@ void MeshFromGeometry::fixup_invalid_faces()
/* Skip and remove faces that have fewer than 3 corners. */
mesh_geometry_.total_loops_ -= curr_face.corner_count_;
mesh_geometry_.face_elements_.remove_and_reorder(face_idx);
--face_idx;
continue;
}
@ -128,6 +129,7 @@ void MeshFromGeometry::fixup_invalid_faces()
/* Remove the invalid face. */
mesh_geometry_.total_loops_ -= curr_face.corner_count_;
mesh_geometry_.face_elements_.remove_and_reorder(face_idx);
--face_idx;
Vector<Vector<int>> new_faces = fixup_invalid_polygon(global_vertices_.vertices, face_verts);

View File

@ -486,6 +486,15 @@ TEST_F(obj_importer_test, import_faces_invalid_or_with_holes)
import_and_check("faces_invalid_or_with_holes.obj", expect, std::size(expect), 0);
}
TEST_F(obj_importer_test, import_invalid_faces)
{
Expectation expect[] = {
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
{"OBTheMesh", OB_MESH, 5, 3, 1, 3, float3(-2, 0, -2), float3(0, 2, 0)},
};
import_and_check("invalid_faces.obj", expect, std::size(expect), 0);
}
TEST_F(obj_importer_test, import_invalid_indices)
{
Expectation expect[] = {