MeshLib C++ Docs
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

class  MR::MeshProjectionResult
 
class  MR::MeshProjectionTransforms
 
class  MR::SignedDistanceToMeshResult
 

Namespaces

namespace  MR
 

Functions

MRMESH_API MeshProjectionTransforms MR::createProjectionTransforms (AffineXf3f &storageXf, const AffineXf3f *pointXf, const AffineXf3f *treeXf)
 Creates structure with simplified transforms for projection functions, with rigidXfPoint applied to point, and nonRigidXfTree applied to tree.
 
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::findBoxedTrisInBall (const MeshPart &mp, Ball3f ball, const FoundBoxedTriCallback &foundCallback)
 
MRMESH_API void MR::findTrisInBall (const MeshPart &mp, const Ball3f &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)