17struct MeshProjectionResult
29 [[nodiscard]]
bool valid()
const {
return proj.valid(); }
30 [[nodiscard]]
explicit operator bool()
const {
return proj.valid(); }
33struct MeshProjectionTransforms
36 const AffineXf3f* nonRigidXfTree{
nullptr };
57 float upDistLimitSq = FLT_MAX,
59 float loDistLimitSq = 0,
60 const FacePredicate & validFaces = {},
61 const std::function<bool(
const MeshProjectionResult&)> & validProjections = {} );
74 float upDistLimitSq = FLT_MAX,
76 float loDistLimitSq = 0,
77 const FacePredicate & validFaces = {},
78 const std::function<bool(
const MeshProjectionResult&)> & validProjections = {} );
96struct SignedDistanceToMeshResult
113 float upDistLimitSq = FLT_MAX,
float loDistLimitSq = 0 );
#define MRMESH_API
Definition MRMeshFwd.h:80
Definition MRAABBTree.h:16
Definition MRMeshProject.h:18
new unsafe MR.PointOnFace proj
new unsafe MR.MeshTriPoint mtp
new unsafe ref float distSq
new unsafe ref float dist
new unsafe MR.MeshTriPoint mtp
new unsafe MR.PointOnFace proj
MRMESH_API MeshMeshSignedDistanceResult findSignedDistance(const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr, float upDistLimitSq=FLT_MAX)
computes minimal distance between two meshes
MRMESH_API MeshProjectionTransforms createProjectionTransforms(AffineXf3f &storageXf, const AffineXf3f *pointXf, const AffineXf3f *treeXf)
Creates structure with simplified transforms for projection functions, with rigidXfPoint applied to p...
MRMESH_API void findTrisInBall(const MeshPart &mp, const Ball3f &ball, const FoundTriCallback &foundCallback, const FacePredicate &validFaces={})
std::function< Processing(const MeshProjectionResult &found, Ball3f &ball)> FoundTriCallback
this callback is invoked on every triangle at least partially in the ball, and allows changing (shrin...
Definition MRMeshProject.h:90
MRMESH_API MeshProjectionResult 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
std::function< Processing(FaceId found, Ball3f &ball)> FoundBoxedTriCallback
Definition MRMeshProject.h:82
MRMESH_API void findBoxedTrisInBall(const MeshPart &mp, Ball3f ball, const FoundBoxedTriCallback &foundCallback)
MRMESH_API MeshProjectionResult 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
Definition MRCameraOrientationPlugin.h:8