CARLA
Public Member Functions | Public Attributes | List of all members
carla::sensor::data::Color Struct Reference

A 32-bit BGRA color. More...

#include <Color.h>

+ Collaboration diagram for carla::sensor::data::Color:

Public Member Functions

 Color ()=default
 
 Color (const Color &)=default
 
 Color (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255u)
 
 MSGPACK_DEFINE_ARRAY (r, g, b, a)
 
 operator rpc::Color () const
 
 operator rpc::FloatColor () const
 
bool operator!= (const Color &rhs) const
 
Coloroperator= (const Color &)=default
 
bool operator== (const Color &rhs) const
 

Public Attributes

uint8_t a = 0u
 
uint8_t b = 0u
 
uint8_t g = 0u
 
uint8_t r = 0u
 

Detailed Description

A 32-bit BGRA color.

Definition at line 20 of file sensor/data/Color.h.

Constructor & Destructor Documentation

◆ Color() [1/3]

carla::sensor::data::Color::Color ( )
default

◆ Color() [2/3]

carla::sensor::data::Color::Color ( const Color )
default

◆ Color() [3/3]

carla::sensor::data::Color::Color ( uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a = 255u 
)
inline

Definition at line 24 of file sensor/data/Color.h.

References operator=().

+ Here is the call graph for this function:

Member Function Documentation

◆ MSGPACK_DEFINE_ARRAY()

carla::sensor::data::Color::MSGPACK_DEFINE_ARRAY ( r  ,
g  ,
b  ,
a   
)

◆ operator rpc::Color()

carla::sensor::data::Color::operator rpc::Color ( ) const
inline

Definition at line 37 of file sensor/data/Color.h.

References b, g, and r.

◆ operator rpc::FloatColor()

carla::sensor::data::Color::operator rpc::FloatColor ( ) const
inline

Definition at line 40 of file sensor/data/Color.h.

References a, b, g, and r.

◆ operator!=()

bool carla::sensor::data::Color::operator!= ( const Color rhs) const
inline

Definition at line 33 of file sensor/data/Color.h.

◆ operator=()

Color& carla::sensor::data::Color::operator= ( const Color )
default

Referenced by Color(), and carla::sensor::data::OpticalFlowPixel::OpticalFlowPixel().

+ Here is the caller graph for this function:

◆ operator==()

bool carla::sensor::data::Color::operator== ( const Color rhs) const
inline

Definition at line 29 of file sensor/data/Color.h.

References b, g, and r.

Member Data Documentation

◆ a

uint8_t carla::sensor::data::Color::a = 0u

◆ b

uint8_t carla::sensor::data::Color::b = 0u

◆ g

uint8_t carla::sensor::data::Color::g = 0u

◆ r

uint8_t carla::sensor::data::Color::r = 0u

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