![]() |
PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
|
Pure color class. More...
Pure color class.
Definition at line 22 of file PureColor.h.
#include <PureColor.h>
Public Member Functions | |
PureColor () | |
Creates a black color. | |
PureColor (const PureColor &cm) | |
PureColor (const TPureUByte &red, const TPureUByte &green, const TPureUByte &blue, const TPureUByte &alpha=0) | |
Constructs a color. | |
TPureUByte | getRed () const |
Gets red component. | |
TPureUByte | getGreen () const |
Gets green component. | |
TPureUByte | getBlue () const |
Gets blue component. | |
TPureUByte | getAlpha () const |
Gets alpha component. | |
void | Set (TPureUByte red, TPureUByte green, TPureUByte blue, TPureUByte alpha=0) |
Sets all color components. | |
void | SetRed (TPureUByte red) |
Sets red component. | |
void | SetGreen (TPureUByte green) |
Sets green component. | |
void | SetBlue (TPureUByte blue) |
Sets blue component. | |
void | SetAlpha (TPureUByte alpha) |
Sets alpha component. | |
TPureFloat | getRedAsFloat () const |
Gets red component. | |
TPureFloat | getGreenAsFloat () const |
Gets green component. | |
TPureFloat | getBlueAsFloat () const |
Gets blue component. | |
TPureFloat | getAlphaAsFloat () const |
Gets alpha component. | |
void | SetAsFloats (TPureFloat red, TPureFloat green, TPureFloat blue, TPureFloat alpha=0.0f) |
Sets all color components. | |
void | SetRedAsFloat (TPureFloat red) |
Sets red component. | |
void | SetGreenAsFloat (TPureFloat green) |
Sets green component. | |
void | SetBlueAsFloat (TPureFloat blue) |
Sets blue component. | |
void | SetAlphaAsFloat (TPureFloat alpha) |
Sets alpha component. | |
TPureBool | operator== (const PureColor &clr) const |
Equals to operator. | |
TPureBool | operator!= (const PureColor &clr) const |
Not equals to operator. | |
PureColor & | operator= (const PureColor &vec) |
Assignment operator. | |
Private Attributes | |
TPureUByte | r |
TPureUByte | g |
TPureUByte | b |
TPureUByte | a |
PureColor::PureColor | ( | ) |
Creates a black color.
Definition at line 23 of file PureColor.cpp.
PureColor::PureColor | ( | const PureColor & | cm | ) |
Definition at line 29 of file PureColor.cpp.
PureColor::PureColor | ( | const TPureUByte & | red, |
const TPureUByte & | green, | ||
const TPureUByte & | blue, | ||
const TPureUByte & | alpha = 0 ) |
Constructs a color.
red | Red component in range [0, 255]. |
green | Green component in range [0, 255]. |
blue | Blue component in range [0, 255]. |
alpha | Alpha component in range [0, 255]. |
Definition at line 44 of file PureColor.cpp.
TPureUByte PureColor::getAlpha | ( | ) | const |
Gets alpha component.
Definition at line 93 of file PureColor.cpp.
TPureFloat PureColor::getAlphaAsFloat | ( | ) | const |
Gets alpha component.
Definition at line 198 of file PureColor.cpp.
TPureUByte PureColor::getBlue | ( | ) | const |
Gets blue component.
Definition at line 82 of file PureColor.cpp.
TPureFloat PureColor::getBlueAsFloat | ( | ) | const |
Gets blue component.
Definition at line 187 of file PureColor.cpp.
TPureUByte PureColor::getGreen | ( | ) | const |
Gets green component.
Definition at line 71 of file PureColor.cpp.
TPureFloat PureColor::getGreenAsFloat | ( | ) | const |
Gets green component.
Definition at line 176 of file PureColor.cpp.
TPureUByte PureColor::getRed | ( | ) | const |
Gets red component.
Definition at line 60 of file PureColor.cpp.
TPureFloat PureColor::getRedAsFloat | ( | ) | const |
Gets red component.
Definition at line 165 of file PureColor.cpp.
Not equals to operator.
Definition at line 277 of file PureColor.cpp.
Assignment operator.
Definition at line 286 of file PureColor.cpp.
Equals to operator.
Definition at line 268 of file PureColor.cpp.
void PureColor::Set | ( | TPureUByte | red, |
TPureUByte | green, | ||
TPureUByte | blue, | ||
TPureUByte | alpha = 0 ) |
Sets all color components.
red | Red component in range [0, 255]. |
green | Green component in range [0, 255]. |
blue | Blue component in range [0, 255]. |
alpha | Alpha component in range [0, 255]. |
Definition at line 107 of file PureColor.cpp.
void PureColor::SetAlpha | ( | TPureUByte | alpha | ) |
Sets alpha component.
alpha | Alpha component in range [0, 255]. |
Definition at line 154 of file PureColor.cpp.
void PureColor::SetAlphaAsFloat | ( | TPureFloat | alpha | ) |
Sets alpha component.
alpha | Alpha component in range [0.0f, 1.0f]. |
Definition at line 259 of file PureColor.cpp.
void PureColor::SetAsFloats | ( | TPureFloat | red, |
TPureFloat | green, | ||
TPureFloat | blue, | ||
TPureFloat | alpha = 0.0f ) |
Sets all color components.
red | Red component in range [0.0f, 1.0f]. |
green | Green component in range [0.0f, 1.0f]. |
blue | Blue component in range [0.0f, 1.0f]. |
alpha | Alpha component in range [0.0f, 1.0f]. |
Definition at line 212 of file PureColor.cpp.
void PureColor::SetBlue | ( | TPureUByte | blue | ) |
Sets blue component.
blue | Blue component in range [0, 255]. |
Definition at line 143 of file PureColor.cpp.
void PureColor::SetBlueAsFloat | ( | TPureFloat | blue | ) |
Sets blue component.
blue | Blue component in range [0.0f, 1.0f]. |
Definition at line 248 of file PureColor.cpp.
void PureColor::SetGreen | ( | TPureUByte | green | ) |
Sets green component.
green | Green component in range [0, 255]. |
Definition at line 132 of file PureColor.cpp.
void PureColor::SetGreenAsFloat | ( | TPureFloat | green | ) |
Sets green component.
green | Green component in range [0.0f, 1.0f]. |
Definition at line 237 of file PureColor.cpp.
void PureColor::SetRed | ( | TPureUByte | red | ) |
Sets red component.
red | Red component in range [0, 255]. |
Definition at line 121 of file PureColor.cpp.
void PureColor::SetRedAsFloat | ( | TPureFloat | red | ) |
Sets red component.
red | Red component in range [0.0f, 1.0f]. |
Definition at line 226 of file PureColor.cpp.
|
private |
Definition at line 82 of file PureColor.h.
|
private |
Definition at line 82 of file PureColor.h.
|
private |
Definition at line 82 of file PureColor.h.
|
private |
Definition at line 82 of file PureColor.h.