Color_tpl

C++
template <class T>
struct Color_tpl {
  T r, g, b, a;
};
File

Cry_Color.h

Description

RGBA Color structure.

Color_tpl::a Data Member
C++
T a;
Color_tpl::b Data Member
C++
T b;
Color_tpl::g Data Member
C++
T g;
Color_tpl::r Data Member
C++
T r;
Color_tpl::- Operator ()
C++
Color_tpl operator -() const;
Color_tpl::- Operator (Color_tpl &)
C++
Color_tpl operator -(const Color_tpl & v) const;
Color_tpl::!= Operator
C++
bool operator !=(const Color_tpl & v) const;
Color_tpl::* Operator (Color_tpl &)
C++
Color_tpl operator *(const Color_tpl & v) const;
Color_tpl::* Operator (T)
C++
Color_tpl operator *(T s) const;
Color_tpl::* Operator (T, Color_tpl &)
C++
template <class T> Color_tpl operator *(T s, const Color_tpl & v);
Color_tpl::*= Operator (Color_tpl &)
C++
Color_tpl & operator *=(const Color_tpl & v);
Color_tpl::*= Operator (T)
C++
Color_tpl & operator *=(T s);
Color_tpl::/ Operator (Color_tpl &)
C++
Color_tpl operator /(const Color_tpl & v) const;
Color_tpl::/ Operator (T)
C++
Color_tpl operator /(T s) const;
Color_tpl::/= Operator (Color_tpl &)
C++
Color_tpl & operator /=(const Color_tpl & v);
Color_tpl::/= Operator (T)
C++
Color_tpl & operator /=(T s);
Color_tpl::[] Operator (int)
C++
T & operator [](int index);
Color_tpl::[] Operator (int)
C++
T operator [](int index) const;
Color_tpl::+ Operator ()
C++
Color_tpl operator +() const;
Color_tpl::+ Operator (Color_tpl &)
C++
Color_tpl operator +(const Color_tpl & v) const;
Color_tpl::+= Operator
C++
Color_tpl & operator +=(const Color_tpl & v);
Color_tpl::= Operator (Color_tpl &)
C++
Color_tpl& operator =(const Color_tpl & c);
Color_tpl::= Operator (Vec3 &)
C++
Color_tpl& operator =(const Vec3 & v);
Color_tpl::-= Operator
C++
Color_tpl & operator -=(const Color_tpl & v);
Color_tpl::== Operator
C++
bool operator ==(const Color_tpl & v) const;
Color_tpl::abs Method
C++
inline void abs();
Color_tpl::adjust_contrast Method
C++
inline void adjust_contrast(T c);
Color_tpl::adjust_saturation Method
C++
inline void adjust_saturation(T s);
Color_tpl::clamp Method
C++
inline void clamp(T bottom = 0.0f, T top = 1.0f);
Color_tpl::Clamp Method
C++
void Clamp(float Min = 0, float Max = 1.0f);
Color_tpl::Color_tpl Constructor ()
C++
Color_tpl();
Color_tpl::Color_tpl Constructor (ColorF&)
C++
Color_tpl(const ColorF& c);
Color_tpl::Color_tpl Constructor (ColorF&, float)
C++
Color_tpl(const ColorF& c, float fAlpha);
Color_tpl::Color_tpl Constructor (T, T, T)
C++
Color_tpl(T _x, T _y, T _z);
Color_tpl::Color_tpl Constructor (T, T, T, T)
C++
Color_tpl(T _x, T _y, T _z, T _w);
Color_tpl::Color_tpl Constructor (Vec3 &)
C++
Color_tpl(const Vec3 & vVec);
Color_tpl::Color_tpl Constructor (Vec3&, float)
C++
Color_tpl(const Vec3& c, float fAlpha);
Color_tpl::Color_tpl Constructor (f32)
C++
Color_tpl(const f32 c);
Color_tpl::Color_tpl Constructor (unsigned int)
C++
Color_tpl(const unsigned int abgr);
Description

works together with pack_abgr8888

