| 21 | }; |
| 22 | |
| 23 | TEST_F(VoxelGridTest, creation_2D) { |
| 24 | MeshPtr mesh = load_mesh("square_2D.obj"); |
| 25 | VoxelGrid<2> grid(0.5); |
| 26 | grid.insert_mesh(mesh); |
| 27 | grid.create_grid(); |
| 28 | |
| 29 | const size_t num_vertices = mesh->get_num_vertices(); |
| 30 | for (size_t i=0; i<num_vertices; i++) { |
| 31 | VectorF p = mesh->get_vertex(i); |
| 32 | ASSERT_TRUE(grid.lookup(p) > 0); |
| 33 | } |
| 34 | ASSERT_TRUE(grid.lookup(Vector2F::Zero()) > 0); |
| 35 | } |
| 36 | |
| 37 | TEST_F(VoxelGridTest, creation_3D) { |
| 38 | MeshPtr mesh = load_mesh("cube.msh"); |
nothing calls this directly
no test coverage detected