10 #ifndef INCLUDED_IMATHCOLOR_H
11 #define INCLUDED_IMATHCOLOR_H
19 IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
261 template <
class T> std::ostream& operator<< (std::ostream&
s, const
Color4<
T>&
v);
574 return (
const T*) &
r;
582 return r ==
v.r &&
g ==
v.g &&
b ==
v.b &&
a ==
v.a;
590 return r !=
v.r ||
g !=
v.g ||
b !=
v.b ||
a !=
v.a;
721 operator<< (std::ostream& s, const Color4<T>&
v)
723 return s <<
'(' <<
v.r <<
' ' <<
v.g <<
' ' <<
v.b <<
' ' <<
v.a <<
')';
730 template <
class S,
class T>
737 IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
739 #endif // INCLUDED_IMATHCOLOR_H
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & operator*=(const Color4 &v) IMATH_NOEXCEPT
Component-wise multiplication.
IMATH_HOSTDEVICE void setValue(S a, S b, S c, S d) IMATH_NOEXCEPT
Set the value.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & operator=(const Color4 &v) IMATH_NOEXCEPT
Assignment.
IMATH_HOSTDEVICE static constexpr T baseTypeSmallest() IMATH_NOEXCEPT
Smallest possible positive value.
IMATH_HOSTDEVICE static constexpr T baseTypeLowest() IMATH_NOEXCEPT
Largest possible negative value.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color3 & operator=(const Color3 &c) IMATH_NOEXCEPT
Component-wise assignment.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color3 & operator+=(const Color3 &c) IMATH_NOEXCEPT
Component-wise addition.
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
imath_half_bits_t half
if we're in a C-only context, alias the half bits type to half
IMATH_HOSTDEVICE T * getValue() IMATH_NOEXCEPT
Return raw pointer to the value.
GLdouble GLdouble GLdouble z
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Vec3 & operator*=(const Vec3 &v) IMATH_NOEXCEPT
Component-wise multiplication.
GLboolean GLboolean GLboolean GLboolean a
unsigned int PackedColor
Packed 32-bit integer.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color3 & negate() IMATH_NOEXCEPT
Component-wise multiplication by -1.
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Vec3 & operator+=(const Vec3 &v) IMATH_NOEXCEPT
Component-wise addition.
__hostdev__ void setValue(uint32_t offset, bool v)
IMATH_HOSTDEVICE static constexpr T baseTypeMax() IMATH_NOEXCEPT
Largest possible positive value.
__hostdev__ float getValue(uint32_t i) const
IMATH_HOSTDEVICE constexpr bool operator==(const Color4< S > &v) const IMATH_NOEXCEPT
Equality.
IMATH_HOSTDEVICE constexpr Vec3 operator-() const IMATH_NOEXCEPT
Component-wise multiplication by -1.
IMATH_HOSTDEVICE constexpr Color3 operator+(const Color3 &c) const IMATH_NOEXCEPT
Component-wise addition.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color3 & operator*=(const Color3 &c) IMATH_NOEXCEPT
Component-wise multiplication.
IMATH_HOSTDEVICE Color3() IMATH_NOEXCEPT
No initialization by default.
IMATH_HOSTDEVICE constexpr bool operator!=(const Color4< S > &v) const IMATH_NOEXCEPT
Inequality.
IMATH_HOSTDEVICE constexpr Color3 operator-() const IMATH_NOEXCEPT
Component-wise multiplication by -1.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & operator+=(const Color4 &v) IMATH_NOEXCEPT
Component-wise addition.
IMATH_HOSTDEVICE constexpr Color3 operator*(const Color3 &c) const IMATH_NOEXCEPT
Component-wise multiplication.
IMATH_HOSTDEVICE T & operator[](int i) IMATH_NOEXCEPT
Component-wise value.
IMATH_HOSTDEVICE constexpr Vec3 operator+(const Vec3 &v) const IMATH_NOEXCEPT
Component-wise addition.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & operator-=(const Color4 &v) IMATH_NOEXCEPT
Component-wise subtraction.
IMATH_HOSTDEVICE constexpr Color4< T > operator*(S a, const Color4< T > &v) IMATH_NOEXCEPT
Reverse multiplication: S * Color4.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Vec3 & negate() IMATH_NOEXCEPT
Component-wise multiplication by -1.
GLboolean GLboolean GLboolean b
IMATH_HOSTDEVICE static constexpr T baseTypeEpsilon() IMATH_NOEXCEPT
Smallest possible e for which 1+e != 1.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color3 & operator/=(const Color3 &c) IMATH_NOEXCEPT
Component-wise division.
IMATH_HOSTDEVICE constexpr Color4 operator*(const Color4 &v) const IMATH_NOEXCEPT
Component-wise multiplication.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & negate() IMATH_NOEXCEPT
Component-wise multiplication by -1.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Vec3 & operator-=(const Vec3 &v) IMATH_NOEXCEPT
Component-wise subtraction.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & operator/=(const Color4 &v) IMATH_NOEXCEPT
Component-wise division.
IMATH_HOSTDEVICE constexpr Color4 operator+(const Color4 &v) const IMATH_NOEXCEPT
Component-wise addition.
#define IMATH_EXPORT_TEMPLATE_TYPE
IMATH_HOSTDEVICE constexpr Color3 operator/(const Color3 &c) const IMATH_NOEXCEPT
Component-wise division.
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GLubyte GLubyte GLubyte GLubyte w
IMATH_HOSTDEVICE Color4() IMATH_NOEXCEPT
No initialization by default.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Vec3 & operator=(const Vec3 &v) IMATH_NOEXCEPT
Assignment.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color3 & operator-=(const Color3 &c) IMATH_NOEXCEPT
Component-wise subtraction.
IMATH_HOSTDEVICE constexpr Color4 operator-() const IMATH_NOEXCEPT
Component-wise multiplication by -1.
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Vec3 & operator/=(const Vec3 &v) IMATH_NOEXCEPT
Component-wise division.
IMATH_HOSTDEVICE constexpr Vec3 operator*(const Vec3 &v) const IMATH_NOEXCEPT
Component-wise multiplication.
IMATH_HOSTDEVICE constexpr Vec3 operator/(const Vec3 &v) const IMATH_NOEXCEPT
Component-wise division.
IMATH_HOSTDEVICE constexpr Color4 operator/(const Color4 &v) const IMATH_NOEXCEPT
Component-wise division.