Support Forum G3D Web Page |
Do not subclass– this implementation makes assumptions about the memory layout.
More...
Public Member Functions | |
Color4 (const Any &any) | |
Color4 (DoNotInitialize dni) | |
Color4 () | |
Initializes to all zero More... | |
Color4 (const Color3 &c3, float a=1.0) | |
Color4 (const class Color4unorm8 &c) | |
Color4 (class BinaryInput &bi) | |
Color4 (const class Vector4 &v) | |
Color4 (float r, float g, float b, float a=1.0) | |
Color4 (float value[4]) | |
Color4 (const Color4 &other) | |
Initialize from another color. More... | |
Color3 | bgr () const |
void | deserialize (class BinaryInput &bi) |
bool | fuzzyEq (const Color4 &other) const |
bool | fuzzyNe (const Color4 &other) const |
size_t | hashCode () const |
bool | isFinite () const |
bool | isOne () const |
bool | isZero () const |
Color4 | lerp (const Color4 &other, float a) const |
Color4 | max (const Color4 &other) const |
Color4 | min (const Color4 &other) const |
bool | operator!= (const Color4 &rkVector) const |
Color4 | operator* (float fScalar) const |
Color4 | operator* (const Color4 &k) const |
Color4 & | operator*= (const Color4 &c) |
Color4 & | operator*= (float fScalar) |
Color4 | operator+ (const Color4 &rkVector) const |
Color4 & | operator+= (const Color4 &rkVector) |
Color4 | operator- (const Color4 &rkVector) const |
Color4 | operator- () const |
Color4 & | operator-= (const Color4 &rkVector) |
Color4 | operator/ (float fScalar) const |
Color4 | operator/ (const Color4 &c) const |
Color4 & | operator/= (const Color4 &c) |
Color4 & | operator/= (float fScalar) |
Color4 & | operator= (const Color4 &rkVector) |
bool | operator== (const Color4 &rkVector) const |
float & | operator[] (int i) const |
Color4 | pow (float other) const |
Applies the exponent to all channels, including the Color4::a channel. More... | |
Color3 | rgb () const |
void | serialize (class BinaryOutput &bo) const |
float | sum () const |
r + g + b + a More... | |
Any | toAny () const |
Converts the Color4 to an Any. More... | |
String | toString () const |
Static Public Member Functions | |
static const Color4 & | clear () |
static Color4 | fromARGB (uint32) |
Initialize from an HTML-style color (e.g. More... | |
static Color4 | fromASRGB (uint32) |
Initialize from an HTML-style color (e.g. More... | |
static const Color4 & | inf () |
static const Color4 & | nan () |
static const Color4 & | one () |
static const Color4 & | zero () |
Public Attributes | |
float | a |
float | b |
float | g |
float | r |
Channel values. More... | |
Friends | |
Color4 | operator* (double fScalar, const Color4 &rkVector) |
Do not subclass– this implementation makes assumptions about the memory layout.
G3D::Color4::Color4 | ( | const Any & | any | ) |
any | Must be in one of the following forms:
|
The alpha channel may be specified as "glossyExponent(n)" or "mirror()" as well as using a number, following UniversalBSDF::packGlossyExponent and UniversalBSDF::packedSpecularMirror conventions.
|
inline |
|
inline |
Initializes to all zero
Referenced by max(), min(), operator*(), operator+(), operator-(), operator/(), and pow().
|
inline |
G3D::Color4::Color4 | ( | const class Color4unorm8 & | c | ) |
G3D::Color4::Color4 | ( | class BinaryInput & | bi | ) |
G3D::Color4::Color4 | ( | const class Vector4 & | v | ) |
|
inline |
|
inline |
|
inline |
Initialize from another color.
|
inline |
|
static |
void G3D::Color4::deserialize | ( | class BinaryInput & | bi | ) |
Initialize from an HTML-style color (e.g.
0xFFFF0000 == RED)
Initialize from an HTML-style color (e.g.
0xFF0000 == RED) by converting from sRGB to RGB. The alpha channel is linear.
|
inline |
|
inline |
size_t G3D::Color4::hashCode | ( | ) | const |
Referenced by G3D::Texture::Encoding::hashCode(), and HashTrait< G3D::Color4 >::hashCode().
|
static |
|
inline |
|
inline |
|
inline |
Referenced by G3D::lerp().
Referenced by G3D::max().
Referenced by G3D::min().
|
static |
|
static |
Referenced by G3D::Texture::Encoding::writeMultiplyFirst().
|
inline |
|
inline |
|
inline |
|
inline |
Color4 G3D::Color4::operator/ | ( | float | fScalar | ) | const |
Color4& G3D::Color4::operator/= | ( | float | fScalar | ) |
|
inline |
|
inline |
|
inline |
Applies the exponent to all channels, including the Color4::a channel.
|
inline |
Referenced by G3D::MapComponent< Image >::convert().
void G3D::Color4::serialize | ( | class BinaryOutput & | bo | ) | const |
|
inline |
r + g + b + a
String G3D::Color4::toString | ( | ) | const |
|
static |
float G3D::Color4::a |
Referenced by G3D::GuiText::Element::color(), Color4(), fuzzyEq(), fuzzyNe(), isFinite(), isOne(), isZero(), lerp(), max(), min(), G3D::Texture::opaque(), operator!=(), operator*(), G3D::operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), G3D::GuiText::Element::outlineColor(), pow(), and sum().
float G3D::Color4::b |
Referenced by bgr(), Color4(), fuzzyEq(), fuzzyNe(), isFinite(), isOne(), isZero(), max(), min(), operator!=(), operator*(), G3D::operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), pow(), rgb(), and sum().
float G3D::Color4::g |
Referenced by bgr(), Color4(), fuzzyEq(), fuzzyNe(), isFinite(), isOne(), isZero(), max(), min(), operator!=(), operator*(), G3D::operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), pow(), rgb(), and sum().
float G3D::Color4::r |
Channel values.
Referenced by bgr(), Color4(), G3D::MapComponent< Image >::convert(), fuzzyEq(), fuzzyNe(), isFinite(), isOne(), isZero(), max(), min(), operator!=(), operator*(), G3D::operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), pow(), rgb(), and sum().