MeshLib Documentation
Loading...
Searching...
No Matches
MRMeshMeshDistance.h
Go to the documentation of this file.
1#pragma once
2
3// distance queries involving two meshes, please see MRMeshDistance.h for queries to one mesh only
4
5#include "MRPointOnFace.h"
6#include "MRMeshPart.h"
7#include <cfloat>
8
9namespace MR
10{
11
14
16{
20 float distSq = 0;
21};
22using MeshDistanceResult [[deprecated]] = MeshMeshDistanceResult;
23
31using MeshSignedDistanceResult [[deprecated]] = MeshMeshSignedDistanceResult;
32
38MRMESH_API MeshMeshDistanceResult findDistance( const MeshPart & a, const MeshPart & b,
39 const AffineXf3f * rigidB2A = nullptr, float upDistLimitSq = FLT_MAX );
40
46MRMESH_API MeshMeshSignedDistanceResult findSignedDistance( const MeshPart & a, const MeshPart & b,
47 const AffineXf3f* rigidB2A = nullptr, float upDistLimitSq = FLT_MAX );
48
54MRMESH_API float findMaxDistanceSqOneWay( const MeshPart& a, const MeshPart& b, const AffineXf3f* rigidB2A = nullptr, float maxDistanceSq = FLT_MAX );
55
62MRMESH_API float findMaxDistanceSq( const MeshPart& a, const MeshPart& b, const AffineXf3f* rigidB2A = nullptr, float maxDistanceSq = FLT_MAX );
63
65
66} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
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 MeshMeshDistanceResult findDistance(const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr, float upDistLimitSq=FLT_MAX)
computes minimal distance between two meshes or two mesh regions
MRMESH_API float findMaxDistanceSq(const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr, float maxDistanceSq=FLT_MAX)
returns the squared Hausdorff distance between two meshes, that is the maximum of squared distances f...
MRMESH_API float findMaxDistanceSqOneWay(const MeshPart &a, const MeshPart &b, const AffineXf3f *rigidB2A=nullptr, float maxDistanceSq=FLT_MAX)
returns the maximum of the squared distances from each B-mesh vertex to A-mesh
Definition MRCameraOrientationPlugin.h:8
Definition MRMeshMeshDistance.h:16
float distSq
squared distance between a and b
Definition MRMeshMeshDistance.h:20
PointOnFace a
two closest points: from meshes A and B respectively
Definition MRMeshMeshDistance.h:18
PointOnFace b
Definition MRMeshMeshDistance.h:18
Definition MRMeshMeshDistance.h:25
PointOnFace b
Definition MRMeshMeshDistance.h:27
PointOnFace a
two closest points: from meshes A and B respectively
Definition MRMeshMeshDistance.h:27
float signedDist
signed distance between a and b, positive if meshes do not collide
Definition MRMeshMeshDistance.h:29
Definition MRMesh/MRPointOnFace.h:11