| 5 | #include <TestBase.h> |
| 6 | |
| 7 | TEST(VoxelUtilsTest, simple) { |
| 8 | using namespace PyMesh; |
| 9 | MatrixFr vertices(4, 3); |
| 10 | vertices << 0.0, 0.0, 0.0, |
| 11 | 1.0, 0.0, 0.0, |
| 12 | 0.0, 1.0, 0.0, |
| 13 | 0.0, 0.0, 1.0; |
| 14 | MatrixIr tets(3, 4); |
| 15 | tets << 0, 1, 2, 3, // Positive |
| 16 | 0, 0, 1, 2, // Degenerate |
| 17 | 0, 1, 3, 2; // Inverted |
| 18 | |
| 19 | auto orientations = VoxelUtils::get_tet_orientations(vertices, tets); |
| 20 | ASSERT_EQ(3, orientations.size()); |
| 21 | ASSERT_LT(0, orientations[0]); |
| 22 | ASSERT_EQ(0, orientations[1]); |
| 23 | ASSERT_GT(0, orientations[2]); |
| 24 | } |
| 25 | |
| 26 | TEST(VoxelUtilsTest, delaunay) { |
| 27 | using namespace PyMesh; |
nothing calls this directly
no test coverage detected