#include <color.h>
Public Types | |
enum | ColorSystem { CS_RGB, CS_XYZ, CS_Yxy, CS_HSL, CS_HSV } |
The available color systems are represented in this enum. More... | |
Public Member Functions | |
color (float32 v1=1.0f, float32 v2=1.0f, float32 v3=1.0f, float32 alpha=1.0f, ColorSystem cs=CS_RGB) | |
Construct a default color, set to all white in RGB. | |
color (const color &c) | |
Assign the values from this given color to this one. | |
float32 | getAlpha () const |
Returns the alpha channel. | |
void | setAlpha (float32 alpha) |
Assigns the alpha channel. | |
float32 | getValue (uint8 i) const |
Retrieves the channel at the given index. | |
void | setValue (uint8 i, float32 value) |
Assigns the indexed channel. | |
ColorSystem | getColorSystem () const |
Returns the color system. | |
void | setColorSystem (ColorSystem cs) |
Set the color system to one of the values in ColorSystem enum. | |
float32 & | operator[] (uint8 i) |
Operator access to the color channels. | |
const float32 & | operator[] (uint8 i) const |
Operator access to the color channels. | |
color & | operator= (const color &c) |
Public Attributes | |
float32 & | a |
float32 & | r |
float32 & | g |
float32 & | b |
This class is used as the Odyssey standard color data type. color allows for multiple color systems to be stored in one type. This color type also supports an alpha channel.
|
The available color systems are represented in this enum.
|
|
Construct a default color, set to all white in RGB.
|
|
Assign the values from this given color to this one.
|
|
Returns the alpha channel.
|
|
Returns the color system.
|
|
Retrieves the channel at the given index.
|
|
|
|
Operator access to the color channels.
|
|
Operator access to the color channels.
|
|
Assigns the alpha channel. Assign the alpha channel (color system independent).
|
|
Set the color system to one of the values in ColorSystem enum.
|
|
Assigns the indexed channel. This will assign the indexed channel to the given value. The channel indices point to color system dependent values.
|
|
|
|
|
|
|
|
|