#include <color4.h>
Public Types | |
enum | ColorConstant { Black = 0xff000000, Gray = 0xff808080, White = 0xffffffff, Red = 0xff0000ff, Green = 0xff00ff00, Blue = 0xffff0000, Cyan = 0xffffff00, Yellow = 0xff00ffff, Magenta = 0xffff00ff, LightGray = 0xffc0c0c0, LightRed = 0xff8080ff, LightGreen = 0xff80ff80, LightBlue = 0xffff8080, DarkGray = 0xff404040, DarkRed = 0xff000040, DarkGreen = 0xff004000, DarkBlue = 0xff400000 } |
Public Member Functions | |
template<> | |
Color4 (Color4< float >::ColorConstant cc) | |
template<> | |
Color4 (Color4< unsigned char >::ColorConstant cc) | |
Color4 (ColorConstant cc) | |
Color4 () | |
Color4 (const Point4< T > &c) | |
Color4 (const T nx, const T ny, const T nz, const T nw) | |
void | ColorRamp (const float &minf, const float &maxf, float v) |
given a float and a range set the corresponding color in the well known red->green->blue color ramp. To reverse the direction of the ramp just swap minf and maxf. | |
template<> | |
Color4< float > | Construct (const Color4< unsigned char > &b) |
template<> | |
Color4< unsigned char > | Construct (const Color4< float > &b) |
template<> | |
void | Import (const Point4< float > &b) |
template<> | |
void | Import (const Color4< float > &b) |
template<> | |
void | Import (const Color4< unsigned char > &b) |
template<class Q > | |
void | Import (const Point4< Q > &b) |
importer from different Point4 types | |
template<class Q > | |
void | Import (const Color4< Q > &b) |
void | lerp (const Color4 &c0, const Color4 &c1, const Color4 &c2, const Point3f &ip) |
void | lerp (const Color4 &c0, const Color4 &c1, const float x) |
template<> | |
Color4< unsigned char > | operator+ (const Color4< unsigned char > &p) const |
Color4 | operator+ (const Color4 &p) const |
void | SetGrayShade (float f) |
void | SetHSVColor (float h, float s, float v) |
void | SetRGB (unsigned char r, unsigned char g, unsigned char b) |
Static Public Member Functions | |
template<class Q > | |
static Color4 | Construct (const Color4< Q > &b) |
static Color4 | GrayShade (float f) |
static Color4 | Scatter (int n, int a, float Sat=.3f, float Val=.9f) |
Private Types | |
typedef Point4< T > | Base |
The templated class for representing 4 entity color. The class is templated over the ScalarType. class that is used to represent color with float or with unsigned chars. All the usual operator overloading (* + - ...) is present.
Definition at line 90 of file color4.h.
typedef Point4<T> vcg::Color4< T >::Base [private] |
enum vcg::Color4::ColorConstant |
vcg::Color4< T >::Color4 | ( | const Point4< T > & | c | ) | [inline] |
vcg::Color4< T >::Color4 | ( | ) | [inline] |
vcg::Color4< T >::Color4 | ( | ColorConstant | cc | ) | [inline] |
vcg::Color4< unsigned char >::Color4 | ( | Color4< unsigned char >::ColorConstant | cc | ) | [inline] |
vcg::Color4< float >::Color4 | ( | Color4< float >::ColorConstant | cc | ) | [inline] |
Color4< float > vcg::Color4< float >::Construct | ( | const Color4< unsigned char > & | b | ) | [inline] |
Color4< unsigned char > vcg::Color4< unsigned char >::Construct | ( | const Color4< float > & | b | ) | [inline] |
static Color4 vcg::Color4< T >::Construct | ( | const Color4< Q > & | b | ) | [inline, static] |
static Color4 vcg::Color4< T >::GrayShade | ( | float | f | ) | [inline, static] |
void vcg::Color4< unsigned char >::Import | ( | const Point4< float > & | b | ) | [inline] |
void vcg::Color4< unsigned char >::Import | ( | const Color4< float > & | b | ) | [inline] |
void vcg::Color4< float >::Import | ( | const Color4< unsigned char > & | b | ) | [inline] |
void vcg::Color4< T >::Import | ( | const Point4< Q > & | b | ) | [inline] |
importer from different Point4 types
Reimplemented from vcg::Point4< T >.
void vcg::Color4< T >::Import | ( | const Color4< Q > & | b | ) | [inline] |
Color4< unsigned char > vcg::Color4< unsigned char >::operator+ | ( | const Color4< unsigned char > & | p | ) | const [inline] |
Color4 vcg::Color4< T >::operator+ | ( | const Color4< T > & | p | ) | const [inline] |
static Color4 vcg::Color4< T >::Scatter | ( | int | n, | |
int | a, | |||
float | Sat = .3f , |
|||
float | Val = .9f | |||
) | [inline, static] |
void vcg::Color4< T >::SetGrayShade | ( | float | f | ) | [inline] |
void vcg::Color4< T >::SetHSVColor | ( | float | h, | |
float | s, | |||
float | v | |||
) | [inline] |
void vcg::Color4< T >::SetRGB | ( | unsigned char | r, | |
unsigned char | g, | |||
unsigned char | b | |||
) | [inline] |