60 Color4(
const class Color4unorm8& c);
66 Color4(
float r,
float g,
float b,
float a = 1.0);
79 return (
r == 0.0f) && (
g == 0.0f) && (
b == 0.0f) && (
a == 0.0f);
83 return (
r == 1.0f) && (
g == 1.0f) && (
b == 1.0f) && (
a == 1.0f);
156 inline float sum()
const {
157 return r + g + b +
a;
161 return (*
this) + (other - *
this) * a;
185 Color4
operator*(
const Color3& c3,
const Color4& c4);
209 r(r), g(g), b(b), a(a) {
234 return ((
float*)
this)[i];
240 Color4 dif = (*
this - other);
247 Color4 dif = (*
this - other);
264 return (
r == other.
r &&
g == other.
g &&
b == other.
b &&
a == other.
a);
270 return (
r != other.
r ||
g != other.
g ||
b != other.
b ||
a != other.
a);
275 return Color4(
r + other.
r,
g + other.
g,
b + other.
b,
a + other.
a);
280 return Color4(
r - other.
r,
g - other.
g,
b - other.
b,
a - other.
a);
286 return Color4(fScalar *
r, fScalar *
g, fScalar *
b, fScalar *
a);
298 return Color4(fScalar * other.
r, fScalar * other.
g,
299 fScalar * other.
b, fScalar * other.
a);
bool operator>=(const Color4 &) const
Color4 lerp(const Color4 &other, float a) const
Definition: Color4.h:160
bool operator==(const Color4 &rkVector) const
Definition: Color4.h:263
Color4 operator+(const Color4 &rkVector) const
Definition: Color4.h:274
Color4 & operator+=(const Color4 &rkVector)
Definition: Color4.h:304
Color4 operator/(float fScalar) const
Definition: Color4.cpp:144
static const Color4 & inf()
Definition: Color4.cpp:75
float a
Definition: Color4.h:97
Color4 & operator=(const Color4 &rkVector)
Definition: Color4.h:253
static size_t hashCode(const G3D::Color4 &key)
Definition: Color4.h:336
bool fuzzyEq(const Color4 &other) const
Definition: Color4.h:239
Color4 & operator-=(const Color4 &rkVector)
Definition: Color4.h:314
Any toAny() const
Definition: Color4.cpp:56
Definition: HashTrait.h:105
bool any(float x)
Definition: g3dmath.h:424
bool isOne() const
Definition: Color4.h:82
size_t hashCode() const
Definition: Color4.cpp:103
bool fuzzyNe(double a, double b)
Definition: g3dmath.h:861
T max(const T &x, const T &y)
Definition: g3dmath.h:320
Color4()
Definition: Color4.h:56
float b
Definition: Color4.h:97
T min(const T &x, const T &y)
Definition: g3dmath.h:305
float & operator[](int i) const
Definition: Color4.h:233
Easy loading and saving of human-readable configuration files.
Definition: Any.h:184
float g
Definition: Color3.h:139
float r
Definition: Color4.h:97
Color4 min(const Color4 &other) const
Definition: Color4.h:151
bool operator<(const Color4 &) const
bool fuzzyNe(const Color4 &other) const
Definition: Color4.h:246
bool operator!=(const Color4 &rkVector) const
Definition: Color4.h:269
Color4 & operator/=(float fScalar)
Definition: Color4.cpp:163
void serialize(class BinaryOutput &bo) const
Definition: Color4.cpp:134
static const Color4 & one()
Definition: Color4.cpp:63
static const Color4 & nan()
Definition: Color4.cpp:81
float r
Definition: Color3.h:139
Color4 & operator*=(const Color4 &c)
Definition: Color4.h:124
static Color4 fromARGB(uint32)
Definition: Color4.cpp:112
static const Color4 & clear()
Definition: Color4.cpp:87
bool operator<=(const Color4 &) const
bool isFinite() const
Definition: Color4.h:173
float g
Definition: Color4.h:97
Definition: BinaryOutput.h:52
Color4 max(const Color4 &other) const
Definition: Color4.h:147
bool isZero() const
Definition: Color4.h:78
Color3 rgb() const
Definition: Color4.h:99
Color4 operator-() const
Definition: Color4.h:291
const FieldDescriptor value
Definition: descriptor.h:1522
uint32_t uint32
Definition: g3dmath.h:168
std::string toString() const
Definition: Color4.cpp:182
void deserialize(class BinaryInput &bi)
Definition: Color4.cpp:126
static const Color4 & zero()
Definition: Color4.cpp:69
Color4 operator*(float fScalar) const
Definition: Color4.h:285
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857
G3D::Color3 operator*(float s, const G3D::Color3 &c)
Definition: Color3.h:275
bool isFinite(double x)
Definition: g3dmath.h:525
float sum() const
Definition: Color4.h:156
bool operator>(const Color4 &) const
Color3 bgr() const
Definition: Color4.h:177
float b
Definition: Color3.h:139