Loading...
Searching...
No Matches
sdf::Color Class Reference

Defines a color. More...

#include <Types.hh>

Public Member Functions

 Color (float _r=0.0f, float _g=0.0f, float _b=0.0f, float _a=1.0f)
 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.

Detailed Description

Defines a color.

Constructor & Destructor Documentation

◆ Color()

sdf::Color::Color ( float _r = 0.0f,
float _g = 0.0f,
float _b = 0.0f,
float _a = 1.0f )
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)
Deprecated
Use ignition::math::Color

References a, b, g, r, and SDF_DEPRECATED.

Referenced by operator<<, operator==(), and operator>>.

Member Function Documentation

◆ operator==()

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 Color(), a, b, sdf::equal(), g, and r.

Member Data Documentation

◆ a

float sdf::Color::a

Alpha value.

Referenced by Color(), operator<<, operator==(), and operator>>.

◆ b

float sdf::Color::b

Blue value.

Referenced by Color(), operator<<, operator==(), and operator>>.

◆ g

float sdf::Color::g

Green value.

Referenced by Color(), operator<<, operator==(), and operator>>.

◆ r

float sdf::Color::r

Red value.

Referenced by Color(), operator<<, operator==(), and operator>>.


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