23 const mrpt::math::TPoint3D& min_corner,
24 const mrpt::math::TPoint3D& max_corner,
const float voxel_size)
30 min_corner.x, max_corner.x, min_corner.y, max_corner.y, min_corner.z,
31 max_corner.z, voxel_size, voxel_size);
44 const auto& xs = p.getPointsBufferRef_x();
45 const auto& ys = p.getPointsBufferRef_y();
46 const auto& zs = p.getPointsBufferRef_z();
47 const auto npts = xs.size();
51 x0 = y0 = z0 = std::numeric_limits<float>::max();
53 for (std::size_t i = 0; i < npts; i++)
57 max3(
abs(x0 - xs[i]),
abs(y0 - ys[i]),
abs(z0 - zs[i])) <
69 const auto vxl_idx =
pts_voxels.cellAbsIndexFromCXCYCZ(cx, cy, cz);
70 if (vxl_idx == grid_t::INVALID_VOXEL_IDX)
continue;
74 c->indices.push_back(i);
93 used_voxel_indices.clear();
void resize(const mrpt::math::TPoint3D &min_corner, const mrpt::math::TPoint3D &max_corner, const float voxel_size)
void processPointCloud(const mrpt::maps::CPointsMap &p)
float min_consecutive_distance
std::vector< uint32_t > used_voxel_indices
Makes an index of a point cloud using a voxel grid.
INLINE Rall1d< T, V, S > abs(const Rall1d< T, V, S > &x)