MeshLib
 
Loading...
Searching...
No Matches
MRPointsProject.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3#include "MRId.h"
5#include <cfloat>
6
7namespace MR
8{
11
13{
15 float distSq{ 0 };
18
19 auto operator <=>(const PointsProjectionResult &) const = default;
20};
21
22
31 float upDistLimitSq = FLT_MAX,
32 const AffineXf3f* xf = nullptr,
33 float loDistLimitSq = 0,
34 VertPredicate skipCb = {} );
35
43 float upDistLimitSq = FLT_MAX,
44 const AffineXf3f* xf = nullptr,
45 float loDistLimitSq = 0 );
46
52[[nodiscard]] MRMESH_API Buffer<VertId> findNClosestPointsPerPoint( const PointCloud& pc, int numNei, const ProgressCallback & progress = {} );
53
55[[nodiscard]] MRMESH_API VertPair findTwoClosestPoints( const PointCloud& pc, const ProgressCallback & progress = {} );
56
58}
int VertId
Definition MRDotNet/MRMeshFwd.h:51
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
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
represents a 3-dimentional float-typed vector
Definition MRDotNet/MRVector3.h:8
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:589
Definition MRCameraOrientationPlugin.h:7
std::pair< VertId, VertId > VertPair
Definition MRMesh/MRMeshFwd.h:349
Definition MRMesh/MRPointCloud.h:16
Definition MRPointsProject.h:13
float distSq
squared distance from pt to proj
Definition MRPointsProject.h:15
auto operator<=>(const PointsProjectionResult &) const =default
VertId vId
the closest vertex in point cloud
Definition MRPointsProject.h:17