| Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <SColor.h>
Public Member Functions | |
| u32 | getAlpha () const |
| Returns the alpha component of the color. | |
| u32 | getAverage () const |
| Returns the average intensity of the color. | |
| u32 | getBlue () const |
| Returns the blue component of the color. | |
| u32 | getGreen () const |
| Returns the green component of the color. | |
| SColor | getInterpolated (const SColor &other, f32 d) const |
| Interpolates the color with a f32 value to another color. | |
| SColor | getInterpolated_quadratic (const SColor &c1, const SColor &c2, f32 d) const |
| Returns interpolated color. ( quadratic ). | |
| f32 | getLuminance () const |
| Returns the luminance of the color. | |
| u32 | getRed () const |
| Returns the red component of the color. | |
| bool | operator!= (const SColor &other) const |
| Compares the color to another color. | |
| SColor | operator+ (const SColor &other) const |
| Adds two colors, result is clamped to 0..255 values. | |
| bool | operator< (const SColor &other) const |
| comparison operator | |
| bool | operator== (const SColor &other) const |
| Compares the color to another color. | |
| SColor (u32 clr) | |
| Constructs the color from a 32 bit value. Could be another color. | |
| SColor (u32 a, u32 r, u32 g, u32 b) | |
| Constructs the color from 4 values representing the alpha, red, green and blue component. | |
| SColor () | |
| Constructor of the Color. Does nothing. | |
| void | set (u32 col) |
| void | set (u32 a, u32 r, u32 g, u32 b) |
| Sets all four components of the color at once. | |
| void | setAlpha (u32 a) |
| Sets the alpha component of the Color. | |
| void | setBlue (u32 b) |
| Sets the blue component of the Color. | |
| void | setGreen (u32 g) |
| Sets the green component of the Color. | |
| void | setRed (u32 r) |
| Sets the red component of the Color. | |
| u16 | toA1R5G5B5 () const |
| Calculates a 16 bit A1R5G5B5 value of this color. | |
| void | toOpenGLColor (u8 *dest) const |
| Converts color to OpenGL color format. | |
Public Attributes | |
| u32 | color |
| color in A8R8G8B8 Format | |
The color values for alpha, red, green, and blue are stored in a single u32. So all four values may be between 0 and 255. This class is used by most parts of the Irrlicht Engine to specify a color. Another way is using the class SColorf, which stores the color values in 4 floats.
Definition at line 175 of file SColor.h.
|
|
Constructor of the Color. Does nothing. The color value is not initialized to save time. Definition at line 181 of file SColor.h. Referenced by getInterpolated(), getInterpolated_quadratic(), and operator+(). |
|
||||||||||||||||||||
|
Constructs the color from 4 values representing the alpha, red, green and blue component. Must be values between 0 and 255. |
|
|
Constructs the color from a 32 bit value. Could be another color.
|
|
|
Returns the alpha component of the color. The alpha component defines how transparent a color should be. 255 means not transparent (opaque), 0 means fully transparent. Definition at line 196 of file SColor.h. References color. Referenced by getInterpolated(), getInterpolated_quadratic(), operator+(), irr::video::SColorf::SColorf(), and toOpenGLColor(). |
|
|
Returns the average intensity of the color.
Definition at line 220 of file SColor.h. References getBlue(), getGreen(), and getRed(). |
|
|
Returns the blue component of the color.
Definition at line 211 of file SColor.h. References color. Referenced by getAverage(), getInterpolated(), getInterpolated_quadratic(), getLuminance(), operator+(), irr::video::SColorf::SColorf(), and toOpenGLColor(). |
|
|
Returns the green component of the color.
Definition at line 206 of file SColor.h. References color. Referenced by getAverage(), getInterpolated(), getInterpolated_quadratic(), getLuminance(), operator+(), irr::video::SColorf::SColorf(), and toOpenGLColor(). |
|
||||||||||||
|
Interpolates the color with a f32 value to another color.
Definition at line 311 of file SColor.h. References irr::core::clamp(), getAlpha(), getBlue(), getGreen(), getRed(), and SColor(). |
|
||||||||||||||||
|
Returns interpolated color. ( quadratic ).
Definition at line 325 of file SColor.h. References irr::core::clamp(), irr::core::floor32(), getAlpha(), getBlue(), getGreen(), getRed(), and SColor(). |
|
|
Returns the luminance of the color.
Definition at line 214 of file SColor.h. References getBlue(), getGreen(), and getRed(). |
|
|
Returns the red component of the color.
Definition at line 201 of file SColor.h. References color. Referenced by getAverage(), getInterpolated(), getInterpolated_quadratic(), getLuminance(), operator+(), irr::video::SColorf::SColorf(), and toOpenGLColor(). |
|
|
Compares the color to another color.
Definition at line 290 of file SColor.h. References color. |
|
|
Adds two colors, result is clamped to 0..255 values.
Definition at line 299 of file SColor.h. References getAlpha(), getBlue(), getGreen(), getRed(), irr::core::min_(), and SColor(). |
|
|
comparison operator
Definition at line 294 of file SColor.h. References color. |
|
|
Compares the color to another color.
Definition at line 286 of file SColor.h. References color. |
|
|
Definition at line 282 of file SColor.h. References color. |
|
||||||||||||||||||||
|
Sets all four components of the color at once. Constructs the color from 4 values representing the alpha, red, green and blue components of the color. Must be values between 0 and 255.
Definition at line 278 of file SColor.h. References color. |
|
|
Sets the alpha component of the Color. The alpha component defines how transparent a color should be.
Definition at line 230 of file SColor.h. References color. |
|
|
Sets the blue component of the Color.
Definition at line 245 of file SColor.h. References color. Referenced by irr::video::SColorHSL::settoRGB(). |
|
|
Sets the green component of the Color.
Definition at line 240 of file SColor.h. References color. Referenced by irr::video::SColorHSL::settoRGB(). |
|
|
Sets the red component of the Color.
Definition at line 235 of file SColor.h. References color. Referenced by irr::video::SColorHSL::settoRGB(). |
|
|
Calculates a 16 bit A1R5G5B5 value of this color.
Definition at line 249 of file SColor.h. References irr::video::A8R8G8B8toA1R5G5B5(), and color. |
|
|
Converts color to OpenGL color format. From ARGB to RGBA in 4 byte components for endian aware passing to OpenGL
Definition at line 255 of file SColor.h. References getAlpha(), getBlue(), getGreen(), and getRed(). |
|
|
color in A8R8G8B8 Format
Definition at line 346 of file SColor.h. Referenced by getAlpha(), getBlue(), getGreen(), getRed(), operator!=(), operator<(), operator==(), set(), setAlpha(), setBlue(), setGreen(), setRed(), and toA1R5G5B5(). |
| The Irrlicht
Engine Documentation © 2003-2008 by Nikolaus Gebhardt. Generated
on Sun Jun 1 07:59:24 2008 by Doxygen
(1.4.2) |