TrinityCore
|
#include <Color3.h>
Static Public Member Functions | |
static Color3 | fromARGB (uint32) |
static Color3 | fromASRGB (uint32) |
static const Color3 & | wheelRandom () |
static Color3 | ansiMap (uint32 i) |
static Color3 | pastelMap (uint32 i) |
static Color3 | fromHSV (const Vector3 &_hsv) |
static Vector3 | toHSV (const Color3 &_rgb) |
static Color3 | jetColorMap (const float &val) |
static Color3 | rainbowColorMap (float hue) |
static Color3 | random () |
static const Color3 & | red () |
static const Color3 & | green () |
static const Color3 & | blue () |
static const Color3 & | purple () |
static const Color3 & | cyan () |
static const Color3 & | yellow () |
static const Color3 & | brown () |
static const Color3 & | orange () |
static const Color3 & | black () |
static const Color3 & | gray () |
static const Color3 & | white () |
static const Color3 & | zero () |
static const Color3 & | one () |
Public Attributes | |
float | r |
float | g |
float | b |
Private Member Functions | |
bool | operator< (const Color3 &) const |
bool | operator> (const Color3 &) const |
bool | operator<= (const Color3 &) const |
bool | operator>= (const Color3 &) const |
Do not subclass– this implementation makes assumptions about the memory layout.
|
inline |
Initializes to all zero.
any | Must be in one of the following forms:
|
In the current implementation, G3D::Power3, G3D::Radiance3, and G3D::Irradiance3 are typedefs for Color3, so Color3 accepts "Power3" and "Radiance3" as a prefixes as well, e.g., Power3(1,0,0).
|
explicit |
|
inline |
|
inlineexplicit |
Initializes all channels to v.
|
inlineexplicit |
Initialize from another color.
G3D::Color3::Color3 | ( | const class Color3unorm8 & | other | ) |
Generate colors according to the ANSI color set, mod 16.
|
inline |
|
inline |
void G3D::Color3::deserialize | ( | class BinaryInput & | bi | ) |
|
inline |
Initialize from an HTML-style color (e.g. 0xFF0000 == RED)
Initialize from an HTML-style color (e.g. 0xFF0000 == RED) by converting from sRGB to RGB.
Converts from HSV to RGB , note: toHSV(fromHSV(_hsv)) may not be _hsv, if it is at a grey point or black point. The components of _hsv should lie in the unit interval. [Alvy] Ray Smith SIGGRAPH 1978 "Color Gamut Transform Pairs"
size_t G3D::Color3::hashCode | ( | ) | const |
bool G3D::Color3::isFinite | ( | ) | const |
|
inline |
|
inline |
Duplicates the matlab jet colormap maps [0,1] –> (r,g,b) where blue is close to 0 and red is close to 1.
|
inline |
|
inline |
Largest element
|
inline |
Smallest element
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Color3 & G3D::Color3::operator/= | ( | float | fScalar | ) |
|
inline |
Generate colors using a hash such that adjacent values are unlikely to have similar colors.
Useful for rendering with stable but arbitrary colors, e.g., when debugging a mesh algorithm.
|
inline |
|
static |
Returns colors with maximum saturation and value
hue | [0, 1] |
void G3D::Color3::serialize | ( | class BinaryOutput & | bo | ) | const |
|
inline |
|
inline |
Any G3D::Color3::toAny | ( | ) | const |
std::string G3D::Color3::toString | ( | ) | const |
float G3D::Color3::unitize | ( | float | fTolerance = 1e-06f | ) |
Returns one of the color wheel colors (e.g. RED, GREEN, CYAN). Does not include white, black, or gray.
float G3D::Color3::b |
float G3D::Color3::g |
float G3D::Color3::r |
Channel value.