|
| Color () |
| Default constructor, initializes to black with no translucency.
|
|
| Color (float red, float green, float blue, float alpha) |
| Constructor that takes in RGBA single-precision values that range from 0-1.
|
|
| Color (float red, float green, float blue) |
| Constructor that takes in RGB single-precision values that range from 0-1.
|
|
| Color (double red, double green, double blue, double alpha) |
| Constructor that takes in RGBA double-precision values that range from 0-1.
|
|
| Color (double red, double green, double blue) |
| Constructor that takes in RGB double-precision values that range from 0-1.
|
|
| Color (int red, int green, int blue, int alpha) |
| Constructor that takes in RGBA integer values that range from 0-1.
|
|
| Color (int red, int green, int blue) |
| Constructor that takes in RGB integer values that range from 0-1.
|
|
Color SILVERLINING_API | operator* (float f) const |
| Multiplication operator; multiplies each rgb component of the Color by a constant.
|
|
Color SILVERLINING_API | operator* (const Color &c) const |
| Multiplication operator; multiplies two Colors together on a per-component basis.
|
|
Color SILVERLINING_API | operator+ (const Color &c) const |
| Addition operator; adds two colors together on a per-component basis.
|
|
bool SILVERLINING_API | operator== (const Color &c) const |
| Equality operator.
|
|
bool SILVERLINING_API | operator!= (const Color &c) const |
| Inequality operator.
|
|
Vector4 SILVERLINING_API | ToVector4 () const |
| Convert Color to Vector4.
|
|
Vector4f SILVERLINING_API | ToVector4f () const |
| Convert Color to Vector4f.
|
|
Vector3 SILVERLINING_API | ToVector3 () const |
| Convert Color to Vector3.
|
|
bool SILVERLINING_API | IsCloseTo (const Color &c, float distanceThreshold) const |
| Test if two colors are within a given distance of each other.
|
|
void SILVERLINING_API | ScaleToUnitOrLess (bool hdr) |
| If any component of the Color exceeds 1.0, every component will be scaled down uniformly such that the maximum color component equals 1.0.
|
|
void SILVERLINING_API | ScaleToValueOrLess (float value, bool hdr) |
| If any component of the Color exceeds the given value, every component will be scaled down uniformly such that the maximum color component equals it.
|
|
void SILVERLINING_API | ClampToUnitOrLess (bool hdr) |
| Clamps each color component to be within the range [0, 1.0].
|
|
Color SILVERLINING_API | ToGrayscale () const |
| Convert the RGB color to a grayscale value.
|
|
void SILVERLINING_API | Serialize (std::ostream &s) const |
| Save this color to disk.
|
|
void SILVERLINING_API | Unserialize (std::istream &s) |
| Restore this color from disk.
|
|
A RGBA color, where each component is represented as a float from 0-1.