37 #ifndef INCLUDED_IMATHCOLOR_H 38 #define INCLUDED_IMATHCOLOR_H 259 std::ostream & operator << (std::ostream &s, const Color4<T> &v);
568 return (
const T *) &r;
576 return r == v.
r && g == v.
g && b == v.
b && a == v.
a;
584 return r != v.
r || g != v.
g || b != v.
b || a != v.
a;
602 return Color4 (r + v.
r, g + v.
g, b + v.
b, a + v.
a);
620 return Color4 (r - v.
r, g - v.
g, b - v.
b, a - v.
a);
627 return Color4 (-r, -g, -b, -a);
667 return Color4 (r * v.
r, g * v.
g, b * v.
b, a * v.
a);
674 return Color4 (r * x, g * x, b * x, a * x);
703 return Color4 (r / v.
r, g / v.
g, b / v.
b, a / v.
a);
710 return Color4 (r / x, g / x, b / x, a / x);
716 operator << (std::ostream &s, const Color4<T> &v)
718 return s <<
'(' << v.r <<
' ' << v.g <<
' ' << v.b <<
' ' << v.a <<
')';
725 template <
class S,
class T>
static T baseTypeEpsilon()
Definition: ImathColor.h:242
Color4 operator+(const Color4 &v) const
Definition: ImathColor.h:600
const Color3 & operator=(const Color3 &c)
Definition: ImathColor.h:328
static T baseTypeMax()
Definition: ImathColor.h:240
Color4< float > C4f
Definition: ImathColor.h:280
Color3< half > Color3h
Definition: ImathColor.h:272
Definition: ImathFrame.h:42
Definition: ImathColor.h:120
T r
Definition: ImathColor.h:128
T b
Definition: ImathColor.h:128
Color3 operator+(const Color3 &c) const
Definition: ImathColor.h:344
T BaseType
Definition: ImathColor.h:251
Color4< unsigned char > C4c
Definition: ImathColor.h:282
Color3< half > C3h
Definition: ImathColor.h:274
Color3()
Definition: ImathColor.h:292
Color4 operator*(const Color4 &v) const
Definition: ImathColor.h:665
Color3 operator*(const Color3 &c) const
Definition: ImathColor.h:397
Color3< unsigned char > Color3c
Definition: ImathColor.h:273
bool operator==(const Color4< S > &v) const
Definition: ImathColor.h:574
static T baseTypeSmallest()
Definition: ImathColor.h:241
Color4< half > Color4h
Definition: ImathColor.h:278
Color3< unsigned char > C3c
Definition: ImathColor.h:276
const Color4 & operator+=(const Color4 &v)
Definition: ImathColor.h:589
Color4< float > Color4f
Definition: ImathColor.h:277
static T baseTypeMin()
Definition: ImathColor.h:239
Color4()
Definition: ImathColor.h:459
Color4 operator/(const Color4 &v) const
Definition: ImathColor.h:701
bool operator!=(const Color4< S > &v) const
Definition: ImathColor.h:582
Color3< float > Color3f
Definition: ImathColor.h:271
const Color3 & operator*=(const Color3 &c)
Definition: ImathColor.h:381
unsigned int PackedColor
Definition: ImathColor.h:283
T a
Definition: ImathColor.h:128
static unsigned int dimensions()
Definition: ImathColor.h:232
const Color4 & operator*=(const Color4 &v)
Definition: ImathColor.h:643
const Color4 & operator=(const Color4 &v)
Definition: ImathColor.h:504
Color4< half > C4h
Definition: ImathColor.h:281
Color3< float > C3f
Definition: ImathColor.h:275
T * getValue()
Definition: ImathColor.h:559
T & operator[](int i)
Definition: ImathColor.h:445
Color3 operator-() const
Definition: ImathColor.h:366
const Color4 & negate()
Definition: ImathColor.h:632
const Color3 & operator-=(const Color3 &c)
Definition: ImathColor.h:351
Definition: ImathBox.h:67
Color4 operator-() const
Definition: ImathColor.h:625
Color4< T > operator*(S a, const Color4< T > &v)
Definition: ImathColor.h:727
const Color4 & operator-=(const Color4 &v)
Definition: ImathColor.h:607
const Color3 & operator+=(const Color3 &c)
Definition: ImathColor.h:336
Color3 operator/(const Color3 &c) const
Definition: ImathColor.h:427
Color4< unsigned char > Color4c
Definition: ImathColor.h:279
void setValue(S a, S b, S c, S d)
Definition: ImathColor.h:516
T g
Definition: ImathColor.h:128
const Color3 & operator/=(const Color3 &c)
Definition: ImathColor.h:411
Definition: ImathColor.h:53
const Color3 & negate()
Definition: ImathColor.h:373
const Color4 & operator/=(const Color4 &v)
Definition: ImathColor.h:679