![]() |
Public API Reference |
#include <cscolor.h>
Public Methods | |
csColor () | |
Initialize a color object (contents undefined). More... | |
csColor (float r, float g, float b) | |
Initialize a color object with given R,G,B components. More... | |
csColor (const csColor &c) | |
Initialize a color object with an existing color. More... | |
void | Set (float r, float g, float b) |
Set color to given R,G,B components. More... | |
void | Clamp (float r, float g, float b) |
Clamp color to given R,G,B values. More... | |
void | ClampDown () |
Make sure color components are not negative. More... | |
csColor & | operator= (const csColor &c) |
Assign one color object to another. More... | |
csColor & | operator *= (float f) |
Multiply this color by a scalar value. More... | |
csColor & | operator+= (const csColor &c) |
Add another color to this one. More... | |
csColor & | operator-= (const csColor &c) |
Subtract another color to this one. More... | |
void | Add (float r, float g, float b) |
Add given R,G,B components to color. More... | |
void | Subtract (float r, float g, float b) |
Subtract given R,G,B components from color. More... | |
Public Attributes | |
float | red |
Red (0..1). More... | |
float | green |
Green (0..1). More... | |
float | blue |
Blue (0..1). More... |
This class is similar to csRGBpixel and csRGBcolor except that it uses floating-point values to store R,G,B values.
Definition at line 27 of file cscolor.h.
|
Initialize a color object (contents undefined).
|
|
Initialize a color object with given R,G,B components.
|
|
Initialize a color object with an existing color.
|
|
Add given R,G,B components to color.
|
|
Clamp color to given R,G,B values.
|
|
Make sure color components are not negative.
|
|
Multiply this color by a scalar value.
|
|
Add another color to this one.
|
|
Subtract another color to this one.
|
|
Assign one color object to another.
|
|
Set color to given R,G,B components.
|
|
Subtract given R,G,B components from color.
|
|
Blue (0..1).
Definition at line 35 of file cscolor.h. Referenced by Add, Clamp, ClampDown, csColor, operator *=, operator+=, operator-=, operator=, Set, csSector::SetFog, and Subtract. |
|
Green (0..1).
Definition at line 33 of file cscolor.h. Referenced by Add, Clamp, ClampDown, csColor, operator *=, operator+=, operator-=, operator=, Set, csSector::SetFog, and Subtract. |
|
Red (0..1).
Definition at line 31 of file cscolor.h. Referenced by Add, Clamp, ClampDown, csColor, operator *=, operator+=, operator-=, operator=, Set, csSector::SetFog, and Subtract. |