MeshLib C++ Docs
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::PolylineProjectionResult3Arg
struct  MR::PolylineProjectionWithOffsetResult< V >

Namespaces

namespace  MR
 only for bindings generation

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

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
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
PolylineProjectionResult3Arg MR::findMaxProjectionOnPolyline (const VertCoords &points, const Polyline3 &polyline, const VertBitSet *pointsRegion=nullptr, AffineXf3f *xf=nullptr, float loDistLimitSq=0)
 for each of points (pointsRegion) computes the closest point on polyline and returns the point for which maximum distance is reached,
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
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
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
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)
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)
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)
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
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