|
AGX Dynamics 2.42.3.0
|
Utility color class with "common colors". More...
#include <Color.h>
Inheritance diagram for agxRender::Color:Public Member Functions | |
| Color () | |
| Default constructor. Set color to 0,0,0,1. | |
| Color (const agx::Vec3f &color, float a=1.f) | |
| Constructor. | |
| Color (const agx::Vec4d &color) | |
| Color (const agx::Vec4f &color) | |
| Color (float c) | |
Constructor which set all elements of color to c. | |
| Color (float r, float g, float b, float a=1.f) | |
| Constructor. | |
| float & | a () |
| float | a () const |
| AGXPHYSICS_EXPORT agx::Vec4f | asHSV (bool hueInDegrees=false) const |
| agx::Vec4 | asVec4 () const |
| float & | b () |
| float | b () const |
| float & | g () |
| float | g () const |
| AGXPHYSICS_EXPORT Color | lerp (const Color &to, float t) const |
| Linear interpolation between this color to the other given time [0, 1]. | |
| operator agx::Vec3d () const | |
| operator agx::Vec3f () const | |
| operator agx::Vec4d () const | |
| Color & | operator= (const agx::Vec4f &other) |
| float & | r () |
| float | r () const |
Public Member Functions inherited from agx::Vec4T< T > | |
| Vec4T () | |
| Default constructor. | |
| Vec4T (const T v[4]) | |
| Constructor, initialize elements with the specified scalars. | |
| Vec4T (const Vec3T< T > &v3, T w) | |
Constructor, initialize the first three elements with v3 and the last with w. | |
| Vec4T (const Vec4T ©)=default | |
| Copy constructor. | |
| template<typename T2 > | |
| Vec4T (const Vec4T< T2 > ©) | |
| Copy constructor for other types. | |
| Vec4T (T r) | |
Constructor, fill all elements with scalar r. | |
| Vec4T (T x, T y, T z, T w) | |
| Constructor, initialize elements with the specified scalars. | |
| Vec3T< T > | asVec3 () const |
| void | clamp (const Vec4T &min, const Vec4T &max) |
| Clamp a vector between a lower and upper bound (per component). | |
| Real | distance (const Vec4T &v2) const |
| Real | distance2 (const Vec4T &v2) const |
| Real | distance2 (const Vec4T &v2) const |
| Real | distance2 (const Vec4T &v2) const |
| Real | distance2 (const Vec4T &v2) const |
| Real | distance2 (const Vec4T &v2) const |
| bool | equalsZero () const |
| bool | isFinite () const |
| bool | isNaN () const |
| bool | isValid () const |
| Real | length () const |
| Real | length2 () const |
| T | maxComponent () const |
| size_t | maxElement () const |
| T | minComponent () const |
| size_t | minElement () const |
| Real | normalize () |
| Normalize the vector so that it has length unity. | |
| bool | operator!= (const Vec4T &v) const |
| In-equality test. | |
| T | operator* (const Vec4T &rhs) const |
| const Vec4T | operator* (T rhs) const |
| Vec4T & | operator*= (T rhs) |
| const Vec4T | operator+ (const T &rhs) const |
| Binary vector add. | |
| const Vec4T | operator+ (const Vec4T &rhs) const |
| Binary vector add. | |
| Vec4T & | operator+= (const T &rhs) |
| Unary vector add. | |
| Vec4T & | operator+= (const Vec4T &rhs) |
| Unary vector add. | |
| const Vec4T | operator- () const |
| Negation operator. | |
| const Vec4T | operator- (const T &rhs) const |
| Binary vector subtract. | |
| const Vec4T | operator- (const Vec4T &rhs) const |
| Binary vector subtract. | |
| Vec4T & | operator-= (const T &rhs) |
| Unary vector subtract. | |
| Vec4T & | operator-= (const Vec4T &rhs) |
| Unary vector subtract. | |
| const Vec4T | operator/ (T rhs) const |
| Divide by scalar. | |
| Vec4T & | operator/= (T rhs) |
| bool | operator== (const Vec4T &v) const |
| Equality test. | |
| T & | operator[] (size_t i) |
| const T & | operator[] (size_t i) const |
| const Vec4T | operator| (const Vec4T &rhs) const |
| T * | ptr () |
| const T * | ptr () const |
| void | set (const Vec4T &rhs) |
Set the value of the vector with rhs. | |
| void | set (T value) |
Set all elements of the vector with scalar value value. | |
| void | set (T x, T y, T z, T w) |
| Set the elements of the vector. | |
| T & | w () |
| T | w () const |
| T & | x () |
| T | x () const |
| T & | y () |
| T | y () const |
| T & | z () |
| T | z () const |
Additional Inherited Members | |
Public Types inherited from agx::Vec4T< T > | |
| typedef T | Type |
Utility color class with "common colors".
Ref: http://kb.iu.edu/data/aetf.html
Stored as float [0..1]
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
Definition at line 94 of file Color.h.
References agx::Vec4T< T >::w().
|
inline |
Definition at line 93 of file Color.h.
References agx::Vec4T< T >::w().
Referenced by asVec4(), and operator agx::Vec4d().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| AGXPHYSICS_EXPORT agx::Vec4f agxRender::Color::asHSV | ( | bool | hueInDegrees = false | ) | const |
| hueInDegrees | - if true then h -> [0, 360), if false then h -> [0, 1) |
|
inline |
|
inlinestatic |
|
inline |
Definition at line 92 of file Color.h.
References agx::Vec4T< T >::z().
|
inline |
Definition at line 91 of file Color.h.
References agx::Vec4T< T >::z().
Referenced by asVec4(), operator agx::Vec3d(), operator agx::Vec3f(), and operator agx::Vec4d().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Visually distinct, deterministic color given a hash value, index or id.
| hash | - unique value (hash, id, index) to generate color for |
| a | - transparency component of the resulting color [0, 1] |
| h0 | - optional hue offset in the range [0, 1] to shift the entire color palette |
hash
|
static |
Create RGB color given HSV (Hue, Saturation, Value).
| h | - hue of the color |
| s | - saturation of the color |
| v | - value of the color |
| a | - color alpha (same as RGB and is not used in the HSV -> RGB conversion) |
| hueInDegrees | - if true then h is assumed to be [0, 360), if false then assumed [0, 1) |
h (Hue), s (Saturation) and v (Value) color as an RGB color
|
inlinestatic |
|
inline |
Definition at line 90 of file Color.h.
References agx::Vec4T< T >::y().
|
inline |
Definition at line 89 of file Color.h.
References agx::Vec4T< T >::y().
Referenced by asVec4(), operator agx::Vec3d(), operator agx::Vec3f(), and operator agx::Vec4d().
|
inlinestatic |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Linear interpolation between from color to the other given time [0, 1].
| AGXPHYSICS_EXPORT Color agxRender::Color::lerp | ( | const Color & | to, |
| float | t | ||
| ) | const |
Linear interpolation between this color to the other given time [0, 1].
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 111 of file Color.h.
References agx::Vec4T< T >::w(), agx::Vec4T< T >::x(), agx::Vec4T< T >::y(), and agx::Vec4T< T >::z().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
Definition at line 88 of file Color.h.
References agx::Vec4T< T >::x().
|
inline |
Definition at line 87 of file Color.h.
References agx::Vec4T< T >::x().
Referenced by asVec4(), operator agx::Vec3d(), operator agx::Vec3f(), and operator agx::Vec4d().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |