Public Member Functions | Public Attributes

VgEngine::VgColor Struct Reference

This struct represents a color. More...

List of all members.

Public Member Functions

 VgColor (float pRed=0.0f, float pGreen=0.0f, float pBlue=0.0f, float pAlpha=1.0f)
 Constructs a color with the RGBA value pRed, pGreen, pBlue and pAlpha.
 VgColor (const VgColor &pColor)
 Copy constructor.
bool operator== (const VgColor &pOther) const
bool operator!= (const VgColor &pOther) const
VgColoroperator*= (float const &pScalar)
 returns the all the colors components and alpha multiplied by scalar
VgColor operator* (float const &pScalar)
 returns the all the colors components and alpha multiplied by scalar

Public Attributes

float mRed
 The red component of the color.
float mGreen
 The green component of the color.
float mBlue
 The blue component of the color.
float mAlpha
 The alpha component of the color.

Detailed Description

This struct represents a color.

It is defined using four values: The first three values represent red, green and blue (respectively) following the additive color model and the last value is for alpha (transparency). Those values can be set in the [0.0, 1.0] range. A value of 1.0 for alpha means that the color is completely opaque, while a value of 0.0 means the color is completely transparent.


Constructor & Destructor Documentation

VgEngine::VgColor::VgColor ( float  pRed = 0.0f,
float  pGreen = 0.0f,
float  pBlue = 0.0f,
float  pAlpha = 1.0f 
) [inline]

Constructs a color with the RGBA value pRed, pGreen, pBlue and pAlpha.

The parameters must be in the [0.0, 1.0] range. Default values are set to (0.0, 0.0, 0.0, 1.0) (opaque black).

VgEngine::VgColor::VgColor ( const VgColor pColor ) [inline]

Copy constructor.

Version:
2.0.8955

Member Function Documentation

bool VgEngine::VgColor::operator!= ( const VgColor pOther ) const [inline]
VgColor VgEngine::VgColor::operator* ( float const &  pScalar ) [inline]

returns the all the colors components and alpha multiplied by scalar

Parameters:
pScalarfactor to multiply all color channels. Alpha stays unchanged
VgColor& VgEngine::VgColor::operator*= ( float const &  pScalar ) [inline]

returns the all the colors components and alpha multiplied by scalar

Parameters:
pScalarfactor to multiply all color channels. Alpha stays unchanged
bool VgEngine::VgColor::operator== ( const VgColor pOther ) const [inline]

Member Data Documentation

The alpha component of the color.

The blue component of the color.

The green component of the color.

The red component of the color.


The documentation for this struct was generated from the following file:
VisioDevKit 2.0, Visioglobe® 2013