MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / TEST

Function TEST

tests/T_Tessellation.cpp:12–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace LNLib;
11
12TEST(Test_Tessellation, Curve)
13{
14 XYZ center = XYZ(0, 0, 0);
15 XYZ xAxis = XYZ(1, 0, 0);
16 XYZ yAxis = XYZ(0, 1, 0);
17 double radius = 100;
18 LN_NurbsCurve curve;
19 bool createArc = NurbsCurve::CreateArc(center, xAxis, yAxis, 0, 2 * Constants::Pi, radius, radius, curve);
20 std::vector<double> knots = curve.KnotVector;
21 std::vector<XYZ> points = NurbsCurve::Tessellate(curve);
22 EXPECT_TRUE(points.size() > 0);
23 EXPECT_TRUE(points[0].IsAlmostEqualTo(NurbsCurve::GetPointOnCurve(curve, knots[0])));
24 EXPECT_TRUE(points[points.size()-1].IsAlmostEqualTo(NurbsCurve::GetPointOnCurve(curve, knots[knots.size()-1])));
25}
26
27TEST(Test_Tessellation, Voronoi)
28{

Callers

nothing calls this directly

Calls 9

GetPointOnCurveFunction · 0.85
setGenerateVoronoiMethod · 0.80
setGenerateDelaunayMethod · 0.80
generateVoronoiMethod · 0.80
getTrianglesMethod · 0.80
XYZClass · 0.50
XYZWClass · 0.50
IsAlmostEqualToMethod · 0.45
DistanceMethod · 0.45

Tested by

no test coverage detected