Color_tpl::Color_tpl::Color_tpl Method (ColorF&)
C++
template <> Color_tpl::Color_tpl(const ColorF& c);
Color_tpl::Color_tpl::Color_tpl Method (ColorF&, float)
C++
template <> Color_tpl::Color_tpl(const ColorF& c, float fAlpha);
Color_tpl::Color_tpl::Color_tpl Method (Vec3&, float)
C++
template <> Color_tpl::Color_tpl(const Vec3& c, float fAlpha);
Color_tpl::Color_tpl::Color_tpl Method (f32, f32, f32)
C++
template <> Color_tpl::Color_tpl(f32 _x, f32 _y, f32 _z);
Color_tpl::Color_tpl::Color_tpl Method (f32, f32, f32, f32)
C++
template <> Color_tpl::Color_tpl(f32 _x, f32 _y, f32 _z, f32 _w);
Description

template specialization

Color_tpl::Color_tpl::Color_tpl Method (float)
C++
template <> Color_tpl::Color_tpl(const float c);
Color_tpl::Color_tpl::Color_tpl Method (unsigned int)
C++
template <> Color_tpl::Color_tpl(const unsigned int abgr);
Color_tpl::Color_tpl::abs Method
C++
template <class T> inline void Color_tpl::abs();
Color_tpl::Color_tpl::adjust_contrast Method
C++
template <class T> inline void Color_tpl::adjust_contrast(T c);
Color_tpl::Color_tpl::adjust_saturation Method
C++
template <class T> inline void Color_tpl::adjust_saturation(T s);
Color_tpl::Color_tpl::clamp Method
C++
template <class T> inline void Color_tpl::clamp(T bottom, T top);
Color_tpl::Color_tpl::fromHSV Method
C++
template <class T> inline void Color_tpl::fromHSV(f32 h, f32 s, f32 v);
Color_tpl::Color_tpl::grey Method
C++
template <class T> inline void Color_tpl::grey(const Color_tpl & c);
Color_tpl::Color_tpl::lerpFloat Method
C++
template <class T> inline void Color_tpl::lerpFloat(const Color_tpl & ca, const Color_tpl & cb, float s);
Color_tpl::Color_tpl::maximum Method
C++
template <class T> inline void Color_tpl::maximum(const Color_tpl & ca, const Color_tpl & cb);
Color_tpl::Color_tpl::minimum Method
C++
template <class T> inline void Color_tpl::minimum(const Color_tpl & ca, const Color_tpl & cb);
Color_tpl::Color_tpl::negative Method
C++
template <class T> inline void Color_tpl::negative(const Color_tpl & c);
Color_tpl::Color_tpl::pack_abgr8888 Method
C++
template <class T> unsigned int Color_tpl::pack_abgr8888() const;
Color_tpl::Color_tpl::pack_argb4444 Method
C++
template <class T> unsigned short Color_tpl::pack_argb4444() const;
Color_tpl::Color_tpl::pack_argb8888 Method
C++
template <class T> unsigned int Color_tpl::pack_argb8888() const;
Color_tpl::Color_tpl::pack_bgr888 Method
C++
template <class T> unsigned int Color_tpl::pack_bgr888() const;
Color_tpl::Color_tpl::pack_rgb332 Method
C++
template <class T> unsigned char Color_tpl::pack_rgb332() const;
Color_tpl::Color_tpl::pack_rgb555 Method
C++
template <class T> unsigned short Color_tpl::pack_rgb555() const;
Color_tpl::Color_tpl::pack_rgb565 Method
C++
template <class T> unsigned short Color_tpl::pack_rgb565() const;
Color_tpl::Color_tpl::pack_rgb888 Method
C++
template <class T> unsigned int Color_tpl::pack_rgb888() const;
Color_tpl::Color_tpl::toHSV Method
C++
template <class T> inline void Color_tpl::toHSV(f32 & h, f32 & s, f32& v) const;
Color_tpl::Color_tpl::Color_tpl Method (ColorF&)
C++
template <> Color_tpl::Color_tpl(const ColorF& c);
Color_tpl::Color_tpl::Color_tpl Method (ColorF&, float)
C++
template <> Color_tpl::Color_tpl(const ColorF& c, float fAlpha);
Color_tpl::Color_tpl::Color_tpl Method (Vec3&, float)
C++
template <> Color_tpl::Color_tpl(const Vec3& c, float fAlpha);
Color_tpl::Color_tpl::Color_tpl Method (float)
C++
template <> Color_tpl::Color_tpl(const float c);
Color_tpl::Color_tpl::Color_tpl Method (uint8, uint8, uint8)
C++
template <> Color_tpl::Color_tpl(uint8 _x, uint8 _y, uint8 _z);
Color_tpl::Color_tpl::Color_tpl Method (uint8, uint8, uint8, uint8)
C++
template <> Color_tpl::Color_tpl(uint8 _x, uint8 _y, uint8 _z, uint8 _w);
Color_tpl::Color_tpl::Color_tpl Method (unsigned int)
C++
template <> Color_tpl::Color_tpl(const unsigned int c);
Description

