|
HDK
|
#include <ImathColor.h>
Inheritance diagram for Color4< T >:Public Types | |
| typedef T | BaseType |
Public Types inherited from VectorN< Color4, float, 4 > | |
| using | Iterator = typename std::array< float, N >::iterator |
| using | ConstIterator = typename std::array< float, N >::const_iterator |
Public Member Functions | |
| Color4 ()=default | |
| Color4 (float r, float g, float b, float a) | |
Constructors and Assignment | |
| IMATH_HOSTDEVICE | Color4 () IMATH_NOEXCEPT |
| No initialization by default. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Color4 (T a) IMATH_NOEXCEPT |
Initialize to (a a a a) More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Color4 (T a, T b, T c, T d) IMATH_NOEXCEPT |
Initialize to (a b c d) More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Color4 (const Color4 &v) IMATH_NOEXCEPT |
| Construct from Color4. More... | |
| template<class S > | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Color4 (const Color4< S > &v) IMATH_NOEXCEPT |
| Construct from Color4. More... | |
| ~Color4 ()=default | |
| Destructor. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & | operator= (const Color4 &v) IMATH_NOEXCEPT |
| Assignment. More... | |
| IMATH_HOSTDEVICE T & | operator[] (int i) IMATH_NOEXCEPT |
| Component-wise value. More... | |
| IMATH_HOSTDEVICE const T & | operator[] (int i) const IMATH_NOEXCEPT |
| Component-wise value. More... | |
Arithmetic and Comparison | |
| template<class S > | |
| IMATH_HOSTDEVICE constexpr bool | operator== (const Color4< S > &v) const IMATH_NOEXCEPT |
| Equality. More... | |
| template<class S > | |
| IMATH_HOSTDEVICE constexpr bool | operator!= (const Color4< S > &v) const IMATH_NOEXCEPT |
| Inequality. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & | operator+= (const Color4 &v) IMATH_NOEXCEPT |
| Component-wise addition. More... | |
| IMATH_HOSTDEVICE constexpr Color4 | operator+ (const Color4 &v) const IMATH_NOEXCEPT |
| Component-wise addition. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & | operator-= (const Color4 &v) IMATH_NOEXCEPT |
| Component-wise subtraction. More... | |
| IMATH_HOSTDEVICE constexpr Color4 | operator- (const Color4 &v) const IMATH_NOEXCEPT |
| Component-wise subtraction. More... | |
| IMATH_HOSTDEVICE constexpr Color4 | operator- () const IMATH_NOEXCEPT |
| Component-wise multiplication by -1. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & | negate () IMATH_NOEXCEPT |
| Component-wise multiplication by -1. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & | operator*= (const Color4 &v) IMATH_NOEXCEPT |
| Component-wise multiplication. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & | operator*= (T a) IMATH_NOEXCEPT |
| Component-wise multiplication. More... | |
| IMATH_HOSTDEVICE constexpr Color4 | operator* (const Color4 &v) const IMATH_NOEXCEPT |
| Component-wise multiplication. More... | |
| IMATH_HOSTDEVICE constexpr Color4 | operator* (T a) const IMATH_NOEXCEPT |
| Component-wise multiplication. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & | operator/= (const Color4 &v) IMATH_NOEXCEPT |
| Component-wise division. More... | |
| IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Color4 & | operator/= (T a) IMATH_NOEXCEPT |
| Component-wise division. More... | |
| IMATH_HOSTDEVICE constexpr Color4 | operator/ (const Color4 &v) const IMATH_NOEXCEPT |
| Component-wise division. More... | |
| IMATH_HOSTDEVICE constexpr Color4 | operator/ (T a) const IMATH_NOEXCEPT |
| Component-wise division. More... | |
Compatibilty with Sb | |
| template<class S > | |
| IMATH_HOSTDEVICE void | setValue (S a, S b, S c, S d) IMATH_NOEXCEPT |
| Set the value. More... | |
| template<class S > | |
| IMATH_HOSTDEVICE void | setValue (const Color4< S > &v) IMATH_NOEXCEPT |
| Set the value. More... | |
| template<class S > | |
| IMATH_HOSTDEVICE void | getValue (S &a, S &b, S &c, S &d) const IMATH_NOEXCEPT |
| Return the value. More... | |
| template<class S > | |
| IMATH_HOSTDEVICE void | getValue (Color4< S > &v) const IMATH_NOEXCEPT |
| Return the value. More... | |
| IMATH_HOSTDEVICE T * | getValue () IMATH_NOEXCEPT |
| Return raw pointer to the value. More... | |
| IMATH_HOSTDEVICE const T * | getValue () const IMATH_NOEXCEPT |
| Return raw pointer to the value. More... | |
Public Member Functions inherited from VectorN< Color4, float, 4 > | |
| VectorN () | |
| VectorN (Uninit) | |
| VectorN (floats) | |
| VectorN (const std::array< float, N > &arr) | |
| VectorN (const vector< float > &vec) | |
| VectorN (const float *begin, const float *end) | |
| bool | operator== (const Color4 &rhs) const |
| Return true if the given vector is identical to this one. More... | |
| bool | operator!= (const Color4 &rhs) const |
| Return true if the given vector differs from this one. More... | |
| bool | operator< (const Color4 &rhs) const |
| Compare two vectors lexicographically. More... | |
| float & | operator[] (size_t i) |
| Return the scalar value at the given index. More... | |
| const float & | operator[] (size_t i) const |
| Return the const scalar value at the given index. More... | |
| Color4 | operator+ (const Color4 &rhs) const |
| Component-wise addition of two vectors. More... | |
| Color4 | operator+ () const |
| Unary plus of a vector. Returns the unaltered vector. More... | |
| Color4 & | operator+= (const Color4 &rhs) |
| Component-wise addition of two vectors. More... | |
| Color4 | operator- (const Color4 &rhs) const |
| Component-wise subtraction of two vectors. More... | |
| Color4 | operator- () const |
| Unary negation of a vector. More... | |
| Color4 & | operator-= (const Color4 &rhs) |
| Component-wise subtraction of two vectors. More... | |
| Color4 | operator* (const Color4 &rhs) const |
| Component-wise multiplication of two vectors. More... | |
| Color4 | operator* (floats) const |
| Component-wise multiplication of a vector by a scalar. More... | |
| Color4 & | operator*= (const Color4 &rhs) |
| Component-wise multiplication of two vectors. More... | |
| Color4 & | operator*= (floats) |
| Component-wise multiplication of a vector by a scalar. More... | |
| Color4 | operator/ (const Color4 &rhs) const |
| Component-wise division of two vectors. More... | |
| Color4 | operator/ (floats) const |
| Component-wise division of a vector by a scalar. More... | |
| Color4 & | operator/= (const Color4 &rhs) |
| Component-wise division of two vectors. More... | |
| Color4 & | operator/= (floats) |
| Component-wise division of a vector by a scalar. More... | |
| float | getMagnitude () const |
| Return the magnitude of the vector. More... | |
| Color4 | getNormalized () const |
| Return a normalized vector. More... | |
| float | dot (const Color4 &rhs) const |
| Return the dot product of two vectors. More... | |
| Iterator | begin () |
| ConstIterator | begin () const |
| Iterator | end () |
| ConstIterator | end () const |
| float * | data () |
| Return a pointer to the underlying data array. More... | |
| const float * | data () const |
| Return a const pointer to the underlying data array. More... | |
Static Public Member Functions | |
Numeric Limits | |
| IMATH_HOSTDEVICE static constexpr unsigned int | dimensions () IMATH_NOEXCEPT |
| Number of dimensions (channels), i.e. 4 for a Color4. More... | |
| IMATH_HOSTDEVICE static constexpr T | baseTypeLowest () IMATH_NOEXCEPT |
| Largest possible negative value. More... | |
| IMATH_HOSTDEVICE static constexpr T | baseTypeMax () IMATH_NOEXCEPT |
| Largest possible positive value. More... | |
| IMATH_HOSTDEVICE static constexpr T | baseTypeSmallest () IMATH_NOEXCEPT |
| Smallest possible positive value. More... | |
| IMATH_HOSTDEVICE static constexpr T | baseTypeEpsilon () IMATH_NOEXCEPT |
| Smallest possible e for which 1+e != 1. More... | |
Static Public Member Functions inherited from VectorN< Color4, float, 4 > | |
| static constexpr size_t | numElements () |
| Return the number of scalar elements for the vector. More... | |
Public Attributes | |
Direct access to elements | |
| T | r |
| T | g |
| T | b |
| T | a |
Additional Inherited Members | |
Protected Attributes inherited from VectorN< Color4, float, 4 > | |
| std::array< float, N > | _arr |
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.
A four-component color value
Definition at line 127 of file ImathColor.h.
The base type: In templates that accept a parameter V (could be a Color4), you can refer to T as V::BaseType
Definition at line 277 of file ImathColor.h.
|
inline |
No initialization by default.
Definition at line 526 of file ImathColor.h.
|
inlineexplicit |
Initialize to (a a a a)
Definition at line 532 of file ImathColor.h.
|
inline |
Initialize to (a b c d)
Definition at line 538 of file ImathColor.h.
|
inline |
Construct from Color4.
Definition at line 549 of file ImathColor.h.
|
inline |
Construct from Color4.
Definition at line 559 of file ImathColor.h.
|
inlinestatic |
Smallest possible e for which 1+e != 1.
Definition at line 268 of file ImathColor.h.
|
inlinestatic |
Largest possible negative value.
Definition at line 250 of file ImathColor.h.
|
inlinestatic |
Largest possible positive value.
Definition at line 256 of file ImathColor.h.
|
inlinestatic |
Smallest possible positive value.
Definition at line 262 of file ImathColor.h.
|
inlinestatic |
Number of dimensions (channels), i.e. 4 for a Color4.
Definition at line 244 of file ImathColor.h.
|
inline |
Return the value.
Definition at line 604 of file ImathColor.h.
|
inline |
Return the value.
Definition at line 615 of file ImathColor.h.
|
inline |
Return raw pointer to the value.
Definition at line 625 of file ImathColor.h.
|
inline |
Return raw pointer to the value.
Definition at line 632 of file ImathColor.h.
|
inline |
Component-wise multiplication by -1.
Definition at line 698 of file ImathColor.h.
|
inline |
Inequality.
Definition at line 648 of file ImathColor.h.
|
inline |
Component-wise multiplication.
Definition at line 731 of file ImathColor.h.
|
inline |
Component-wise multiplication.
Definition at line 738 of file ImathColor.h.
|
inline |
Component-wise multiplication.
Definition at line 709 of file ImathColor.h.
|
inline |
Component-wise multiplication.
Definition at line 720 of file ImathColor.h.
|
inline |
Component-wise addition.
Definition at line 666 of file ImathColor.h.
|
inline |
Component-wise addition.
Definition at line 655 of file ImathColor.h.
|
inline |
Component-wise subtraction.
Definition at line 684 of file ImathColor.h.
|
inline |
Component-wise multiplication by -1.
Definition at line 691 of file ImathColor.h.
|
inline |
Component-wise subtraction.
Definition at line 673 of file ImathColor.h.
|
inline |
Component-wise division.
Definition at line 767 of file ImathColor.h.
|
inline |
Component-wise division.
Definition at line 774 of file ImathColor.h.
|
inline |
Component-wise division.
Definition at line 745 of file ImathColor.h.
|
inline |
Component-wise division.
Definition at line 756 of file ImathColor.h.
|
inline |
Assignment.
Definition at line 570 of file ImathColor.h.
|
inline |
Equality.
Definition at line 640 of file ImathColor.h.
|
inline |
Component-wise value.
Definition at line 514 of file ImathColor.h.
|
inline |
Component-wise value.
Definition at line 521 of file ImathColor.h.
|
inline |
Set the value.
Definition at line 582 of file ImathColor.h.
|
inline |
Set the value.
Definition at line 593 of file ImathColor.h.