Defines a color.
More...
#include <Types.hh>
Public Member Functions |
| | Color (double _r=0.0, double _g=0.0, double _b=0.0, double _a=1.0) |
| | Constructor.
|
| bool | operator== (const Color &_clr) const |
| | Equality operator.
|
Public Attributes |
| float | a |
| | Alpha value.
|
| float | b |
| | Blue value.
|
| float | g |
| | Green value.
|
| float | r |
| | Red value.
|
Friends |
| std::ostream & | operator<< (std::ostream &_out, const Color &_pt) |
| | Stream insertion operator.
|
| std::istream & | operator>> (std::istream &_in, Color &_pt) |
| | Stream insertion operator.
|
Detailed Description
Constructor & Destructor Documentation
| sdf::Color::Color |
( |
double |
_r = 0.0, |
|
|
double |
_g = 0.0, |
|
|
double |
_b = 0.0, |
|
|
double |
_a = 1.0 |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| [in] | _r | Red value (range 0 to 1) |
| [in] | _g | Green value (range 0 to 1 |
| [in] | _b | Blue value (range 0 to 1 |
| [in] | _a | Alpha value (0=transparent, 1=opaque) |
Member Function Documentation
| bool sdf::Color::operator== |
( |
const Color & |
_clr | ) |
const |
|
inline |
Equality operator.
- Parameters
-
| [in] | _clr | The color to check for equality |
- Returns
- True if the this color equals _clf
References a, b, sdf::equal(), g, and r.
Friends And Related Function Documentation
| std::ostream& operator<< |
( |
std::ostream & |
_out, |
|
|
const Color & |
_pt |
|
) |
| |
|
friend |
Stream insertion operator.
- Parameters
-
| [in] | _out | the output stream |
| [in] | _pt | the color |
- Returns
- the output stream
| std::istream& operator>> |
( |
std::istream & |
_in, |
|
|
Color & |
_pt |
|
) |
| |
|
friend |
Stream insertion operator.
- Parameters
-
| [in] | _in | the input stream |
| [in] | _pt | |
Member Data Documentation
The documentation for this class was generated from the following file: