Drake
Rgba Class Reference

Detailed Description

Defines RGBA (red, green, blue, alpha) values on the range [0, 1].

#include <drake/geometry/rgba.h>

Public Member Functions

 Rgba (double r, double g, double b, double a=1.)
 Constructs with given (r, g, b, a) values. More...
 
double r () const
 Red. More...
 
double g () const
 Green. More...
 
double b () const
 Blue. More...
 
double a () const
 Alpha. More...
 
void set (double r, double g, double b, double a=1.)
 Sets (r, g, b, a) values. More...
 
bool operator== (const Rgba &other) const
 
bool operator!= (const Rgba &other) const
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 Rgba (const Rgba &)=default
 
Rgbaoperator= (const Rgba &)=default
 
 Rgba (Rgba &&)=default
 
Rgbaoperator= (Rgba &&)=default
 

Constructor & Destructor Documentation

◆ Rgba() [1/3]

Rgba ( const Rgba )
default

◆ Rgba() [2/3]

Rgba ( Rgba &&  )
default

◆ Rgba() [3/3]

Rgba ( double  r,
double  g,
double  b,
double  a = 1. 
)

Constructs with given (r, g, b, a) values.

Precondition
All values are within the range of [0, 1].

Member Function Documentation

◆ a()

double a ( ) const

Alpha.

◆ b()

double b ( ) const

Blue.

◆ g()

double g ( ) const

Green.

◆ operator!=()

bool operator!= ( const Rgba other) const

◆ operator=() [1/2]

Rgba& operator= ( const Rgba )
default

◆ operator=() [2/2]

Rgba& operator= ( Rgba &&  )
default

◆ operator==()

bool operator== ( const Rgba other) const

◆ r()

double r ( ) const

Red.

◆ set()

void set ( double  r,
double  g,
double  b,
double  a = 1. 
)

Sets (r, g, b, a) values.

Precondition
All values are within the range of [0, 1]. The values are not updated if this precondition is not met.

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