MRPT  2.0.0
List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > > Class Template Reference

Detailed Description

template<>
class mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >

Specialization mrpt::opengl::PointCloudAdapter<pcl::PointCloud<pcl::PointXYZRGBA> > for an XYZ point cloud with RGB.

Definition at line 239 of file PCL_adapters.h.

#include <mrpt/maps/PCL_adapters.h>

Public Types

using coords_t = float
 The type of each point XYZ coordinates. More...
 

Public Member Functions

 PointCloudAdapter (const pcl::PointCloud< pcl::PointXYZRGBA > &obj)
 Constructor (accept a const ref for convenience) More...
 
size_t size () const
 Get number of points. More...
 
void resize (const size_t N)
 Set number of points (to uninitialized values) More...
 
void setDimensions (size_t height, size_t width)
 Set height and width (for organized) More...
 
template<typename T >
void getPointXYZ (const size_t idx, T &x, T &y, T &z) const
 Get XYZ coordinates of i'th point. More...
 
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. More...
 
void setInvalidPoint (const size_t idx)
 Set Invalid Point. More...
 
template<typename T >
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. More...
 
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. More...
 
template<typename T >
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. More...
 
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. More...
 
void getPointRGBf (const size_t idx, float &r, float &g, float &b) const
 Get RGBf color of i'th point. More...
 
void setPointRGBf (const size_t idx, const float r, const float g, const float b)
 Set XYZ_RGBf coordinates of i'th point. More...
 
void getPointRGBu8 (const size_t idx, uint8_t &r, uint8_t &g, uint8_t &b) const
 Get RGBu8 color of i'th point. More...
 
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. More...
 

Static Public Attributes

static constexpr bool HAS_RGB = true
 Has any color RGB info? More...
 
static constexpr bool HAS_RGBf = false
 Has native RGB info (as floats)? More...
 
static constexpr bool HAS_RGBu8 = true
 Has native RGB info (as uint8_t)? More...
 

Private Attributes

pcl::PointCloud< pcl::PointXYZRGBA > & m_obj
 

Member Typedef Documentation

◆ coords_t

using mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::coords_t = float

The type of each point XYZ coordinates.

Definition at line 246 of file PCL_adapters.h.

Constructor & Destructor Documentation

◆ PointCloudAdapter()

mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::PointCloudAdapter ( const pcl::PointCloud< pcl::PointXYZRGBA > &  obj)
inline

Constructor (accept a const ref for convenience)

Definition at line 255 of file PCL_adapters.h.

Member Function Documentation

◆ getPointRGBf()

void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::getPointRGBf ( const size_t  idx,
float &  r,
float &  g,
float &  b 
) const
inline

Get RGBf color of i'th point.

Definition at line 353 of file PCL_adapters.h.

◆ getPointRGBu8()

void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::getPointRGBu8 ( const size_t  idx,
uint8_t &  r,
uint8_t &  g,
uint8_t &  b 
) const
inline

Get RGBu8 color of i'th point.

Definition at line 372 of file PCL_adapters.h.

◆ getPointXYZ()

template<typename T >
void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::getPointXYZ ( const size_t  idx,
T &  x,
T &  y,
T &  z 
) const
inline

Get XYZ coordinates of i'th point.

Definition at line 272 of file PCL_adapters.h.

◆ getPointXYZ_RGBf()

template<typename T >
void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::getPointXYZ_RGBf ( const size_t  idx,
T &  x,
T &  y,
T &  z,
float &  r,
float &  g,
float &  b 
) const
inline

Get XYZ_RGBf coordinates of i'th point.

Definition at line 299 of file PCL_adapters.h.

◆ getPointXYZ_RGBu8()

template<typename T >
void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::getPointXYZ_RGBu8 ( const size_t  idx,
T &  x,
T &  y,
T &  z,
uint8_t &  r,
uint8_t &  g,
uint8_t &  b 
) const
inline

Get XYZ_RGBu8 coordinates of i'th point.

Definition at line 326 of file PCL_adapters.h.

◆ resize()

void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::resize ( const size_t  N)
inline

Set number of points (to uninitialized values)

Definition at line 262 of file PCL_adapters.h.

◆ setDimensions()

void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::setDimensions ( size_t  height,
size_t  width 
)
inline

Set height and width (for organized)

Definition at line 264 of file PCL_adapters.h.

◆ setInvalidPoint()

void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::setInvalidPoint ( const size_t  idx)
inline

Set Invalid Point.

Definition at line 291 of file PCL_adapters.h.

◆ setPointRGBf()

void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::setPointRGBf ( const size_t  idx,
const float  r,
const float  g,
const float  b 
)
inline

Set XYZ_RGBf coordinates of i'th point.

Definition at line 362 of file PCL_adapters.h.

◆ setPointRGBu8()

void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::setPointRGBu8 ( const size_t  idx,
const uint8_t  r,
const uint8_t  g,
const uint8_t  b 
)
inline

Set RGBu8 coordinates of i'th point.

Definition at line 381 of file PCL_adapters.h.

◆ setPointXYZ()

void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::setPointXYZ ( const size_t  idx,
const coords_t  x,
const coords_t  y,
const coords_t  z 
)
inline

Set XYZ coordinates of i'th point.

Definition at line 280 of file PCL_adapters.h.

◆ setPointXYZ_RGBf()

void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::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 
)
inline

Set XYZ_RGBf coordinates of i'th point.

Definition at line 311 of file PCL_adapters.h.

◆ setPointXYZ_RGBu8()

void mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::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 
)
inline

Set XYZ_RGBu8 coordinates of i'th point.

Definition at line 339 of file PCL_adapters.h.

◆ size()

size_t mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::size ( ) const
inline

Get number of points.

Definition at line 260 of file PCL_adapters.h.

Member Data Documentation

◆ HAS_RGB

constexpr bool mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::HAS_RGB = true
static

Has any color RGB info?

Definition at line 248 of file PCL_adapters.h.

◆ HAS_RGBf

constexpr bool mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::HAS_RGBf = false
static

Has native RGB info (as floats)?

Definition at line 250 of file PCL_adapters.h.

◆ HAS_RGBu8

constexpr bool mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::HAS_RGBu8 = true
static

Has native RGB info (as uint8_t)?

Definition at line 252 of file PCL_adapters.h.

◆ m_obj

pcl::PointCloud<pcl::PointXYZRGBA>& mrpt::opengl::PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >::m_obj
private

Definition at line 242 of file PCL_adapters.h.




Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020