itom
Loading...
Searching...
No Matches
ito::PCLPoint Class Reference

generic class that covers one single point of different possible types provided by the Point Cloud Library (PCL). More...

#include <pclStructures.h>

Public Member Functions

 PCLPoint ()
 empty constructor creates invalid point type
 
 PCLPoint (ito::tPCLPointType type)
 constructor with desired point type. The specific point is created but not initialized with desired values.
 
void copyFromVoidPtrAndType (void *ptr, ito::tPCLPointType type)
 helper function to copy the content of a given pointer representing a specific point of given type into this object.
 
 PCLPoint (const pcl::PointXYZ &point)
 copy constructor from point of PCL type pcl::PointXYZ
 
 PCLPoint (const pcl::PointXYZI &point)
 copy constructor from point of PCL type pcl::PointXYZI
 
 PCLPoint (const pcl::PointXYZRGBA &point)
 copy constructor from point of PCL type pcl::PointXYZRGBA
 
 PCLPoint (const pcl::PointNormal &point)
 copy constructor from point of PCL type pcl::PointNormal
 
 PCLPoint (const pcl::PointXYZINormal &point)
 copy constructor from point of PCL type pcl::PointXYZINormal
 
 PCLPoint (const pcl::PointXYZRGBNormal &point)
 copy constructor from point of PCL type pcl::PointXYZRGBNormal
 
 PCLPoint (const PCLPoint &p)
 copy constructor from another instance of PCLPoint
 
PCLPointoperator= (const PCLPoint &p)
 assigns the given PCLPoint data to this object
 
 ~PCLPoint ()
 destructor
 
ito::tPCLPointType getType () const
 returns type of covered point type or ito::pclInvalid if invalid point.
 
const pcl::PointXYZ & getPointXYZ () const
 if this object covers a point of type ito::PointXYZ, this point is returned as pcl::PointXYZ object.
 
const pcl::PointXYZI & getPointXYZI () const
 if this object covers a point of type ito::PointXYZI, this point is returned as pcl::PointXYZI object.
 
const pcl::PointXYZRGBA & getPointXYZRGBA () const
 if this object covers a point of type ito::PointXYZRGBA, this point is returned as pcl::PointXYZRGBA object.
 
const pcl::PointNormal & getPointXYZNormal () const
 if this object covers a point of type ito::PointXYZNormal, this point is returned as pcl::PointNormal object.
 
const pcl::PointXYZINormal & getPointXYZINormal () const
 if this object covers a point of type ito::PointXYZINormal, this point is returned as pcl::PointXYZINormal object.
 
const pcl::PointXYZRGBNormal & getPointXYZRGBNormal () const
 if this object covers a point of type ito::PointXYZRGBNormal, this point is returned as pcl::PointXYZRGBNormal object.
 
pcl::PointXYZ & getPointXYZ ()
 
pcl::PointXYZI & getPointXYZI ()
 
pcl::PointXYZRGBA & getPointXYZRGBA ()
 
pcl::PointNormal & getPointXYZNormal ()
 
pcl::PointXYZINormal & getPointXYZINormal ()
 
pcl::PointXYZRGBNormal & getPointXYZRGBNormal ()
 
bool getXYZ (float &x, float &y, float &z)
 
bool setXYZ (float x, float y, float z, int mask=0xFFFF)
 
bool getNormal (float &nx, float &ny, float &nz)
 
bool setNormal (float nx, float ny, float nz, int mask=0xFFFF)
 
bool getRGBA (uint8_t &r, uint8_t &g, uint8_t &b, uint8_t &a)
 
bool setRGBA (uint8_t r, uint8_t g, uint8_t b, uint8_t a, int mask=0xFFFF)
 
bool getIntensity (float &intensity)
 
bool setIntensity (float intensity)
 
bool getCurvature (float &curvature)
 
bool setCurvature (float curvature)
 

Private Attributes

void * m_genericPoint
 
ito::tPCLPointType m_type
 

Friends

template<typename _Tp >
_Tp * getPointPtrInternal (ito::PCLPoint &point)
 
template<typename _Tp >
const _Tp * getPointPtrInternal (const ito::PCLPoint &point)
 

Detailed Description

generic class that covers one single point of different possible types provided by the Point Cloud Library (PCL).

The possible types are compatible to PCLPointCloud and described in ito::tPCLPointType:

ito::pclXYZ: x, y, z ito::pclXYZI: x, y, z, intensity ito::pclXYZRGBA: x, y, z, color (red, green, blue, alpha) ito::pclXYZNormal: x, y, z, normal_x, normal_y, normal_z, curvature ito::pclXYZINormal ito::pclXYZRGBNormal

The specific type is saved in the member m_type whereas m_genericPoint points to the value.

Member Function Documentation

◆ getPointXYZ()

const pcl::PointXYZ & ito::PCLPoint::getPointXYZ ( ) const

if this object covers a point of type ito::PointXYZ, this point is returned as pcl::PointXYZ object.

Exceptions
pcl::PCLExceptionif this point is not of type ito::PointXYZ

◆ getPointXYZI()

const pcl::PointXYZI & ito::PCLPoint::getPointXYZI ( ) const

if this object covers a point of type ito::PointXYZI, this point is returned as pcl::PointXYZI object.

Exceptions
pcl::PCLExceptionif this point is not of type ito::PointXYZI

◆ getPointXYZINormal()

const pcl::PointXYZINormal & ito::PCLPoint::getPointXYZINormal ( ) const

if this object covers a point of type ito::PointXYZINormal, this point is returned as pcl::PointXYZINormal object.

Exceptions
pcl::PCLExceptionif this point is not of type ito::PointXYZINormal

◆ getPointXYZNormal()

const pcl::PointNormal & ito::PCLPoint::getPointXYZNormal ( ) const

if this object covers a point of type ito::PointXYZNormal, this point is returned as pcl::PointNormal object.

Exceptions
pcl::PCLExceptionif this point is not of type ito::PointXYZNormal

◆ getPointXYZRGBA()

const pcl::PointXYZRGBA & ito::PCLPoint::getPointXYZRGBA ( ) const

if this object covers a point of type ito::PointXYZRGBA, this point is returned as pcl::PointXYZRGBA object.

Exceptions
pcl::PCLExceptionif this point is not of type ito::PointXYZRGBA

◆ getPointXYZRGBNormal()

const pcl::PointXYZRGBNormal & ito::PCLPoint::getPointXYZRGBNormal ( ) const

if this object covers a point of type ito::PointXYZRGBNormal, this point is returned as pcl::PointXYZRGBNormal object.

Exceptions
pcl::PCLExceptionif this point is not of type ito::PointXYZRGBNormal

Member Data Documentation

◆ m_genericPoint

void* ito::PCLPoint::m_genericPoint
private

generic pointer that holds an instance of the corresponding classes pcl::PointXYZ, pcl::PointNormal... (depending on m_type)

◆ m_type

ito::tPCLPointType ito::PCLPoint::m_type
private

type covered by this object


The documentation for this class was generated from the following files: