Point Cloud Library (PCL)  1.8.1-dev
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members | Public Member Functions | Friends
pcl::RGB Struct Reference

A structure representing RGB color information. More...

#include <pcl/impl/point_types.hpp>

+ Inheritance diagram for pcl::RGB:

Public Member Functions

 RGB (const _RGB &p)
 RGB ()
 RGB (uint8_t _r, uint8_t _g, uint8_t _b)


std::ostream & operator<< (std::ostream &os, const RGB &p)

Additional Inherited Members

- Public Attributes inherited from pcl::_RGB

Detailed Description

A structure representing RGB color information.

The RGBA information is available either as separate r, g, b, or as a packed uint32_t rgba value. To pack it, use:

int rgb = ((int)r) << 16 | ((int)g) << 8 | ((int)b);

To unpack it use:

int rgb = ...;
uint8_t r = (rgb >> 16) & 0x0000ff;
uint8_t g = (rgb >> 8) & 0x0000ff;
uint8_t b = (rgb) & 0x0000ff;

Definition at line 339 of file point_types.hpp.

Constructor & Destructor Documentation

pcl::RGB::RGB ( const _RGB p)

Definition at line 341 of file point_types.hpp.

pcl::RGB::RGB ( )

Definition at line 346 of file point_types.hpp.

pcl::RGB::RGB ( uint8_t  _r,
uint8_t  _g,
uint8_t  _b 

Definition at line 352 of file point_types.hpp.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const RGB p 

The documentation for this struct was generated from the following file: