Loading...
Searching...
No Matches
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

constexpr | RGB (const _RGB &p)
constexpr | RGB ()
constexpr | RGB (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a=255)

## Friends

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

## Detailed Description

A structure representing RGB color information.

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

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

To unpack it use:

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

Definition at line 362 of file point_types.hpp.

## Constructor & Destructor Documentation

## RGB() [1/3]

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

inline constexpr

Definition at line 364 of file point_types.hpp.

References RGB().

Referenced by operator<<, RGB(), and RGB().

## RGB() [2/3]

pcl::RGB::RGB | ( |  | ) |

inline constexpr

Definition at line 366 of file point_types.hpp.

References RGB().

## RGB() [3/3]

pcl::RGB::RGB | ( | std::uint8_t | _r,
|  | std::uint8_t | _g,
|  | std::uint8_t | _b,
|  | std::uint8_t | _a = 255 )

inline constexpr

Definition at line 368 of file point_types.hpp.

## Friends And Related Symbol Documentation

## operator<<

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

friend

References RGB().

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

- pcl/impl/point_types.hpp