MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / TEST

Function TEST

source/MRTest/MR2DContoursTriangulationTests.cpp:24–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22{
23
24TEST( 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
42TEST( MRMesh, PlanarTriangulationMeshSpace )
43{

Callers

nothing calls this directly

Calls 15

triangulateContoursFunction · 0.85
maxFunction · 0.85
minFunction · 0.85
benchCircleFunction · 0.85
runBenchFunction · 0.85
countVertsFunction · 0.85
triangulateOnceMsFunction · 0.85
benchStarFunction · 0.85
createSymbolContoursFunction · 0.85
makeTorusFunction · 0.85
extractXYPlaneSectionsFunction · 0.85

Tested by

no test coverage detected