use this with RGBA8 macro!

Color_tpl::ComputeAvgCol_Fast Method
C++
static inline uint32 ComputeAvgCol_Fast(const uint32 dwCol0, const uint32 dwCol1);
Description

helper function - maybe we can improve the integration

Color_tpl::fromHSV Method
C++
inline void fromHSV(f32 h, f32 s, f32 v);
Color_tpl::GetMemoryUsage Method
C++
void GetMemoryUsage(class ICrySizer * pSizer) const;
Color_tpl::grey Method
C++
inline void grey(const Color_tpl & c);
Color_tpl::lerpFloat Method
C++
inline void lerpFloat(const Color_tpl & ca, const Color_tpl & cb, float s);
Color_tpl::Luminance Method
C++
float Luminance() const;
Color_tpl::Max Method
C++
float Max() const;
Color_tpl::maximum Method
C++
inline void maximum(const Color_tpl & ca, const Color_tpl & cb);
Color_tpl::mCIE2RGB Method
C++
Color_tpl mCIE2RGB() const;
Description

mCIE: adjusted to compensate problems of DXT compression (extra bit in green channel causes green/purple artefacts) explained in CryEngine wiki: ColorSpaces

Color_tpl::minimum Method
C++
inline void minimum(const Color_tpl & ca, const Color_tpl & cb);
Color_tpl::negative Method
C++
inline void negative(const Color_tpl & c);
Color_tpl::NormalizeCol Method
C++
float NormalizeCol(ColorF& out) const;
Color_tpl::pack_abgr8888 Method
C++
unsigned int pack_abgr8888() const;
Color_tpl::pack_argb4444 Method
C++
unsigned short pack_argb4444() const;
Color_tpl::pack_argb8888 Method
C++
unsigned int pack_argb8888() const;
Color_tpl::pack_bgr888 Method
C++
unsigned int pack_bgr888() const;
Color_tpl::pack_rgb332 Method
C++
unsigned char pack_rgb332() const;
Color_tpl::pack_rgb555 Method
C++
unsigned short pack_rgb555() const;
Color_tpl::pack_rgb565 Method
C++
unsigned short pack_rgb565() const;
Color_tpl::pack_rgb888 Method
C++
unsigned int pack_rgb888() const;
Color_tpl::RGB2mCIE Method
C++
Color_tpl RGB2mCIE() const;
Description

mCIE: adjusted to compensate problems of DXT compression (extra bit in green channel causes green/purple artifacts) explained in CryEngine wiki: ColorSpaces

Color_tpl::rgb2srgb Method
C++
void rgb2srgb();
Color_tpl::ScaleCol Method
C++
void ScaleCol(float f);
Color_tpl::set Method (T, T, T)
C++
void set(T _x, T _y = 0, T _z = 0);
Color_tpl::set Method (T, T, T, T)
C++
void set(T _x, T _y = 0, T _z = 0, T _w = 0);
Color_tpl::Set Method
C++
void Set(float fR, float fG, float fB, float fA = 1.0f);
Color_tpl::srgb2rgb Method
C++
void srgb2rgb();
Color_tpl::toHSV Method
C++
inline void toHSV(f32 & h, f32 & s, f32& v) const;
Color_tpl::toVec3 Method
C++
inline Vec3 toVec3() const;
Color_tpl::toVec4 Method
C++
inline Vec4 toVec4() const;