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 Methods

 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 Methods

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.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &    out,
const Color &    col
[friend]
 

Insertion operator for this Color into an output stream.


The documentation for this class was generated from the following files:
Generated on Sat Mar 22 15:12:07 2003 for Bumpmap by doxygen1.3-rc2