Color4f Class Reference
Class for holding 32bit floating point RGBA color data.
More...
#include <Graphics/Color.h>
List of all members.
Public Member Functions |
|
| Color4f () |
| | Default constructor. Defaults to Black.
|
| | Color4f (float _r, float _g, float _b) |
| | Constructs a spacific color. Alpha set to 1.
|
| | Color4f (float _r, float _g, float _b, float _a) |
| | Constructs a spacific color.
|
| | Color4f (byte _r, byte _g, byte _b) |
| | Constructs a spacific color from integer data. Alpha set to 1.
|
| | Color4f (byte _r, byte _g, byte _b, byte _a) |
| | Constructs a spacific color from integer data.
|
| | Color4f (uint c) |
| | Constructs a spacific color from integer data.
|
| void | Get (byte &_r, byte &_g, byte &_b) const |
| | Converts 32bit floating point color data to byte data.
|
| void | Get (byte &_r, byte &_g, byte &_b, byte &_a) const |
| | Converts 32bit floating point color data to byte data.
|
| unsigned int | Get () const |
| | Converts 32bit floating point color data into an integer of the form 0xRRGGBBAA.
|
| Color4f | operator+ (const Color4f &c) const |
| | Overloaded color addition operator.
|
| Color4f | operator- (const Color4f &c) const |
| | Overloaded color subtraction operator.
|
| Color4f | operator* (float c) const |
| | Overloaded constant-color multiplication operator.
|
| bool | operator== (const Color4f &c) const |
| | Overloaded color equality operator.
|
Public Attributes |
| float | a |
Friends |
| Color4f | operator* (float c, const Color4f &col) |
| | Overloaded color-constant multiplication operator.
|
Detailed Description
Class for holding 32bit floating point RGBA color data.
Constructor & Destructor Documentation
| Color4f::Color4f |
( |
float |
_r, |
|
|
float |
_g, |
|
|
float |
_b | |
|
) |
| | [inline] |
Constructs a spacific color. Alpha set to 1.
- Parameters:
-
| [in] | _r | red value. |
| [in] | _g | green value. |
| [in] | _b | blue value. |
| Color4f::Color4f |
( |
float |
_r, |
|
|
float |
_g, |
|
|
float |
_b, |
|
|
float |
_a | |
|
) |
| | [inline] |
Constructs a spacific color.
- Parameters:
-
| [in] | _r | red value. |
| [in] | _g | green value. |
| [in] | _b | blue value. |
| [in] | _a | alpha value. |
Constructs a spacific color from integer data. Alpha set to 1.
- Parameters:
-
| [in] | _r | red value. |
| [in] | _g | green value. |
| [in] | _b | blue value. |
Constructs a spacific color from integer data.
- Parameters:
-
| [in] | _r | red value. |
| [in] | _g | green value. |
| [in] | _b | blue value. |
| [in] | _a | alpha value. |
| Color4f::Color4f |
( |
uint |
c |
) |
[inline] |
Constructs a spacific color from integer data.
- Parameters:
-
| [in] | c | the color expected to be in the form 0xRRGGBBAA. |
Member Function Documentation
| unsigned int Color4f::Get |
( |
|
) |
const [inline] |
Converts 32bit floating point color data into an integer of the form 0xRRGGBBAA.
- Returns:
- An integer of the form 0xRRGGBBAA.
Converts 32bit floating point color data to byte data.
- Parameters:
-
| [out] | _r | red value. |
| [out] | _g | green value. |
| [out] | _b | blue value. |
| [out] | _a | alpha value. |
| void Color4f::Get |
( |
byte & |
_r, |
|
|
byte & |
_g, |
|
|
byte & |
_b | |
|
) |
| | const [inline] |
Converts 32bit floating point color data to byte data.
- Parameters:
-
| [out] | _r | red value. |
| [out] | _g | green value. |
| [out] | _b | blue value. |
| Color4f Color4f::operator* |
( |
float |
c |
) |
const [inline] |
Overloaded constant-color multiplication operator.
- Parameters:
-
| [in] | c | the constant to multiply by. |
- Returns:
- The result of multiplying c to this color.
Overloaded color addition operator.
- Parameters:
-
- Returns:
- The result of adding this color to c.
Overloaded color subtraction operator.
- Parameters:
-
| [in] | c | the color to subtract. |
- Returns:
- The result of subtracting c from this color.
| bool Color4f::operator== |
( |
const Color4f & |
c |
) |
const [inline] |
Overloaded color equality operator.
- Parameters:
-
| [in] | c | the color to compare against. |
- Returns:
- True if the r, g, b and a components of this color are equal to the components of c. False is returned otherwise.
Friends And Related Function Documentation
Overloaded color-constant multiplication operator.
- Parameters:
-
| [in] | c | the constant to multiply by. |
| [in] | col | the color to multiply. |
- Returns:
- The result of multiplying col by c.
Member Data Documentation
(r)ed, (g)reen, (b)lue and (a)lpha data.
The documentation for this class was generated from the following file: