ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvColor::RgbaTpl< Type > Class Template Reference

RGBA color structure. More...

#include <ecvColorTypes.h>

Public Member Functions

constexpr RgbaTpl ()
 Default constructor. More...
 
constexpr RgbaTpl (Type red, Type green, Type blue, Type alpha)
 Constructor from a triplet of r,g,b values and a transparency value. More...
 
constexpr RgbaTpl (const Type col[4])
 RgbaTpl from an array of 4 values. More...
 
constexpr RgbaTpl (const Type col[3], Type alpha)
 RgbaTpl from an array of 3 values and a transparency value. More...
 
constexpr RgbaTpl (const RgbTpl< Type > &c, Type alpha)
 Copy constructor. More...
 
constexpr operator RgbTpl< Type > () const
 Cast operator. More...
 
bool operator!= (const RgbaTpl< Type > &t) const
 Cast operator (const version) More...
 

Public Attributes

union {
   struct {
      Type   r
 
      Type   g
 
      Type   b
 
      Type   a
 
   } 
 
   Type   rgba [4]
 
}; 
 

Detailed Description

template<class Type>
class ecvColor::RgbaTpl< Type >

RGBA color structure.

Definition at line 145 of file ecvColorTypes.h.

Constructor & Destructor Documentation

◆ RgbaTpl() [1/5]

template<class Type >
constexpr ecvColor::RgbaTpl< Type >::RgbaTpl ( )
inlineconstexpr

Default constructor.

Inits color to (0,0,0,0).

Definition at line 158 of file ecvColorTypes.h.

◆ RgbaTpl() [2/5]

template<class Type >
constexpr ecvColor::RgbaTpl< Type >::RgbaTpl ( Type  red,
Type  green,
Type  blue,
Type  alpha 
)
inlineexplicitconstexpr

Constructor from a triplet of r,g,b values and a transparency value.

Definition at line 161 of file ecvColorTypes.h.

◆ RgbaTpl() [3/5]

template<class Type >
constexpr ecvColor::RgbaTpl< Type >::RgbaTpl ( const Type  col[4])
inlineexplicitconstexpr

RgbaTpl from an array of 4 values.

Definition at line 168 of file ecvColorTypes.h.

◆ RgbaTpl() [4/5]

template<class Type >
constexpr ecvColor::RgbaTpl< Type >::RgbaTpl ( const Type  col[3],
Type  alpha 
)
inlineexplicitconstexpr

RgbaTpl from an array of 3 values and a transparency value.

Definition at line 171 of file ecvColorTypes.h.

◆ RgbaTpl() [5/5]

template<class Type >
constexpr ecvColor::RgbaTpl< Type >::RgbaTpl ( const RgbTpl< Type > &  c,
Type  alpha 
)
inlineconstexpr

Copy constructor.

Definition at line 175 of file ecvColorTypes.h.

Member Function Documentation

◆ operator RgbTpl< Type >()

template<class Type >
constexpr ecvColor::RgbaTpl< Type >::operator RgbTpl< Type > ( ) const
inlineconstexpr

Cast operator.

Definition at line 179 of file ecvColorTypes.h.

References ecvColor::RgbaTpl< Type >::rgba.

◆ operator!=()

template<class Type >
bool ecvColor::RgbaTpl< Type >::operator!= ( const RgbaTpl< Type > &  t) const
inline

Cast operator (const version)

Comparison operator

Definition at line 186 of file ecvColorTypes.h.

References ecvColor::RgbaTpl< Type >::a, ecvColor::RgbaTpl< Type >::b, ecvColor::RgbaTpl< Type >::g, and ecvColor::RgbaTpl< Type >::r.

Member Data Documentation

◆ 

union { ... }

◆ a

template<class Type >
Type ecvColor::RgbaTpl< Type >::a

◆ b

template<class Type >
Type ecvColor::RgbaTpl< Type >::b

◆ g

template<class Type >
Type ecvColor::RgbaTpl< Type >::g

◆ r

template<class Type >
Type ecvColor::RgbaTpl< Type >::r

◆ rgba

template<class Type >
Type ecvColor::RgbaTpl< Type >::rgba[4]

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