MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / TEST_F

Function TEST_F

tests/tools/Envelope/VoxelGridTest.h:23–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21};
22
23TEST_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
37TEST_F(VoxelGridTest, creation_3D) {
38 MeshPtr mesh = load_mesh("cube.msh");

Callers

nothing calls this directly

Calls 15

load_meshFunction · 0.85
form_meshFunction · 0.85
insert_meshMethod · 0.80
create_gridMethod · 0.80
dilateMethod · 0.80
erodeMethod · 0.80
save_meshFunction · 0.50
get_num_verticesMethod · 0.45
get_vertexMethod · 0.45
lookupMethod · 0.45
add_attributeMethod · 0.45
get_attributeMethod · 0.45

Tested by

no test coverage detected