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

Function findProjectionOnMeshEdges

source/MRMesh/MRPolylineProject.cpp:298–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298PolylineProjectionResult3 findProjectionOnMeshEdges( const Vector3f& pt, const Mesh& mesh, const AABBTreePolyline3& tree, float upDistLimitSq, AffineXf3f* xf, float loDistLimitSq )
299{
300 return findProjectionCore( tree, upDistLimitSq, xf, [&]( UndirectedEdgeId ue, Vector3f & a, Vector3f & b )
301 {
302 a = mesh.orgPnt( ue );
303 b = mesh.destPnt( ue );
304 }, loDistLimitSq,
305 [pt]( const Box3f & box ) { return box.getDistanceSq( pt ); },
306 [pt]( const LineSegm3f & ls ) { return LineSegm3f{ pt, closestPointOnLineSegm( pt, ls ) }; } );
307}
308
309PolylineProjectionResult3 findProjectionOnMeshEdges( const Line3f& ln, const Mesh& mesh, const AABBTreePolyline3& tree, float upDistLimitSq, AffineXf3f* xf, float loDistLimitSq )
310{

Callers

nothing calls this directly

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