MeshLib C++ Docs
Loading...
Searching...
No Matches
MRPolyline2Intersect.h File Reference
#include "MRId.h"
#include "MREdgePoint.h"
#include "MREnums.h"
#include <cfloat>
#include <optional>

Go to the source code of this file.

Classes

struct  MR::PolylineIntersectionResult2
 

Namespaces

namespace  MR
 

Typedefs

template<typename T >
using MR::PolylineIntersectionCallback2 = std::function<Processing(const EdgePoint & polylinePoint, T rayPos, T & rayEnd)>
 
using MR::PolylineIntersectionCallback2f = PolylineIntersectionCallback2<float>
 
using MR::PolylineIntersectionCallback2d = PolylineIntersectionCallback2<double>
 

Functions

MRMESH_API bool MR::isPointInsidePolyline (const Polyline2 &polyline, const Vector2f &point)
 detect if given point is inside polyline, by counting ray intersections
 
MRMESH_API std::optional< PolylineIntersectionResult2MR::rayPolylineIntersect (const Polyline2 &polyline, const Line2f &line, float rayStart=0, float rayEnd=FLT_MAX, const IntersectionPrecomputes2< float > *prec=nullptr, bool closestIntersect=true)
 
MRMESH_API std::optional< PolylineIntersectionResult2MR::rayPolylineIntersect (const Polyline2 &polyline, const Line2d &line, double rayStart=0, double rayEnd=DBL_MAX, const IntersectionPrecomputes2< double > *prec=nullptr, bool closestIntersect=true)
 
MRMESH_API void MR::rayPolylineIntersectAll (const Polyline2 &polyline, const Line2f &line, const PolylineIntersectionCallback2f &callback, float rayStart=0.0f, float rayEnd=FLT_MAX, const IntersectionPrecomputes2< float > *prec=nullptr)
 
MRMESH_API void MR::rayPolylineIntersectAll (const Polyline2 &polyline, const Line2d &line, const PolylineIntersectionCallback2d &callback, double rayStart=0.0, double rayEnd=DBL_MAX, const IntersectionPrecomputes2< double > *prec=nullptr)