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

Function findProjectionOnPolyline

source/MRMesh/MRPolylineProject.cpp:113–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113PolylineProjectionResult3 findProjectionOnPolyline( const Vector3f& pt, const Polyline3& polyline, float upDistLimitSq, AffineXf3f* xf, float loDistLimitSq )
114{
115 return findProjectionCore( polyline.getAABBTree(), upDistLimitSq, xf, [&]( UndirectedEdgeId ue, Vector3f & a, Vector3f & b )
116 {
117 a = polyline.orgPnt( ue );
118 b = polyline.destPnt( ue );
119 }, loDistLimitSq,
120 [pt]( const Box3f & box ) { return box.getDistanceSq( pt ); },
121 [pt]( const LineSegm3f & ls ) { return LineSegm3f{ pt, closestPointOnLineSegm( pt, ls ) }; } );
122}
123
124PolylineProjectionResult3Arg findMaxProjectionOnPolyline( const VertCoords& points, const Polyline3& polyline,
125 const VertBitSet* pointsRegion, AffineXf3f* xf, float loDistLimitSq )

Callers 3

extractAllIsolinesFunction · 0.85
smoothSelectionFunction · 0.85

Calls 8

findProjectionCoreFunction · 0.85
closestPointOnLineSegmFunction · 0.85
closestPointsFunction · 0.85
getDistanceSqMethod · 0.80
rayBoxIntersectFunction · 0.70
orgPntMethod · 0.45
destPntMethod · 0.45
lengthSqMethod · 0.45

Tested by

no test coverage detected