33 float upDistLimitSq = FLT_MAX,
34 const AffineXf3f* xf =
nullptr,
35 float loDistLimitSq = 0,
36 VertPredicate skipCb = {} );
45 float upDistLimitSq = FLT_MAX,
46 const AffineXf3f* xf =
nullptr,
47 float loDistLimitSq = 0 );
65 const AffineXf3f*
xf =
nullptr;
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:83
container of bits
Definition MRMesh/MRBitSet.h:27
std::vector<V>-like container that is 1) resized without initialization of its elements,...
Definition MRBuffer.h:54
the class stores some number of smallest elements from a larger number of candidates
Definition MRFewSmallest.h:14
abstract class for computing the closest points of point clouds
Definition MRPointsProject.h:78
virtual ~IPointsProjector()=default
virtual Expected< void > findProjections(std::vector< PointsProjectionResult > &results, const std::vector< Vector3f > &points, const FindProjectionOnPointsSettings &settings) const =0
computes the closest points on point cloud to given points
virtual Expected< void > setPointCloud(const PointCloud &pointCloud)=0
sets the reference point cloud
default implementation of IPointsProjector
Definition MRPointsProject.h:92
MRMESH_API Expected< void > findProjections(std::vector< PointsProjectionResult > &results, const std::vector< Vector3f > &points, const FindProjectionOnPointsSettings &settings) const override
computes the closest points on point cloud to given points
MRMESH_API Expected< void > setPointCloud(const PointCloud &pointCloud) override
sets the reference point cloud
MRMESH_API void findFewClosestPoints(const Vector3f &pt, const PointCloud &pc, FewSmallest< PointsProjectionResult > &res, float upDistLimitSq=FLT_MAX, const AffineXf3f *xf=nullptr, float loDistLimitSq=0)
finds a number of the closest points in the cloud (as configured in
MRMESH_API Buffer< VertId > findNClosestPointsPerPoint(const PointCloud &pc, int numNei, const ProgressCallback &progress={})
finds given number of closest points (excluding itself) to each valid point in the cloud;
MRMESH_API PointsProjectionResult findProjectionOnPoints(const Vector3f &pt, const PointCloud &pc, float upDistLimitSq=FLT_MAX, const AffineXf3f *xf=nullptr, float loDistLimitSq=0, VertPredicate skipCb={})
computes the closest point on point cloud to given point
MRMESH_API VertPair findTwoClosestPoints(const PointCloud &pc, const ProgressCallback &progress={})
finds two closest points (first id < second id) in whole point cloud
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:636
tl::expected< T, E > Expected
Definition MRExpected.h:59
std::pair< VertId, VertId > VertPair
Definition MRMesh/MRMeshFwd.h:413
settings for IPointsProjector::findProjections
Definition MRPointsProject.h:61
float loDistLimitSq
low limit on the distance in question, if a point is found within this distance then it is immediatel...
Definition MRPointsProject.h:69
const BitSet * valid
bitset of valid input points
Definition MRPointsProject.h:63
bool skipSameIndex
if true, discards a projection candidate with the same index as the target point
Definition MRPointsProject.h:71
float upDistLimitSq
upper limit on the distance in question, if the real distance is larger than the function exits retur...
Definition MRPointsProject.h:67
ProgressCallback cb
progress callback
Definition MRPointsProject.h:73
const AffineXf3f * xf
affine transformation for input points
Definition MRPointsProject.h:65
Definition MRMesh/MRPointCloud.h:16
Definition MRPointsProject.h:15
float distSq
squared distance from pt to proj
Definition MRPointsProject.h:17
auto operator<=>(const PointsProjectionResult &) const =default
VertId vId
the closest vertex in point cloud
Definition MRPointsProject.h:19