All Classes Namespaces Files Functions Variables Typedefs Friends Macros Modules
Public Member Functions | Public Attributes | Friends | List of all members
sdf::Color Class Reference

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. More...
 
bool operator== (const Color &_clr) const
 Equality operator. More...
 

Public Attributes

float a
 Alpha value. More...
 
float b
 Blue value. More...
 
float g
 Green value. More...
 
float r
 Red value. More...
 

Friends

std::ostream & operator<< (std::ostream &_out, const Color &_pt)
 Stream insertion operator. More...
 
std::istream & operator>> (std::istream &_in, Color &_pt)
 Stream insertion operator. More...
 

Detailed Description

Defines a color.

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]_rRed value (range 0 to 1)
[in]_gGreen value (range 0 to 1
[in]_bBlue value (range 0 to 1
[in]_aAlpha value (0=transparent, 1=opaque)

Member Function Documentation

bool sdf::Color::operator== ( const Color _clr) const
inline

Equality operator.

Parameters
[in]_clrThe 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]_outthe output stream
[in]_ptthe color
Returns
the output stream
std::istream& operator>> ( std::istream &  _in,
Color _pt 
)
friend

Stream insertion operator.

Parameters
[in]_inthe input stream
[in]_pt

Member Data Documentation

float sdf::Color::a

Alpha value.

Referenced by operator==().

float sdf::Color::b

Blue value.

Referenced by operator==().

float sdf::Color::g

Green value.

Referenced by operator==().

float sdf::Color::r

Red value.

Referenced by operator==().


The documentation for this class was generated from the following file: