Public Member Functions | Public Attributes
CColor Struct Reference

Detailed Description

This struct represents an RGBA color.

The RBGA component values are stored as double precision numbers.

CColor objects are created from OGLLight and OGLMaterial objects.

Note:
If a component value is greater than a signed, single-precision value, the component value is interpreted as a negative value.

In most cases, the component values are normalized to the range 0 to 1. TrianglePoint::GetColor is an exception, and returns values in the range 0 to 255.

Other XSI objects and properties store colors differently:

See also:
CColorArray, OGLLight::GetColor, OGLMaterial::GetDiffuse, OGLMaterial::GetSpecular, OGLMaterial::GetAmbient

#include <xsi_color.h>

List of all members.

Public Member Functions

  CColor ()
  CColor (const CColor &in_color)
  CColor (double in_rc, double in_gc, double in_bc, double in_ac)
bool  operator== (const CColor &in_color) const
bool  operator!= (const CColor &in_color) const

Public Attributes

double  r
double  g
double  b
double  a

Constructor & Destructor Documentation

CColor ( ) [inline]

Constructs a CColor object.

CColor ( const CColor in_color ) [inline]

Constructs a new CColor object from an existing CColor object.

Parameters:
in_color An existing CColor object to copy into this CColor object.
CColor ( double  in_rc,
double  in_gc,
double  in_bc,
double  in_ac 
) [inline]

Constructs a new CColor object from RGBA values.

Parameters:
in_rc Red component value.
in_gc Green component value.
in_bc Blue component value.
in_ac Alpha component value.

Member Function Documentation

bool operator== ( const CColor in_color ) const [inline]

Tests whether two CColor objects are equal.

Parameters:
in_color CColor to compare with this CColor object.
Returns:
True if the colors are equal, and false otherwise.
bool operator!= ( const CColor in_color ) const [inline]

Tests whether two CColor objects are different.

Parameters:
in_color CColor to compare with this CColor object
Returns:
True if the colors are different, and false is they are the same.

Member Data Documentation

double r

Red component value

double g

Green component value

double b

Blue component value

double a

Alpha component value


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