class mp2p_icp_filters::PointCloudToVoxelGridSingle

Overview

Like PointCloudToVoxelGrid, but hardcoded to only store one single point per voxel.

#include <PointCloudToVoxelGridSingle.h>

class PointCloudToVoxelGridSingle
{
public:
    // structs

    struct Impl;
    struct IndicesHash;
    struct indices_t;
    struct voxel_t;

    // methods

    void setResolution(const float voxel_size);
    void processPointCloud(const mrpt::maps::CPointsMap& p);
    void clear();
    int32_t coord2idx(float xyz) const;
    void visit_voxels(const std::function<void(const indices_t idx, const voxel_t&vxl)>& userCode) const;
    size_t size() const;
};

Methods

void setResolution(const float voxel_size)

Changes the voxel resolution, clearing past contents

void clear()

Remove all points and internal data.

size_t size() const

Returns the number of occupied voxels.