Atoms Crowd
7.0.0
|
#include <ImathColor.h>
Public Types | |
typedef T | BaseType |
Public Member Functions | |
template<class S > | |
ATOMSMATH_CONSTEXPR14 | Color4 (const Color4< S > &v) noexcept |
template<class S > | |
void | setValue (S x, S y, S z, S w) noexcept |
template<class S > | |
void | setValue (const Color4< S > &v) noexcept |
template<class S > | |
void | getValue (S &x, S &y, S &z, S &w) const noexcept |
template<class S > | |
void | getValue (Color4< S > &v) const noexcept |
template<class S > | |
constexpr bool | operator== (const Color4< S > &v) const noexcept |
template<class S > | |
constexpr bool | operator!= (const Color4< S > &v) const noexcept |
Constructors and Assignment | |
ATOMSMATH_HOSTDEVICE | Color4 () noexcept |
No initialization by default. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Color4 (T a) noexcept |
Initialize to (a a a a) | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Color4 (T a, T b, T c, T d) noexcept |
Initialize to (a b c d) | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Color4 (const Color4 &v) noexcept |
Construct from Color4. | |
template<class S > | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Color4 (const Color4< S > &v) noexcept |
Construct from Color4. | |
~Color4 ()=default | |
Destructor. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color4 & | operator= (const Color4 &v) noexcept |
Assignment. | |
ATOMSMATH_HOSTDEVICE T & | operator[] (int i) noexcept |
Component-wise value. | |
ATOMSMATH_HOSTDEVICE const T & | operator[] (int i) const noexcept |
Component-wise value. | |
Arithmetic and Comparison | |
template<class S > | |
constexpr ATOMSMATH_HOSTDEVICE bool | operator== (const Color4< S > &v) const noexcept |
Equality. | |
template<class S > | |
constexpr ATOMSMATH_HOSTDEVICE bool | operator!= (const Color4< S > &v) const noexcept |
Inequality. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color4 & | operator+= (const Color4 &v) noexcept |
Component-wise addition. | |
constexpr ATOMSMATH_HOSTDEVICE Color4 | operator+ (const Color4 &v) const noexcept |
Component-wise addition. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color4 & | operator-= (const Color4 &v) noexcept |
Component-wise subtraction. | |
constexpr ATOMSMATH_HOSTDEVICE Color4 | operator- (const Color4 &v) const noexcept |
Component-wise subtraction. | |
constexpr ATOMSMATH_HOSTDEVICE Color4 | operator- () const noexcept |
Component-wise multiplication by -1. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color4 & | negate () noexcept |
Component-wise multiplication by -1. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color4 & | operator*= (const Color4 &v) noexcept |
Component-wise multiplication. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color4 & | operator*= (T a) noexcept |
Component-wise multiplication. | |
constexpr ATOMSMATH_HOSTDEVICE Color4 | operator* (const Color4 &v) const noexcept |
Component-wise multiplication. | |
constexpr ATOMSMATH_HOSTDEVICE Color4 | operator* (T a) const noexcept |
Component-wise multiplication. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color4 & | operator/= (const Color4 &v) noexcept |
Component-wise division. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 const Color4 & | operator/= (T a) noexcept |
Component-wise division. | |
constexpr ATOMSMATH_HOSTDEVICE Color4 | operator/ (const Color4 &v) const noexcept |
Component-wise division. | |
constexpr ATOMSMATH_HOSTDEVICE Color4 | operator/ (T a) const noexcept |
Component-wise division. | |
Compatibilty with Sb | |
template<class S > | |
ATOMSMATH_HOSTDEVICE void | setValue (S a, S b, S c, S d) noexcept |
Set the value. | |
template<class S > | |
ATOMSMATH_HOSTDEVICE void | setValue (const Color4< S > &v) noexcept |
Set the value. | |
template<class S > | |
ATOMSMATH_HOSTDEVICE void | getValue (S &a, S &b, S &c, S &d) const noexcept |
Return the value. | |
template<class S > | |
ATOMSMATH_HOSTDEVICE void | getValue (Color4< S > &v) const noexcept |
Return the value. | |
ATOMSMATH_HOSTDEVICE T * | getValue () noexcept |
Return raw pointer to the value. | |
ATOMSMATH_HOSTDEVICE const T * | getValue () const noexcept |
Return raw pointer to the value. | |
Static Public Member Functions | |
Numeric Limits | |
constexpr static ATOMSMATH_HOSTDEVICE unsigned int | dimensions () noexcept |
Number of dimensions (channels), i.e. 4 for a Color4. | |
constexpr static ATOMSMATH_HOSTDEVICE T | baseTypeLowest () noexcept |
Largest possible negative value. | |
constexpr static ATOMSMATH_HOSTDEVICE T | baseTypeMax () noexcept |
Largest possible positive value. | |
constexpr static ATOMSMATH_HOSTDEVICE T | baseTypeSmallest () noexcept |
Smallest possible positive value. | |
constexpr static ATOMSMATH_HOSTDEVICE T | baseTypeEpsilon () noexcept |
Smallest possible e for which 1+e != 1. | |
Public Attributes | |
Direct access to elements | |
T | r |
T | g |
T | b |
T | a |
A 4-channel color class: 3 channels plus alpha.
For convenience, the fields are named r
, g
, and b
, although this class does not impose interpretation on the channels, which can represent either rgb or hsv color values.
The base type: In templates that accept a parameter V
(could be a Color4), you can refer to T
as V::BaseType