Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
astra_ros::Rgba Class Reference

A RGB color with alpha component. More...

#include <color.hpp>

Public Member Functions

 operator std_msgs::ColorRGBA () const noexcept
 
 Rgba ()
 
 Rgba (const float r, const float g, const float b, const float a)
 

Static Public Member Functions

static Rgba fromHsv (const Hsv &hsv)
 
static Rgba fromRgb (const Rgb &rgb)
 
static Rgba fromRgb (const Rgb &rgb, const float a)
 

Public Attributes

float a
 
float b
 
float g
 
float r
 

Static Public Attributes

static const Rgba BLACK
 
static const Rgba BLUE
 
static const Rgba GREEN
 
static const Rgba RED
 
static const Rgba TRANSPARENT
 
static const Rgba WHITE
 

Detailed Description

A RGB color with alpha component.

Definition at line 18 of file color.hpp.

Constructor & Destructor Documentation

◆ Rgba() [1/2]

Rgba::Rgba ( )

Create a fully transparent black color

Definition at line 150 of file color.cpp.

◆ Rgba() [2/2]

Rgba::Rgba ( const float  r,
const float  g,
const float  b,
const float  a 
)

Construct a Rgba

Parameters
rThe red component (0.0 .. 1.0)
gThe green component (0.0 .. 1.0)
bThe blue component (0.0 .. 1.0)
aThe alpha component (0.0 .. 1.0)

Definition at line 158 of file color.cpp.

Member Function Documentation

◆ fromHsv()

Rgba Rgba::fromHsv ( const Hsv hsv)
static

Definition at line 197 of file color.cpp.

◆ fromRgb() [1/2]

Rgba Rgba::fromRgb ( const Rgb rgb)
static

Definition at line 182 of file color.cpp.

◆ fromRgb() [2/2]

Rgba Rgba::fromRgb ( const Rgb rgb,
const float  a 
)
static

Definition at line 187 of file color.cpp.

◆ operator std_msgs::ColorRGBA()

Rgba::operator std_msgs::ColorRGBA ( ) const
noexcept

Definition at line 166 of file color.cpp.

Member Data Documentation

◆ a

float astra_ros::Rgba::a

Definition at line 43 of file color.hpp.

◆ b

float astra_ros::Rgba::b

Definition at line 41 of file color.hpp.

◆ BLACK

const Rgba Rgba::BLACK
static

Definition at line 49 of file color.hpp.

◆ BLUE

const Rgba Rgba::BLUE
static

Definition at line 47 of file color.hpp.

◆ g

float astra_ros::Rgba::g

Definition at line 39 of file color.hpp.

◆ GREEN

const Rgba Rgba::GREEN
static

Definition at line 46 of file color.hpp.

◆ r

float astra_ros::Rgba::r

Definition at line 37 of file color.hpp.

◆ RED

const Rgba Rgba::RED
static

Definition at line 45 of file color.hpp.

◆ TRANSPARENT

const Rgba astra_ros::Rgba::TRANSPARENT
static

Definition at line 50 of file color.hpp.

◆ WHITE

const Rgba Rgba::WHITE
static

Definition at line 48 of file color.hpp.


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


astra_ros
Author(s): Braden McDorman
autogenerated on Wed Mar 2 2022 00:53:06