Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
Class representing color. More...
#include <Color.h>
Public Member Functions | |
Color (f32 red=1.0f, f32 green=1.0f, f32 blue=1.0f, f32 alpha=1.0f) | |
Color (const Color &other) | |
f32 * | get () |
const f32 * | get () const |
u32 | getAsABGR () const |
Retrieves colors as ABGR. | |
u32 | getAsARGB () const |
Retrieves color as ARGB. | |
u32 | getAsBGRA () const |
Retrieves color as BGRA. | |
u32 | getAsRGBA () const |
Retrieves color as RGBA. | |
bool | operator!= (const Color &other) const |
Color | operator* (const Color &other) const |
Color | operator* (const f32 v) const |
Color & | operator*= (const f32 v) |
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 f32 v) const |
Color | operator/ (const Color &other) const |
Color & | operator/= (const f32 v) |
Color & | operator= (const Color &other) |
bool | operator== (const Color &other) const |
void | setAsABGR (const u32 val) |
Sets color as ABGR. | |
void | setAsARGB (const u32 val) |
Sets color as ARGB. | |
void | setAsBGRA (const u32 val) |
Sets color as BGRA. | |
void | setAsRGBA (const u32 val) |
Sets color as RGBA. | |
void | setHSB (f32 hue, f32 saturation, f32 brightness) |
Public Attributes | |
f32 | A |
f32 | B |
f32 | G |
f32 | R |
Static Public Attributes | |
static const Color | Black = Color(0.0, 0.0, 0.0) |
static const Color | Blue = Color(0.0, 0.0, 1.0) |
static const Color | Green = Color(0.0, 1.0, 0.0) |
static const Color | Red = Color(1.0, 0.0, 0.0) |
static const Color | White = Color(1.0, 1.0, 1.0) |
static const Color | ZERO = Color(0.0, 0.0, 0.0, 0.0) |
Class representing color.
Color is represented as 4 components, each of which is a floating-point value from 0.0 to 1.0.
Referenced by operator*(), operator+(), operator-(), and operator/().
render::Color::Color | ( | const Color & | other | ) |
f32 * render::Color::get | ( | ) |
References R.
Referenced by render::Shader::setParamerter().
u32 render::Color::getAsABGR | ( | ) | const |
Retrieves colors as ABGR.
u32 render::Color::getAsARGB | ( | ) | const |
Retrieves color as ARGB.
u32 render::Color::getAsBGRA | ( | ) | const |
Retrieves color as BGRA.
u32 render::Color::getAsRGBA | ( | ) | const |
Retrieves color as RGBA.
bool render::Color::operator!= | ( | const Color & | other | ) | const [inline] |
void render::Color::setAsABGR | ( | const u32 | val | ) |
Sets color as ABGR.
void render::Color::setAsARGB | ( | const u32 | val | ) |
Sets color as ARGB.
void render::Color::setAsBGRA | ( | const u32 | val | ) |
Sets color as BGRA.
void render::Color::setAsRGBA | ( | const u32 | val | ) |
Sets color as RGBA.
Set a color value from Hue, Saturation and Brightness.
hue,: | Hue value, scaled to the [0,1] range as opposed to the 0-360 |
saturation,: | Saturation level, [0,1] |
brightness,: | Brightness level, [0,1] |
Referenced by operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), and render::RenderManager::render().
const Color render::Color::Black = Color(0.0, 0.0, 0.0) [static] |
Referenced by render::ShaderParamData::getCurrentLightSpecularColour(), render::Viewport::initProperties(), render::Light::initProperties(), render::Material::initProperties(), resource::parseColor(), render::RenderManager::RenderManager(), render::ShaderParamData::ShaderParamData(), and render::Material::unloadImpl().
const Color render::Color::Blue = Color(0.0, 0.0, 1.0) [static] |
Referenced by resource::parseColor().
const Color render::Color::Green = Color(0.0, 1.0, 0.0) [static] |
Referenced by resource::parseColor().
const Color render::Color::Red = Color(1.0, 0.0, 0.0) [static] |
Referenced by resource::parseColor().
const Color render::Color::White = Color(1.0, 1.0, 1.0) [static] |
const Color render::Color::ZERO = Color(0.0, 0.0, 0.0, 0.0) [static] |
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:08 by
Doxygen
(1.7.4)
|