#include <spMaterialColor.hpp>
Public Member Functions | |
color () | |
color (u8 Brightness) | |
color (u8 R, u8 G, u8 B, u8 A=255) | |
color (const color &other) | |
color (const color &other, u8 A) | |
color (const dim::vector3df &Color, bool Adjust=true) | |
color (const dim::vector4df &Color, bool Adjust=true) | |
~color () | |
bool | operator== (const color &other) const |
bool | operator!= (const color &other) const |
color | operator+ (const color &other) const |
color & | operator+= (const color &other) |
color | operator- (const color &other) const |
color & | operator-= (const color &other) |
color | operator/ (const color &other) const |
color & | operator/= (const color &other) |
color | operator/ (u8 Factor) const |
color & | operator/= (u8 Factor) |
color | operator* (const color &other) const |
color & | operator*= (const color &other) |
color | operator* (u8 Factor) const |
color & | operator*= (u8 Factor) |
color | operator* (f32 Factor) const |
color & | operator*= (f32 Factor) |
const u8 | operator[] (s32 i) const |
u8 & | operator[] (s32 i) |
color | getInverse () const |
color & | setInverse () |
color | getInverse (bool isRedInverse, bool isGreenInverse, bool isBlueInverse, bool isAlphaInverse=false) const |
color & | setInverse (bool isRedInverse, bool isGreenInverse, bool isBlueInverse, bool isAlphaInverse=false) |
void | setFloatArray (const f32 *ColorArray) |
void | getFloatArray (f32 *ColorArray) const |
void | setIntensity (const color &other) |
color | getIntensity (const color &other) const |
void | setIntensity (f32 Intensity) |
color | getIntensity (f32 Intensity) const |
void | set (u8 R, u8 G, u8 B, u8 A) |
u32 | getSingle () const |
void | setSingle (u32 Color) |
bool | equal (const color &other, bool isIncludingAlpha=true) const |
bool | gray () const |
Returns true if the color is gray scaled, i.e. all color components (red, green and blue) are equal. | |
dim::vector3df | getVector (bool Adjust=false) const |
template<typename T > | |
T | getBrightness () const |
Static Public Member Functions | |
static color | fromName (io::stringc Name) |
Public Attributes | |
u8 | Red |
u8 | Green |
u8 | Blue |
u8 | Alpha |
Static Public Attributes | |
static const color | empty |
color(0, 0, 0, 0). | |
static const color | red |
color(255, 0, 0, 255). | |
static const color | green |
color(0, 255, 0, 255). | |
static const color | blue |
color(0, 0, 255, 255). | |
static const color | yellow |
color(255, 255, 0, 255). | |
static const color | pink |
color(255, 0, 255, 255). | |
static const color | black |
color(0, 0, 0, 255). | |
static const color | white |
color(255, 255, 255, 255). |
sp::video::color::color | ( | ) | [inline] |
sp::video::color::color | ( | u8 | Brightness | ) | [inline] |
sp::video::color::color | ( | const color & | other | ) | [inline] |
sp::video::color::color | ( | const dim::vector3df & | Color, | |
bool | Adjust = true | |||
) | [inline] |
sp::video::color::color | ( | const dim::vector4df & | Color, | |
bool | Adjust = true | |||
) | [inline] |
sp::video::color::~color | ( | ) | [inline] |
bool sp::video::color::equal | ( | const color & | other, | |
bool | isIncludingAlpha = true | |||
) | const [inline] |
static color sp::video::color::fromName | ( | io::stringc | Name | ) | [inline, static] |
Returns a color derived from the given name.
[in] | Name | Specifies the color name. Valid values are:
|
T sp::video::color::getBrightness | ( | ) | const [inline] |
void sp::video::color::getFloatArray | ( | f32 * | ColorArray | ) | const [inline] |
Stores the color data into the given float array.
[out] | ColorArray | Pointer to the float array where the color data is to be stored. This must have at least 4 elements! The components are then in the range [0.0 .. 1.0].
f32 ColorArray[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; MyColor.getFloatArray(ColorArray); |
color sp::video::color::getInverse | ( | bool | isRedInverse, | |
bool | isGreenInverse, | |||
bool | isBlueInverse, | |||
bool | isAlphaInverse = false | |||
) | const [inline] |
color sp::video::color::getInverse | ( | ) | const [inline] |
u32 sp::video::color::getSingle | ( | ) | const [inline] |
dim::vector3df sp::video::color::getVector | ( | bool | Adjust = false |
) | const [inline] |
bool sp::video::color::gray | ( | ) | const [inline] |
Returns true if the color is gray scaled, i.e. all color components (red, green and blue) are equal.
bool sp::video::color::operator!= | ( | const color & | other | ) | const [inline] |
bool sp::video::color::operator== | ( | const color & | other | ) | const [inline] |
void sp::video::color::setFloatArray | ( | const f32 * | ColorArray | ) | [inline] |
Sets the color with the specified float array. This is the opposite function for "getFloatArray".
void sp::video::color::setIntensity | ( | const color & | other | ) | [inline] |
void sp::video::color::setIntensity | ( | f32 | Intensity | ) | [inline] |
color& sp::video::color::setInverse | ( | ) | [inline] |
color& sp::video::color::setInverse | ( | bool | isRedInverse, | |
bool | isGreenInverse, | |||
bool | isBlueInverse, | |||
bool | isAlphaInverse = false | |||
) | [inline] |
void sp::video::color::setSingle | ( | u32 | Color | ) | [inline] |
const color sp::video::color::black [static] |
color(0, 0, 0, 255).
const color sp::video::color::blue [static] |
color(0, 0, 255, 255).
const color sp::video::color::empty [static] |
color(0, 0, 0, 0).
const color sp::video::color::green [static] |
color(0, 255, 0, 255).
const color sp::video::color::pink [static] |
color(255, 0, 255, 255).
const color sp::video::color::red [static] |
color(255, 0, 0, 255).
const color sp::video::color::white [static] |
color(255, 255, 255, 255).
const color sp::video::color::yellow [static] |
color(255, 255, 0, 255).