Cry_Color.h
RGBA Color structure.
T a;
T b;
T g;
T r;
Color_tpl operator -() const;
bool operator !=(const Color_tpl & v) const;
Color_tpl operator *(T s) const;
Color_tpl & operator *=(T s);
Color_tpl operator /(T s) const;
Color_tpl & operator /=(T s);
T & operator [](int index);
T operator [](int index) const;
Color_tpl operator +() const;
Color_tpl& operator =(const Vec3 & v);
bool operator ==(const Color_tpl & v) const;
inline void abs();
inline void adjust_contrast(T c);
inline void adjust_saturation(T s);
inline void clamp(T bottom = 0.0f, T top = 1.0f);
void Clamp(float Min = 0, float Max = 1.0f);
Color_tpl();
Color_tpl(const ColorF& c);
Color_tpl(const ColorF& c, float fAlpha);
Color_tpl(T _x, T _y, T _z);
Color_tpl(T _x, T _y, T _z, T _w);
Color_tpl(const Vec3 & vVec);
Color_tpl(const Vec3& c, float fAlpha);
Color_tpl(const f32 c);
Color_tpl(const unsigned int abgr);
works together with pack_abgr8888
template specialization
template <class T> inline void Color_tpl::adjust_contrast (T c);
template <class T> inline void Color_tpl::adjust_saturation (T s);
template <class T> unsigned int Color_tpl::pack_abgr8888 () const;
template <class T> unsigned short Color_tpl::pack_argb4444 () const;
template <class T> unsigned int Color_tpl::pack_argb8888 () const;
template <class T> unsigned int Color_tpl::pack_bgr888 () const;
template <class T> unsigned char Color_tpl::pack_rgb332 () const;
template <class T> unsigned short Color_tpl::pack_rgb555 () const;
template <class T> unsigned short Color_tpl::pack_rgb565 () const;
template <class T> unsigned int Color_tpl::pack_rgb888 () const;
use this with RGBA8 macro!
static inline uint32 ComputeAvgCol_Fast(const uint32 dwCol0, const uint32 dwCol1);
helper function - maybe we can improve the integration
inline void fromHSV(f32 h, f32 s, f32 v);
void GetMemoryUsage(class ICrySizer * pSizer) const;
inline void grey(const Color_tpl& c);
float Luminance() const;
float Max() const;
Color_tplmCIE2RGB() const;
mCIE: adjusted to compensate problems of DXT compression (extra bit in green channel causes green/purple artefacts) explained in CryEngine wiki: ColorSpaces
inline void negative(const Color_tpl& c);
float NormalizeCol(ColorF& out) const;
unsigned int pack_abgr8888() const;
unsigned short pack_argb4444() const;
unsigned int pack_argb8888() const;
unsigned int pack_bgr888() const;
unsigned char pack_rgb332() const;
unsigned short pack_rgb555() const;
unsigned short pack_rgb565() const;
unsigned int pack_rgb888() const;
Color_tplRGB2mCIE() const;
mCIE: adjusted to compensate problems of DXT compression (extra bit in green channel causes green/purple artifacts) explained in CryEngine wiki: ColorSpaces
void rgb2srgb();
void ScaleCol(float f);
void set(T _x, T _y = 0, T _z = 0);
void set(T _x, T _y = 0, T _z = 0, T _w = 0);
void Set(float fR, float fG, float fB, float fA = 1.0f);
void srgb2rgb();
inline void toHSV(f32 & h, f32 & s, f32& v) const;
inline Vec3 toVec3() const;
inline Vec4 toVec4() const;