class mrpt::maps::CHeightGridMap2D_Base¶
Virtual base class for Digital Elevation Model (DEM) maps.
See derived classes for details. This class implements those operations which are especific to DEMs.
#include <mrpt/maps/CHeightGridMap2D_Base.h> class CHeightGridMap2D_Base { public: // structs struct TPointInsertParams; // methods virtual bool insertIndividualPoint( const double x, const double y, const double z, const TPointInsertParams& params = TPointInsertParams() ) = 0; virtual double dem_get_resolution() const = 0; virtual size_t dem_get_size_x() const = 0; virtual size_t dem_get_size_y() const = 0; virtual bool dem_get_z_by_cell(const size_t cx, const size_t cy, double& z_out) const = 0; virtual bool dem_get_z(const double x, const double y, double& z_out) const = 0; virtual void dem_update_map() = 0; }; // direct descendants class CHeightGridMap2D; class CHeightGridMap2D_MRF;
Methods¶
virtual bool insertIndividualPoint( const double x, const double y, const double z, const TPointInsertParams& params = TPointInsertParams() ) = 0
Update the DEM with one new point.
Returns:
true if updated OK, false if (x,y) is out of bounds
See also:
mrpt::maps::CMetricMap::insertObservation() for inserting higher-level objects like 2D/3D LIDAR scans
virtual bool dem_get_z_by_cell(const size_t cx, const size_t cy, double& z_out) const = 0
Get cell ‘z’ by (cx,cy) cell indices.
Returns:
false if out of bounds or un-observed cell.
virtual bool dem_get_z(const double x, const double y, double& z_out) const = 0
Get cell ‘z’ (x,y) by metric coordinates.
Returns:
false if out of bounds or un-observed cell.
virtual void dem_update_map() = 0
Ensure that all observations are reflected in the map estimate.