represent a color with components of given type and color and alpha model as specified.
More...
|
| color () |
| standard constructor does not initialize components
|
|
| color (const T &c) |
| set all components to given value
|
|
| color (const T &c0, const T &c1) |
| set first two components to given values
|
|
| color (const T &c0, const T &c1, const T &c2) |
| set first three components to given values
|
|
| color (const T &c0, const T &c1, const T &c2, const T &c3) |
| set all four components to given values
|
|
| color (const color< T, cm > &c, T a) |
| construct from non-alpha color plus alpha
|
|
template<typename T2 , ColorModel cm2, AlphaModel am2> |
| color (const color< T2, cm2, am2 > &c2) |
| copy constructor uses color conversion if necessary
|
|
template<typename T2 , ColorModel cm2, AlphaModel am2> |
color< T, cm, am > & | operator= (const color< T2, cm2, am2 > &c2) |
| assign to color with potential color conversion
|
|
color< T, cm, am > & | operator= (const T &c) |
| assign all components including alpha to c
|
|
color< T, cm > & | drop_alpha () |
| drop the alpha component if any by a cast operator
|
|
const color< T, cm > & | drop_alpha () const |
|
template<typename T2 , ColorModel cm2, AlphaModel am2> |
color< T, cm, am > & | operator*= (const color< T2, cm2, am2 > &c2) |
| multiply with color
|
|
template<typename T2 , ColorModel cm2, AlphaModel am2> |
color< T, cm, am > | operator* (const color< T2, cm2, am2 > &c2) |
| post multiply with color
|
|
color< T, cm, am > & | operator*= (const T &c) |
| multiply with constant
|
|
template<typename T2 > |
color< typename type::func::promote< T, T2 >::type, cm, am > | operator* (const T2 &c) const |
| post multiply with constant
|
|
template<typename T2 , ColorModel cm2, AlphaModel am2> |
color< T, cm, am > & | operator+= (const color< T2, cm2, am2 > &c2) |
| add color
|
|
template<typename T2 , ColorModel cm2, AlphaModel am2> |
color< T, cm, am > | operator+ (const color< T2, cm2, am2 > &c2) |
| add color
|
|
color< T, cm, am > & | operator+= (const T &c) |
| add constant
|
|
color< T, cm, am > | operator+ (const T &c) |
| add constant
|
|
template<typename T2 , ColorModel cm2, AlphaModel am2> |
color< T, cm, am > & | operator-= (const color< T2, cm2, am2 > &c2) |
| subtract color
|
|
template<typename T2 , ColorModel cm2, AlphaModel am2> |
color< T, cm, am > | operator- (const color< T2, cm2, am2 > &c2) |
| subtract color
|
|
color< T, cm, am > & | operator-= (const T &c) |
| subtract constant
|
|
color< T, cm, am > | operator- (const T &c) |
| subtract constant
|
|
void | clamp (const T &mn=0, const T &mx=color_one< T >::value(), bool skip_alpha=false) |
| clamp to the given range, which defaults to [0,1] of the component type
|
|
T & | operator[] (unsigned int i) |
| access to components
|
|
const T & | operator[] (unsigned int i) const |
| const access to components
|
|
T | extinction () const |
| convert alpha to extinction
|
|
T | transparency () const |
| convert alpha to transparency
|
|
T | opacity () const |
| convert alpha to opacity
|
|
T | X () const |
| convert color to XYZ and return X component
|
|
T | Y () const |
| convert color to XYZ and return Y component
|
|
T | Z () const |
| convert color to XYZ and return Z component
|
|
T | H () const |
| convert color to HLS and return H component
|
|
T | L () const |
| convert color to HLS and return L component
|
|
T | S () const |
| convert color to HLS and return S component
|
|
T | R () const |
| convert color to RGB and return R component
|
|
T | G () const |
| convert color to RGB and return G component
|
|
T | B () const |
| convert color to RGB and return B component
|
|
| color_base () |
| standard constructor does not initialize components
|
|
| color_base (const color_base< T2, cm2, am2 > &c2) |
| copy constructor uses color conversion if necessary
|
|
T & | at (unsigned int i) |
| access to components
|
|
const T & | at (unsigned int i) const |
| const access to components
|
|
T & | alpha () |
| return alpha component
|
|
const T & | alpha () const |
| return alpha component
|
|
|
static const ColorModel | clr_mod = cm |
| static and const access to color model
|
|
static const AlphaModel | alp_mod = am |
| static and const access to alpha model
|
|
static const unsigned int | nr_color_components = color_base<T,cm,am>::nr_color_components |
| static and const access to number of color components
|
|
static const unsigned int | nr_alpha_components = color_base<T, cm, am>::nr_alpha_components |
| static and const access to number of alpha components
|
|
static const unsigned int | nr_components = color_base<T, cm, am>::nr_components |
| static and const access to total number of components
|
|
static const unsigned int | nr_color_components |
| static and const access to number of color components
|
|
static const unsigned int | nr_alpha_components |
| static and const access to number of alpha components
|
|
static const unsigned int | nr_components |
| static and const access to total number of components
|
|
template<typename T, ColorModel cm, AlphaModel am>
class cgv::media::color< T, cm, am >
represent a color with components of given type and color and alpha model as specified.
Definition at line 573 of file color.h.