Logo Search packages:      
Sourcecode: passage version File versions  Download package

Color Class Reference

#include <Color.h>

List of all members.

Detailed Description

Color object for RadiosGL

Float components in RGB (0..1) Color of emitted energy can be greater than 1

Created 9-5-99 Mods: Jason Rohrer 11-6-99 Added 32-bit composite member Jason Rohrer 11-13-99 Added printing functionality Jason Rohrer 11-15-99 Added rebuildComposite function Added weightColor function Added getMax function Jason Rohrer 2004-June-12 Fixed a bug in copy function. Jason Rohrer 2004-June-12 Added a linear sum function.

Jason Rohrer 2004-August-12 Optimized Color constructor. Jason Rohrer 2004-August-27 Added an equality test. Jason Rohrer 2005-February-4 Added weighting and setValue functions. Jason Rohrer 2005-February-10 Added invert and saturate functions. Jason Rohrer 2005-February-11 Added HSV conversion function. Jason Rohrer 2005-April-5 Disabled default building of composite. Jason Rohrer 2006-August-29 Changed alpha default to 1. Jason Rohrer 2006-October-3 Disabled building composite in default Color() constuctor.

Definition at line 39 of file Color.h.

Public Member Functions

 Color ()
 Color (float red, float green, float blue, float alpha=1, char inBuildComposite=false)
Colorcopy ()
char equals (Color *inOtherColor)
float getMax ()
unsigned long getWeightedComposite (unsigned long c1, float weight)
unsigned long getWeightedComposite (float weight)
void invert ()
float & operator[] (int rgbIndex)
void print ()
unsigned long rebuildComposite ()
void saturate ()
void setValues (Color *inOtherColor)
void setValues (float red, float green, float blue, float alpha=1)
unsigned long sumComposite (unsigned long c1, unsigned long c2)
void weightColor (Color *inWeightColor)
void weightColor (float weight)

Static Public Member Functions

static ColorlinearSum (Color *inFirst, Color *inSecond, float inFirstWeight)
static ColormakeColorFromHSV (float inHue, float inSaturation, float inValue, float inAlpha=1, char inBuildComposite=false)

Public Attributes

float a
float b
unsigned long composite
float g
char mCompositeBuilt
float r

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

Generated by  Doxygen 1.6.0   Back to index