Go to the documentation of this file.
9 #ifndef CSimplePointsMap_H
10 #define CSimplePointsMap_H
43 virtual void reserve(
size_t newLength)
override;
44 virtual void resize(
size_t newLength)
override;
45 virtual void setSize(
size_t newLength)
override;
61 const size_t index, std::vector<float>& point_data)
const override
74 const size_t index,
const std::vector<float>& point_data)
override
95 const CPointsMap& anotherMap,
const size_t nPreviousPoints)
override
103 template <
class Derived>
105 template <
class Derived>
165 static const int HAS_RGB = 0;
167 static const int HAS_RGBf = 0;
169 static const int HAS_RGBu8 = 0;
177 inline size_t size()
const {
return m_obj.
size(); }
181 template <
typename T>
virtual void getPointAllFieldsFast(const size_t index, std::vector< float > &point_data) const override
Get all the data fields for one point as a vector: [X Y Z] Unlike getPointAllFields(),...
size_t size() const
Get number of points.
An adapter to different kinds of point cloud object.
size_t size() const
Returns the number of stored points in the map.
Options used when evaluating "computeObservationLikelihood" in the derived classes.
void setPointXYZ(const size_t idx, const coords_t x, const coords_t y, const coords_t z)
Set XYZ coordinates of i'th point.
void getPointFast(size_t index, float &x, float &y, float &z) const
Just like getPoint() but without checking out-of-bound index and without returning the point weight,...
virtual void insertPointFast(float x, float y, float z=0) override
The virtual method for insertPoint() without calling mark_as_modified()
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
virtual void internal_clear() override
Clear the map, erasing all the points.
With this struct options are provided to the observation insertion process.
virtual void setPointFast(size_t index, float x, float y, float z) override
Changes the coordinates of the given point (0-based index), without checking for out-of-bounds and wi...
GLsizei GLsizei GLuint * obj
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors.
mrpt::maps::CSimplePointsMap & m_obj
virtual void setSize(size_t newLength) override
Resizes all point buffers so they can hold the given number of points, erasing all previous contents ...
virtual void setPointAllFieldsFast(const size_t index, const std::vector< float > &point_data) override
Set all the data fields for one point as a vector: [X Y Z] Unlike setPointAllFields(),...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define THROW_EXCEPTION(msg)
Rendering options, used in getAs3DObject()
PointCloudAdapter(const mrpt::maps::CSimplePointsMap &obj)
Constructor (accept a const ref for convenience)
Declares a class derived from "CObservation" that encapsules a 3D range scan measurement,...
CSimplePointsMap()
Default constructor.
virtual void loadFromRangeScan(const mrpt::obs::CObservation2DRangeScan &rangeScan, const mrpt::poses::CPose3D *robotPose=nullptr) override
See CPointsMap::loadFromRangeScan()
virtual void reserve(size_t newLength) override
Reserves memory for a given number of points: the size of the map does not change,...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
mrpt::aligned_std_vector< float > m_z
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans.
mrpt::aligned_std_vector< float > m_y
virtual void copyFrom(const CPointsMap &obj) override
Virtual assignment operator, to be implemented in derived classes
virtual void addFrom_classSpecific(const CPointsMap &anotherMap, const size_t nPreviousPoints) override
Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific ...
#define MAP_DEFINITION_START(_CLASS_NAME_)
Add a MAP_DEFINITION_START() ...
void resize(const size_t N)
Set number of points (to uninitialized values)
#define MAP_DEFINITION_END(_CLASS_NAME_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
float coords_t
The type of each point XYZ coordinates.
A helper base class for those PointCloudAdapter<> which do not handle RGB data; it declares needed in...
void getPointXYZ(const size_t idx, T &x, T &y, T &z) const
Get XYZ coordinates of i'th point.
virtual const mrpt::maps::CSimplePointsMap * getAsSimplePointsMap() const override
If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points ...
mrpt::aligned_std_vector< float > m_x
The point coordinates.
#define ASSERTDEB_(f)
Defines an assertion mechanism - only when compiled in debug.
virtual void PLY_import_set_vertex_count(const size_t N) override
In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex.
virtual void resize(size_t newLength) override
Resizes all point buffers so they can hold the given number of points: newly created points are set t...
virtual mrpt::maps::CSimplePointsMap * getAsSimplePointsMap() override
void setInvalidPoint(const size_t idx)
Set XYZ coordinates of i'th point.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |