Go to the documentation of this file.
9 #ifndef mrpt_utils_adapters_H
10 #define mrpt_utils_adapters_H
47 template <
class POINTMAPTYPE,
typename coords_t>
54 inline const Derived &
derived()
const {
return *static_cast<const Derived*>(
this); }
58 inline void getPointXYZ_RGBf(
const size_t idx, T &x,T &y, T &z,
float &r,
float &g,
float &b)
const {
59 derived().getPointXYZ(idx,x,y,z);
63 inline void setPointXYZ_RGBf(
const size_t idx,
const coords_t x,
const coords_t y,
const coords_t z,
const float r,
const float g,
const float b) {
65 derived().setPointXYZ(idx,x,y,z);
70 inline void getPointXYZ_RGBu8(
const size_t idx, T &x,T &y, T &z, uint8_t &r,uint8_t &g,uint8_t &b)
const {
71 derived().getPointXYZ(idx,x,y,z);
75 inline void setPointXYZ_RGBu8(
const size_t idx,
const coords_t x,
const coords_t y,
const coords_t z,
const uint8_t r,
const uint8_t g,
const uint8_t b) {
77 derived().setPointXYZ(idx,x,y,z);
81 inline void getPointRGBf(
const size_t idx,
float &r,
float &g,
float &b)
const {
86 inline void setPointRGBf(
const size_t idx,
const float r,
const float g,
const float b) {
91 inline void getPointRGBu8(
const size_t idx, uint8_t &r,uint8_t &g,uint8_t &b)
const {
96 inline void setPointRGBu8(
const size_t idx,
const uint8_t r,
const uint8_t g,
const uint8_t b) {
An adapter to different kinds of point cloud object.
void getPointRGBf(const size_t idx, float &r, float &g, float &b) const
Get RGBf color of i'th point.
void getPointRGBu8(const size_t idx, uint8_t &r, uint8_t &g, uint8_t &b) const
Get RGBu8 color of i'th point.
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void getPointXYZ_RGBu8(const size_t idx, T &x, T &y, T &z, uint8_t &r, uint8_t &g, uint8_t &b) const
Get XYZ_RGBu8 coordinates of i'th point.
void setPointXYZ_RGBf(const size_t idx, const coords_t x, const coords_t y, const coords_t z, const float r, const float g, const float b)
Set XYZ_RGBf coordinates of i'th point.
void setPointRGBu8(const size_t idx, const uint8_t r, const uint8_t g, const uint8_t b)
Set RGBu8 coordinates of i'th point.
void setPointXYZ_RGBu8(const size_t idx, const coords_t x, const coords_t y, const coords_t z, const uint8_t r, const uint8_t g, const uint8_t b)
Set XYZ_RGBu8 coordinates of i'th point.
const Derived & derived() const
void setPointRGBf(const size_t idx, const float r, const float g, const float b)
Set XYZ_RGBf coordinates of i'th point.
PointCloudAdapter< POINTMAPTYPE > Derived
Specialization mrpt::utils::PointCloudAdapter<pcl::PointCloud<pcl::PointXYZ> > for an XYZ point cloud...
void getPointXYZ_RGBf(const size_t idx, T &x, T &y, T &z, float &r, float &g, float &b) const
Get XYZ_RGBf coordinates of i'th point.
A helper base class for those PointCloudAdapter<> which do not handle RGB data; it declares needed in...
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 22:32:58 UTC 2019 | | |