Public Methods |
| csColor () |
| Initialize a color object (contents undefined).
|
| csColor (float r, float g, float b) |
| Initialize a color object with given R,G,B components.
|
| csColor (const csColor &c) |
| Initialize a color object with an existing color.
|
void | Set (float r, float g, float b) |
| Set color to given R,G,B components.
|
void | Clamp (float r, float g, float b) |
| Clamp color to given R,G,B values.
|
void | ClampDown () |
| Make sure color components are not negative.
|
csColor& | operator= (const csColor &c) |
| Assign one color object to another.
|
csColor& | operator *= (float f) |
| Multiply this color by a scalar value.
|
csColor& | operator+= (const csColor &c) |
| Add another color to this one.
|
csColor& | operator-= (const csColor &c) |
| Subtract another color to this one.
|
void | Add (float r, float g, float b) |
| Add given R,G,B components to color.
|
void | Subtract (float r, float g, float b) |
| Subtract given R,G,B components from color.
|
Public Attributes |
float | red |
| Red (0..1).
|
float | green |
| Green (0..1).
|
float | blue |
| Blue (0..1).
|