#include #include #include #include #include TEST_CASE("readOBJ: simple", "[igl]") { Eigen::MatrixXd V; Eigen::MatrixXi F; // wait... so this is actually testing test_common::load_mesh not readOBJ // directly... igl::read_triangle_mesh(test_common::data_path("cube.obj"), V, F); REQUIRE (V.rows() == 8); REQUIRE (F.rows() == 12); } TEST_CASE("readOBJ: Obj with material", "[igl]") { std::vector > V; std::vector > TC; std::vector > N; std::vector > F; std::vector > FTC; std::vector > FN; std::vector> FM; igl::readOBJ(test_common::data_path("cubewithmaterial.obj"), V, TC, N, F, FTC, FN, FM); REQUIRE (V.size() == 8); REQUIRE (F.size() == 6); REQUIRE (FM.size() == 2); }