1234567891011121314151617181920212223242526272829303132333435363738 |
- #include <test_common.h>
- #include <igl/per_face_normals.h>
- #include <Eigen/Geometry>
- // class per_face_normals : public ::testing::TestWithParam<std::string> {};
- // TEST_P(per_face_normals, dot)
- // {
- // Eigen::MatrixXd V,N;
- // Eigen::MatrixXi F;
- // // Load example mesh: GetParam() will be name of mesh file
- // test_common::load_mesh(GetParam(), V, F);
- // igl::per_face_normals(V,F,N);
- // REQUIRE (N.rows() == F.rows());
- // for(int f = 0;f<N.rows();f++)
- // {
- // for(int c = 0;c<3;c++)
- // {
- // // Every half-edge dot the normal should be 0
- // ASSERT_LT(
- // std::abs((V.row(F(f,c))-V.row(F(f,(c+1)%3))).dot(N.row(f))),
- // 1e-12);
- // }
- // }
- // REQUIRE (b == a);
- // REQUIRE (a==b);
- // // ASSERT_NEAR(a,b,1e-15)
- // REQUIRE (1e-12 > a);
- // }
- // INSTANTIATE_TEST_CASE_P
- // (
- // all_meshes,
- // per_face_normals,
- // ::testing::ValuesIn(test_common::all_meshes()),
- // test_common::string_test_name
- // );
|