MeshLib Documentation
Loading...
Searching...
No Matches
MRMeshProject.h File Reference
#include "MRPointOnFace.h"
#include "MRMeshTriPoint.h"
#include "MRMeshPart.h"
#include "MREnums.h"
#include <cfloat>
#include <optional>
#include <functional>

Go to the source code of this file.

Classes

struct  MR::MeshProjectionResult
 
struct  MR::Ball
 
struct  MR::SignedDistanceToMeshResult
 

Namespaces

namespace  MR
 

Typedefs

using MR::FoundTriCallback = std::function<Processing( const MeshProjectionResult & found, Ball & ball )>
 this callback is invoked on every triangle at least partially in the ball, and allows to change the ball
 

Functions

MRMESH_API MeshProjectionResult MR::findProjection (const Vector3f &pt, const MeshPart &mp, float upDistLimitSq=FLT_MAX, const AffineXf3f *xf=nullptr, float loDistLimitSq=0, const FacePredicate &validFaces={}, const std::function< bool(const MeshProjectionResult &)> &validProjections={})
 computes the closest point on mesh (or its region) to given point
 
MRMESH_API MeshProjectionResult MR::findProjectionSubtree (const Vector3f &pt, const MeshPart &mp, const AABBTree &tree, float upDistLimitSq=FLT_MAX, const AffineXf3f *xf=nullptr, float loDistLimitSq=0, const FacePredicate &validFaces={}, const std::function< bool(const MeshProjectionResult &)> &validProjections={})
 computes the closest point on mesh (or its region) to given point
 
MRMESH_API void MR::findTrisInBall (const MeshPart &mp, Ball ball, const FoundTriCallback &foundCallback, const FacePredicate &validFaces={})
 
MRMESH_API std::optional< SignedDistanceToMeshResultMR::findSignedDistance (const Vector3f &pt, const MeshPart &mp, float upDistLimitSq=FLT_MAX, float loDistLimitSq=0)
 computes the closest point on mesh (or its region) to given point, and finds the distance with sign to it (positive - outside, negative - inside the mesh)