29 m_r += _src.m_r * _refl.m_r;
30 m_g += _src.m_g * _refl.m_g;
31 m_b += _src.m_b * _refl.m_b;
32 m_a += _src.m_a * _refl.m_a;
38 return Colour( m_r + _c.m_r,
47 return Colour( m_r - _c.m_r,
106 m_r<_min ? m_r = _min : m_r;
107 m_r>_max ? m_r = _max : m_r;
109 m_g<_min ? m_g = _min : m_g;
110 m_g>_max ? m_g = _max : m_g;
112 m_b<_min ? m_b = _min : m_b;
113 m_b>_max ? m_b = _max : m_b;
115 m_a<_min ? m_a = _min : m_a;
116 m_a>_max ? m_a = _max : m_a;
simple class to hold colour information and set the basic opengl colour state. also has overloaded me...
Real m_r
red component of the colour tuple
a simple colour class for RGBA colour
implementation files for RibExport class
PRECISION Real
create a variable called Real which is the main data type we use (GLfloat for most cases) ...
Colour operator*(const Colour &_c) const noexcept
operator to multiply colours
const Colour & operator+=(const Colour &_c) noexcept
operator to add rhs to current colour
const Colour & operator*=(const Colour &_c) noexcept
operator to multiply = by a colour
void clamp(Real _min, Real _max) noexcept
clamp the colour to the given range from Eduard Zell MSc 2010 the input values >0 < 1...
void add(const Colour &_src, const Colour &_refl) noexcept
Colour operator-(const Colour &_c) const noexcept
operator to subtract colours
Colour operator+(const Colour &_c) const noexcept
operator to add two colours