#include <Color.h>
Public Member Functions | |
| Color (void) | |
| ~Color (void) | |
| Color (const Color &rhs) | |
| Color & | operator= (const Color &rhs) |
| Color (unsigned r, unsigned g, unsigned b) | |
| Color (unsigned a, unsigned r, unsigned g, unsigned b) | |
| Color (float r, float g, float b) | |
| Color (float a, float r, float g, float b) | |
| Color (const D3DCOLOR d3d_color) | |
| Color & | operator= (const D3DCOLOR d3d_color) |
| unsigned | GetR () const |
| unsigned | GetG () const |
| unsigned | GetB () const |
| unsigned | GetA () const |
| float | GetRf () const |
| float | GetGf () const |
| float | GetBf () const |
| float | GetAf () const |
| void | SetRf (float r) |
| void | SetGf (float g) |
| void | SetBf (float b) |
| void | SetAf (float a) |
| void | SetR (unsigned r) |
| void | SetG (unsigned g) |
| void | SetB (unsigned b) |
| void | SetA (unsigned a) |
| Color | MixWith (const Color &color) const |
| operator const D3DCOLOR & () const | |
| operator D3DCOLOR & () | |
Utility class to transform and mix colors. You may use an instance of this class in your vertex structures instead using of D3DCOLOR (or DWORD).
| xl7::direct3d::colors::Color::Color | ( | void | ) |
Default constructor.
| xl7::direct3d::colors::Color::~Color | ( | void | ) |
Destructor.
| xl7::direct3d::colors::Color::Color | ( | const Color & | rhs | ) |
Copy constructor.
| xl7::direct3d::colors::Color::Color | ( | unsigned | r, | |
| unsigned | g, | |||
| unsigned | b | |||
| ) |
Explicit constructor.
| xl7::direct3d::colors::Color::Color | ( | unsigned | a, | |
| unsigned | r, | |||
| unsigned | g, | |||
| unsigned | b | |||
| ) |
Explicit constructor.
| xl7::direct3d::colors::Color::Color | ( | float | r, | |
| float | g, | |||
| float | b | |||
| ) |
Explicit constructor.
| xl7::direct3d::colors::Color::Color | ( | float | a, | |
| float | r, | |||
| float | g, | |||
| float | b | |||
| ) |
Explicit constructor.
| xl7::direct3d::colors::Color::Color | ( | const D3DCOLOR | d3d_color | ) |
A copy-constructor-like constructor.
A copy-constructor-like explicit constructor.
| unsigned xl7::direct3d::colors::Color::GetA | ( | ) | const |
Extracts the alpha channel.
| float xl7::direct3d::colors::Color::GetAf | ( | ) | const |
Extracts the alpha channel.
| unsigned xl7::direct3d::colors::Color::GetB | ( | ) | const |
Extracts the blue component.
| float xl7::direct3d::colors::Color::GetBf | ( | ) | const |
Extracts the blue component.
| unsigned xl7::direct3d::colors::Color::GetG | ( | ) | const |
Extracts the green component.
| float xl7::direct3d::colors::Color::GetGf | ( | ) | const |
Extracts the green component.
| unsigned xl7::direct3d::colors::Color::GetR | ( | ) | const |
Extracts the red component.
| float xl7::direct3d::colors::Color::GetRf | ( | ) | const |
Extracts the red component.
Returns this color mixed up with another one.
| xl7::direct3d::colors::Color::operator const D3DCOLOR & | ( | ) | const [inline] |
| xl7::direct3d::colors::Color::operator D3DCOLOR & | ( | ) | [inline] |
| Color & xl7::direct3d::colors::Color::operator= | ( | const D3DCOLOR | d3d_color | ) |
A copy-assignment-operator-like assignment operator.
| void xl7::direct3d::colors::Color::SetA | ( | unsigned | a | ) |
Sets the alpha channel.
| void xl7::direct3d::colors::Color::SetAf | ( | float | a | ) |
Sets the alpha channel.
| void xl7::direct3d::colors::Color::SetB | ( | unsigned | b | ) |
Sets the blue component.
| void xl7::direct3d::colors::Color::SetBf | ( | float | b | ) |
Sets the blue component.
| void xl7::direct3d::colors::Color::SetG | ( | unsigned | g | ) |
Sets the green component.
| void xl7::direct3d::colors::Color::SetGf | ( | float | g | ) |
Sets the green component.
| void xl7::direct3d::colors::Color::SetR | ( | unsigned | r | ) |
Sets the red component.
| void xl7::direct3d::colors::Color::SetRf | ( | float | r | ) |
Sets the red component.
1.6.1