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

Function TEST_F

tests/tools/ConvexHull/Qhull/QhullEngineTest.h:11–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9};
10
11TEST_F(QhullEngineTest, simple_cube) {
12 MatrixFr pts(8, 3);
13 pts << 0.0, 0.0, 0.0,
14 1.0, 0.0, 0.0,
15 1.0, 1.0, 0.0,
16 0.0, 1.0, 0.0,
17 0.0, 0.0, 1.0,
18 1.0, 0.0, 1.0,
19 1.0, 1.0, 1.0,
20 0.0, 1.0, 1.0;
21
22 QhullEngine engine;
23 engine.run(pts);
24
25 MatrixFr vertices = engine.get_vertices();
26 MatrixIr faces = engine.get_faces();
27
28 ASSERT_EQ(8, vertices.rows());
29 ASSERT_EQ(3, vertices.cols());
30 ASSERT_EQ(12, faces.rows());
31 ASSERT_EQ(3, faces.cols());
32 ASSERT_SAME_BBOX(pts, vertices);
33 ASSERT_INDEX_MAP_IS_VALID(pts, vertices, engine.get_index_map());
34 ASSERT_ORIENTATION_IS_VALID(vertices, faces);
35}
36
37TEST_F(QhullEngineTest, interior_points) {
38 MatrixFr pts(10, 3);

Callers 2

QhullEngineTest.hFile · 0.70

Calls 4

runMethod · 0.45
get_verticesMethod · 0.45
get_facesMethod · 0.45
get_index_mapMethod · 0.45

Tested by

no test coverage detected