| 22 | { |
| 23 | |
| 24 | TEST( MRMesh, PlanarTriangulation ) |
| 25 | { |
| 26 | // Create a quadrangle with three points on a straight line |
| 27 | Contour2f cont; |
| 28 | cont.push_back( Vector2f( 1.f, 0.f ) ); |
| 29 | cont.push_back( Vector2f( 0.f, 0.f ) ); |
| 30 | cont.push_back( Vector2f( 0.f, 1.f ) ); |
| 31 | cont.push_back( Vector2f( 0.f, 2.f ) ); |
| 32 | cont.push_back( Vector2f( 1.f, 0.f ) ); |
| 33 | |
| 34 | Mesh mesh = PlanarTriangulation::triangulateContours( { cont } ); |
| 35 | mesh.pack(); |
| 36 | EXPECT_TRUE( mesh.topology.lastValidFace() == 1_f ); |
| 37 | // Must not contain degenerate faces |
| 38 | EXPECT_TRUE( mesh.triangleAspectRatio( 0_f ) < 10.0f ); |
| 39 | EXPECT_TRUE( mesh.triangleAspectRatio( 1_f ) < 10.0f ); |
| 40 | } |
| 41 | |
| 42 | TEST( MRMesh, PlanarTriangulationMeshSpace ) |
| 43 | { |
nothing calls this directly
no test coverage detected