Go to the documentation of this file.
56 void reserve(
size_t newLength)
override;
57 void resize(
size_t newLength)
override;
58 void setSize(
size_t newLength)
override;
70 const size_t index, std::vector<float>& point_data)
const override
73 point_data[0] =
m_x[index];
74 point_data[1] =
m_y[index];
75 point_data[2] =
m_z[index];
85 const size_t index,
const std::vector<float>& point_data)
override
88 m_x[index] = point_data[0];
89 m_y[index] = point_data[1];
90 m_z[index] = point_data[2];
107 const CPointsMap& anotherMap,
const size_t nPreviousPoints)
override;
110 template <
class Derived>
112 template <
class Derived>
174 static constexpr
bool HAS_RGB =
false;
176 static constexpr
bool HAS_RGBf =
false;
178 static constexpr
bool HAS_RGBu8 =
false;
186 inline size_t size()
const {
return m_obj.
size(); }
192 template <
typename T>
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.
An adapter to different kinds of point cloud object.
size_t size() const
Save the point cloud as a PCL PCD file, in either ASCII or binary format.
void internal_clear() override
Clear the map, erasing all the points.
Options used when evaluating "computeObservationLikelihood" in the derived classes.
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,...
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans.
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
CWeightedPointsMap & operator=(const CPointsMap &o)
void setDimensions(size_t height, size_t width)
Does nothing as of now.
With this struct options are provided to the observation insertion process.
PointCloudAdapter(const mrpt::maps::CWeightedPointsMap &obj)
Constructor (accept a const ref for convenience)
void insertPointFast(float x, float y, float z=0) override
The virtual method for insertPoint() without calling mark_as_modified()
unsigned int getPointWeight(size_t index) const override
Gets the point weight, which is ignored in all classes (defaults to 1) but in those which actually st...
float coords_t
The type of each point XYZ coordinates.
size_t size() const
Get number of points.
void reserve(size_t newLength) override
Reserves memory for a given number of points: the size of the map does not change,...
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...
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
CWeightedPointsMap(const CPointsMap &o)
void setPointWeight(size_t index, unsigned long w) override
Sets the point weight, which is ignored in all classes but those which actually store that field (Not...
void setPointFast(size_t index, float x, float y, float z)
Changes the coordinates of the given point (0-based index), without checking for out-of-bounds and wi...
std::vector< T, mrpt::aligned_allocator_cpp11< T > > aligned_std_vector
CWeightedPointsMap & operator=(const CWeightedPointsMap &o)
void resize(const size_t N)
Set number of points (to uninitialized values)
A range or depth 3D scan measurement, as from a time-of-flight range camera or a structured-light dep...
void impl_copyFrom(const CPointsMap &obj) override
Virtual assignment operator, copies as much common data (XYZ, color,...) as possible from the source ...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
mrpt::aligned_std_vector< uint32_t > pointWeight
The points weights.
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 WEIGHT] Unlike setPointAllFields(),...
CWeightedPointsMap()=default
Default constructor.
mrpt::aligned_std_vector< float > m_z
CWeightedPointsMap(const CWeightedPointsMap &o)
mrpt::aligned_std_vector< float > m_y
void getPointXYZ(const size_t idx, T &x, T &y, T &z) const
Get XYZ coordinates of i'th point.
#define MAP_DEFINITION_START(_CLASS_NAME_)
Add a MAP_DEFINITION_START() ...
void loadFromRangeScan(const mrpt::obs::CObservation2DRangeScan &rangeScan, const mrpt::poses::CPose3D *robotPose=nullptr) override
See CPointsMap::loadFromRangeScan()
#define MAP_DEFINITION_END(_CLASS_NAME_)
mrpt::aligned_std_vector< float > m_x
The point coordinates.
#define ASSERTDEB_(f)
Defines an assertion mechanism - only when compiled in debug.
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 ...
void setSize(size_t newLength) override
Resizes all point buffers so they can hold the given number of points, erasing all previous contents ...
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 WEIGHT] Unlike getPointAllFields(),...
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.
mrpt::maps::CWeightedPointsMap & m_obj
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sat Jun 27 14:00:59 UTC 2020 | |