cgv
|
minimal data interface for color used to implement conversion. More...
#include <color.h>
Public Types | |
typedef T | component_type |
type of color components | |
Public Member Functions | |
color_base () | |
standard constructor does not initialize components | |
template<typename T2 , ColorModel cm2, AlphaModel am2> | |
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 Public Attributes | |
static const unsigned int | nr_color_components = color_model_traits<cm>::nr_components |
static and const access to number of color components | |
static const unsigned int | nr_alpha_components = alpha_model_traits<am>::nr_components |
static and const access to number of alpha components | |
static const unsigned int | nr_components = nr_color_components + nr_alpha_components |
static and const access to total number of components | |
Protected Attributes | |
T | components [nr_components] |
minimal data interface for color used to implement conversion.
typedef T cgv::media::color_base< T, cm, am >::component_type |
|
inline |
|
inline |
|
inline |
return alpha component
Definition at line 73 of file color.h.
References cgv::media::color_base< T, cm, am >::nr_color_components.
|
inline |
return alpha component
Definition at line 75 of file color.h.
References cgv::media::color_base< T, cm, am >::nr_color_components.
|
inline |
access to components
Definition at line 69 of file color.h.
Referenced by cgv::media::rgb_color_interface< color< T, cm, am > >::B(), cgv::media::rgb_color_interface< color< T, cm, am > >::G(), cgv::media::hls_color_interface< color< T, cm, am > >::H(), cgv::media::hls_color_interface< color< T, cm, am > >::L(), cgv::media::rgb_color_interface< color< T, cm, am > >::R(), cgv::media::hls_color_interface< color< T, cm, am > >::S(), cgv::media::xyz_color_interface< color< T, cm, am > >::X(), cgv::media::xyz_color_interface< color< T, cm, am > >::Y(), and cgv::media::xyz_color_interface< color< T, cm, am > >::Z().
|
inline |
|
protected |
|
static |
|
static |
static and const access to number of color components
Definition at line 54 of file color.h.
Referenced by cgv::media::color_base< T, cm, am >::alpha(), and cgv::media::color_base< T, cm, am >::alpha().
|
static |