| 93 | }; |
| 94 | |
| 95 | TEST_F(IGLCSGTreeTest, leaf) { |
| 96 | MeshPtr mesh = load_mesh("cube.obj"); |
| 97 | MatrixFr vertices = extract_vertices(mesh); |
| 98 | MatrixIr faces = extract_faces(mesh); |
| 99 | |
| 100 | CSGTree::Ptr tree = CSGTree::create_leaf("igl", vertices, faces); |
| 101 | |
| 102 | const auto r_vertices = tree->get_vertices(); |
| 103 | const auto r_faces = tree->get_faces(); |
| 104 | |
| 105 | ASSERT_EQ(vertices.rows(), r_vertices.rows()); |
| 106 | ASSERT_EQ(vertices.cols(), r_vertices.cols()); |
| 107 | ASSERT_FLOAT_EQ(0.0, (vertices - r_vertices).minCoeff()); |
| 108 | ASSERT_FLOAT_EQ(0.0, (vertices - r_vertices).maxCoeff()); |
| 109 | } |
| 110 | |
| 111 | TEST_F(IGLCSGTreeTest, binary_union) { |
| 112 | MeshPtr mesh = load_mesh("cube.obj"); |
nothing calls this directly
no test coverage detected