| 7 | }; |
| 8 | |
| 9 | TEST_F(VoxelCircumCenterAttributeTest, tet) { |
| 10 | MeshPtr mesh = load_mesh("tet.msh"); |
| 11 | mesh->add_attribute("voxel_circumcenter"); |
| 12 | ASSERT_TRUE(mesh->has_attribute("voxel_circumcenter")); |
| 13 | VectorF circumcenter = mesh->get_attribute("voxel_circumcenter"); |
| 14 | ASSERT_EQ(3, circumcenter.size()); |
| 15 | |
| 16 | Float dist_0 = (circumcenter - mesh->get_vertex(0)).norm(); |
| 17 | Float dist_1 = (circumcenter - mesh->get_vertex(1)).norm(); |
| 18 | Float dist_2 = (circumcenter - mesh->get_vertex(2)).norm(); |
| 19 | Float dist_3 = (circumcenter - mesh->get_vertex(3)).norm(); |
| 20 | |
| 21 | ASSERT_FLOAT_EQ(dist_0, dist_1); |
| 22 | ASSERT_FLOAT_EQ(dist_1, dist_2); |
| 23 | ASSERT_FLOAT_EQ(dist_2, dist_3); |
| 24 | ASSERT_FLOAT_EQ(dist_3, dist_0); |
| 25 | } |
| 26 | |
| 27 | TEST_F(VoxelCircumCenterAttributeTest, irregular_tet) { |
| 28 | MatrixFr vertices(4, 3); |
nothing calls this directly
no test coverage detected