Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

Color Class Reference

Defines a Color consisting of R, G, B and A components. More...

#include <Color.h>

List of all members.

Public Member Functions

 Color ()
 Default constructor, initializes R, G and B components to 0 and initializes A to 1.

 Color (float r, float g, float b)
 Initializes the R, G and B components to the specified values and initializes A to 1.

 Color (float r, float g, float b, float a)
 Initializes the components to the specified values.

float & operator[] (int which)
 Mutable accessor for a Color component.

float operator[] (int which) const
 Immutable accessor for a Color component.

const float * toArray () const
 Retrieve the color as an array of floats.


Static Public Attributes

const int R = 0
 The R coordinate index in the array representing this Color.

const int G = 1
 The G coordinate index in the array representing this Color.

const int B = 2
 The B coordinate index in the array representing this Color.

const int A = 3
 The A coordinate index in the array representing this Color.


Private Member Functions

void initialize (float r, float g, float b)
 Initializes the components to the specified values.

void initialize (float r, float g, float b, float a)
 Initializes the components to the specified values.


Private Attributes

float m_data [4]
 The data array containing the R, G, B and A values.


Friends

std::ostream & operator<< (std::ostream &out, const Color &col)
 Insertion operator for this Color into an output stream.


Detailed Description

Defines a Color consisting of R, G, B and A components.


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 23:40:58 2003 for Shadow by doxygen 1.3.2