MeshLib C++ Docs
Loading...
Searching...
No Matches
MRPointsInBall.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRBall.h"
5#include "MRVector3.h"
6
7namespace MR
8{
9
10using FoundPointCallback = std::function<void( VertId, const Vector3f& )>;
11
15MRMESH_API void findPointsInBall( const PointCloud& pointCloud, const Ball3f& ball,
16 const FoundPointCallback& foundCallback, const AffineXf3f* xf = nullptr );
17[[deprecated]] inline void findPointsInBall( const PointCloud& pointCloud, const Vector3f& center, float radius,
18 const FoundPointCallback& foundCallback, const AffineXf3f* xf = nullptr ) { return findPointsInBall( pointCloud, { center, sqr( radius ) }, foundCallback, xf ); }
19
23MRMESH_API void findPointsInBall( const Mesh& mesh, const Ball3f& ball,
24 const FoundPointCallback& foundCallback, const AffineXf3f* xf = nullptr );
25[[deprecated]] inline void findPointsInBall( const Mesh& mesh, const Vector3f& center, float radius,
26 const FoundPointCallback& foundCallback, const AffineXf3f* xf = nullptr ) { return findPointsInBall( mesh, { center, sqr( radius ) }, foundCallback, xf ); }
27
31MRMESH_API void findPointsInBall( const AABBTreePoints& tree, const Ball3f& ball,
32 const FoundPointCallback& foundCallback, const AffineXf3f* xf = nullptr );
33[[deprecated]] inline void findPointsInBall( const AABBTreePoints& tree, const Vector3f& center, float radius,
34 const FoundPointCallback& foundCallback, const AffineXf3f* xf = nullptr ) { return findPointsInBall( tree, { center, sqr( radius ) }, foundCallback, xf ); }
35
36} //namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
bounding volume hierarchy for point cloud structure
Definition MRAABBTreePoints.h:16
MRMESH_API void findPointsInBall(const PointCloud &pointCloud, const Ball3f &ball, const FoundPointCallback &foundCallback, const AffineXf3f *xf=nullptr)
constexpr T sqr(T x) noexcept
Definition MRMesh/MRMeshFwd.h:650
std::function< void(VertId, const Vector3f &)> FoundPointCallback
Definition MRPointsInBall.h:10
Definition MRMesh/MRMesh.h:23
Definition MRMesh/MRPointCloud.h:16