class mrpt::maps::CVoxelMapRGB
#include <mrpt/maps/CVoxelMapRGB.h>
class CVoxelMapRGB: public mrpt::maps::CVoxelMapOccupancyBase
{
public:
// typedefs
typedef CVoxelMapBase<node_t> myself_t;
typedef node_t voxel_node_t;
//
fields
double resolution = 0.10;
uint8_t inner_bits = 2;
uint8_t leaf_bits = 3;
mrpt::maps::TVoxelMap_InsertionOptions insertionOpts;
mrpt::maps::TVoxelMap_LikelihoodOptions likelihoodOpts;
TVoxelMap_LikelihoodOptions likelihoodOptions;
TVoxelMap_RenderingOptions renderingOptions;
// construction
CVoxelMapRGB(
double resolution = 0.05,
uint8_t inner_bits = 2,
uint8_t leaf_bits = 3
);
//
methods
virtual bool nn_single_search(
const mrpt::math::TPoint2Df& query,
mrpt::math::TPoint2Df& result,
float& out_dist_sqr,
uint64_t& resultIndexOrID
) const;
virtual void nn_multiple_search(
const mrpt::math::TPoint2Df& query,
const size_t N,
std::vector<mrpt::math::TPoint2Df>& results,
std::vector<float>& out_dists_sqr,
std::vector<uint64_t>& resultIndicesOrIDs
) const;
virtual void nn_radius_search(
const mrpt::math::TPoint2Df& query,
const float search_radius_sqr,
std::vector<mrpt::math::TPoint2Df>& results,
std::vector<float>& out_dists_sqr,
std::vector<uint64_t>& resultIndicesOrIDs,
size_t maxPoints
) const;
void insertPointCloudAsRays(
const mrpt::maps::CPointsMap& pts,
const mrpt::math::TPoint3D& sensorPt,
const std::optional<const mrpt::poses::CPose3D>& sensorPose = std::nullopt
);
void insertPointCloudAsEndPoints(
const mrpt::maps::CPointsMap& pts,
const mrpt::math::TPoint3D& sensorPt,
const std::optional<const mrpt::poses::CPose3D>& sensorPose = std::nullopt
);
const Bonxai::VoxelGrid<node_t>& grid() const;
};
Inherited Members
public:
// structs
struct Impl;
//
fields
static constexpr int8_t CELLTYPE_MIN = -127;
static constexpr int8_t CELLTYPE_MAX = 127;
static constexpr int8_t P2LTABLE_SIZE = CELLTYPE_MAX;
static constexpr std::size_t LOGODDS_LUT_ENTRIES = 1<<8;
//
methods
virtual bool isEmpty() const = 0;
virtual void saveMetricMapRepresentationToFile(const std::string& filNamePrefix) const = 0;
virtual std::string asString() const = 0;
virtual void getVisualizationInto(mrpt::opengl::CSetOfObjects& o) const = 0;
CVoxelMapBase& operator = (const CVoxelMapBase& o);
CVoxelMapBase& operator = (CVoxelMapBase&& o);
virtual void getAsOctoMapVoxels(mrpt::opengl::COctoMapVoxels& gl_obj) const = 0;
virtual bool nn_has_indices_or_ids() const = 0;
virtual size_t nn_index_count() const = 0;
virtual bool nn_single_search(
const mrpt::math::TPoint3Df& query,
mrpt::math::TPoint3Df& result,
float& out_dist_sqr,
uint64_t& resultIndexOrIDOrID
) const = 0;
virtual bool nn_single_search(
const mrpt::math::TPoint2Df& query,
mrpt::math::TPoint2Df& result,
float& out_dist_sqr,
uint64_t& resultIndexOrIDOrID
) const = 0;
virtual void nn_multiple_search(
const mrpt::math::TPoint3Df& query,
const size_t N,
std::vector<mrpt::math::TPoint3Df>& results,
std::vector<float>& out_dists_sqr,
std::vector<uint64_t>& resultIndicesOrIDs
) const = 0;
virtual void nn_multiple_search(
const mrpt::math::TPoint2Df& query,
const size_t N,
std::vector<mrpt::math::TPoint2Df>& results,
std::vector<float>& out_dists_sqr,
std::vector<uint64_t>& resultIndicesOrIDs
) const = 0;
virtual void nn_radius_search(
const mrpt::math::TPoint3Df& query,
const float search_radius_sqr,
std::vector<mrpt::math::TPoint3Df>& results,
std::vector<float>& out_dists_sqr,
std::vector<uint64_t>& resultIndicesOrIDs,
size_t maxPoints = 0
) const = 0;
virtual void nn_radius_search(
const mrpt::math::TPoint2Df& query,
const float search_radius_sqr,
std::vector<mrpt::math::TPoint2Df>& results,
std::vector<float>& out_dists_sqr,
std::vector<uint64_t>& resultIndicesOrIDs,
size_t maxPoints = 0
) const = 0;