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

Function TEST_F

tests/tools/MeshUtils/EdgeSplitterTest.h:20–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18};
19
20TEST_F(EdgeSplitterTest, SingleTriangle) {
21 MatrixFr vertices(3, 3);
22 vertices << 0.0, 0.0, 0.0,
23 10.0, 0.0, 0.0,
24 5.0, 1.0, 0.0;
25 MatrixIr faces(1, 3);
26 faces << 0, 1, 2;
27
28 EdgeSplitter splitter(vertices, faces);
29 EdgeSplitter::IndicatorFunc f =
30 [=](const VectorF& v0, const VectorF& v1) {
31 return (v0[1] == 0.0) &&
32 (v0[2] == 0.0) &&
33 (v1[1] == 0.0) &&
34 (v1[2] == 0.0);
35 };
36 splitter.run(f, 1.0);
37
38 auto result_vertices = splitter.get_vertices();
39 auto result_faces = splitter.get_faces();
40
41 ASSERT_EQ(18, result_vertices.rows());
42 ASSERT_EQ(16, result_faces.rows());
43 ASSERT_MESH_IS_VALID(result_vertices, result_faces);
44}
45
46TEST_F(EdgeSplitterTest, DoubleTriangles) {
47 MatrixFr vertices(4, 3);

Callers

nothing calls this directly

Calls 8

load_meshFunction · 0.85
runMethod · 0.45
get_verticesMethod · 0.45
get_facesMethod · 0.45
get_num_verticesMethod · 0.45
get_dimMethod · 0.45
get_num_facesMethod · 0.45
get_vertex_per_faceMethod · 0.45

Tested by

no test coverage detected