MeshLib
 
Loading...
Searching...
No Matches
MRPolylineProject.h File Reference
#include "MRId.h"
#include "MRVector3.h"
#include <cfloat>
#include <functional>

Go to the source code of this file.

Classes

struct  MR::PolylineProjectionResult< V >
 
struct  MR::PolylineProjectionWithOffsetResult< V >
 

Namespaces

namespace  MR
 

Typedefs

template<typename V >
using MR::FoundEdgeCallback = std::function<void( UndirectedEdgeId, const V& closestPt, float distSq )>
 
using MR::FoundEdgeCallback2 = FoundEdgeCallback<Vector2f>
 
using MR::FoundEdgeCallback3 = FoundEdgeCallback<Vector3f>
 

Functions

MRMESH_API PolylineProjectionResult2 MR::findProjectionOnPolyline2 (const Vector2f &pt, const Polyline2 &polyline, float upDistLimitSq=FLT_MAX, AffineXf2f *xf=nullptr, float loDistLimitSq=0)
 computes the closest point on polyline to given point
 
MRMESH_API PolylineProjectionResult3 MR::findProjectionOnPolyline (const Vector3f &pt, const Polyline3 &polyline, float upDistLimitSq=FLT_MAX, AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 computes the closest point on polyline to given point
 
MRMESH_API PolylineProjectionResult3 MR::findProjectionOnPolyline (const Line3f &ln, const Polyline3 &polyline, float upDistLimitSq=FLT_MAX, AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 computes the closest point on polyline to given straight line
 
MRMESH_API Polyline2ProjectionWithOffsetResult MR::findProjectionOnPolyline2WithOffset (const Vector2f &pt, const Polyline2 &polyline, const Vector< float, UndirectedEdgeId > &offsetPerEdge, float upDistLimit=FLT_MAX, AffineXf2f *xf=nullptr, float loDistLimit=0)
 computes the closest point on polyline to given point, respecting each edge offset
 
MRMESH_API PolylineProjectionWithOffsetResult3 MR::findProjectionOnPolylineWithOffset (const Vector3f &pt, const Polyline3 &polyline, const Vector< float, UndirectedEdgeId > &offsetPerEdge, float upDistLimit=FLT_MAX, AffineXf3f *xf=nullptr, float loDistLimit=0)
 computes the closest point on polyline to given point, respecting each edge offset
 
MRMESH_API void MR::findEdgesInBall (const Polyline2 &polyline, const Vector2f &center, float radius, const FoundEdgeCallback2 &foundCallback, AffineXf2f *xf=nullptr)
 Finds all edges of given polyline that cross or touch given ball (center, radius)
 
MRMESH_API void MR::findEdgesInBall (const Polyline3 &polyline, const Vector3f &center, float radius, const FoundEdgeCallback3 &foundCallback, AffineXf3f *xf=nullptr)
 Finds all edges of given polyline that cross or touch given ball (center, radius)
 
MRMESH_API void MR::findMeshEdgesInBall (const Mesh &mesh, const AABBTreePolyline3 &tree, const Vector3f &center, float radius, const FoundEdgeCallback3 &foundCallback, AffineXf3f *xf=nullptr)
 Finds all edges of given mesh edges (specified by the tree) that cross or touch given ball (center, radius)
 
MRMESH_API PolylineProjectionResult3 MR::findProjectionOnMeshEdges (const Vector3f &pt, const Mesh &mesh, const AABBTreePolyline3 &tree, float upDistLimitSq=FLT_MAX, AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 computes the closest point on the mesh edges (specified by the tree) to given point
 
MRMESH_API PolylineProjectionResult3 MR::findProjectionOnMeshEdges (const Line3f &ln, const Mesh &mesh, const AABBTreePolyline3 &tree, float upDistLimitSq=FLT_MAX, AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 computes the closest point on the mesh edges (specified by the tree) to given straight line