29 #include <nanoflann.hpp> 41 #define HOST_DEVICE __host__ __device__ 48 return x * 73856096 ^ y * 193649663 ^ z * 83492791;
60 template <
class TVecf>
62 const TVecf& pos,
const typename TVecf::Scalar_t& inv_voxel_size) {
63 TVecf ref_coord = pos * inv_voxel_size;
66 voxel_index =
floor(ref_coord).template cast<int>();
75 Adaptor(
size_t num_points,
const T*
const data)
76 : num_points(num_points), data(data) {}
81 return data[3 * idx + dim];
94 template <
int METRIC,
class T>
#define HOST_DEVICE
Definition: NeighborSearchCommon.h:43
Definition: NanoFlannIndex.h:42
size_t kdtree_get_point_count() const
Definition: NeighborSearchCommon.h:78
Metric
Supported metrics.
Definition: NeighborSearchCommon.h:38
HOST_DEVICE utility::MiniVec< int, 3 > ComputeVoxelIndex(const TVecf &pos, const typename TVecf::Scalar_t &inv_voxel_size)
Definition: NeighborSearchCommon.h:61
Definition: NeighborSearchCommon.h:38
nanoflann::L2_Adaptor< T, Adaptor< T > > Adaptor_t
Definition: NeighborSearchCommon.h:99
FN_SPECIFIERS MiniVec< float, N > floor(const MiniVec< float, N > &a)
Definition: MiniVec.h:94
Definition: NeighborSearchCommon.h:38
Adaptor(size_t num_points, const T *const data)
Definition: NeighborSearchCommon.h:75
nanoflann::L1_Adaptor< T, Adaptor< T > > Adaptor_t
Definition: NeighborSearchCommon.h:104
Definition: NeighborSearchCommon.h:38
Definition: PinholeCameraIntrinsic.cpp:35
Definition: NanoFlannIndex.h:39
HOST_DEVICE size_t SpatialHash(int x, int y, int z)
Spatial hashing function for integer coordinates.
Definition: NeighborSearchCommon.h:47
T kdtree_get_pt(const size_t idx, int dim) const
Definition: NeighborSearchCommon.h:80
Definition: NeighborSearchCommon.h:95
bool kdtree_get_bbox(BBOX &) const
Definition: NeighborSearchCommon.h:85
Adaptor for nanoflann.
Definition: NeighborSearchCommon.h:73