|
AGXDynamics
2.31.1.0
|
Utility color class with "common colors". More...
#include <Color.h>
Inheritance diagram for agxRender::Color:Public Types | |
| typedef T | Type |
Public Member Functions | |
| Color () | |
| Default constructor. Set color to 0,0,0,1. More... | |
| Color (float r, float g, float b, float a=1.f) | |
| Constructor. More... | |
| Color (const agx::Vec3f &color, float a=1.f) | |
| Constructor. More... | |
| Color (float c) | |
Constructor which set all elements of color to c. More... | |
| float | a () const |
| float & | a () |
| AGXPHYSICS_EXPORT Color | asHSV () const |
| Vec3T< T > | asVec3 () const |
| agx::Vec4 | asVec4 () const |
| T | at (size_t i) |
| float | b () const |
| float & | b () |
| void | clamp (const Vec4T &min, const Vec4T &max) |
| Clamp a vector between a lower and upper bound (per component). More... | |
| Real | distance (const Vec4T &v2) const |
| Real | distance2 (const Vec4T &v2) const |
| template<> | |
| Real | distance2 (const Vec4T &v2) const |
| template<> | |
| Real | distance2 (const Vec4T &v2) const |
| template<> | |
| Real | distance2 (const Vec4T &v2) const |
| template<> | |
| Real | distance2 (const Vec4T &v2) const |
| bool | equalsZero () const |
| AGXPHYSICS_EXPORT void | fromHSV (float h, float s, float v) |
| Set the color as HSV (Hue, Saturation, Value) More... | |
| AGXPHYSICS_EXPORT void | fromHSV (const Color &hsv) |
| float | g () const |
| float & | g () |
| 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. More... | |
| operator agx::Vec3d () const | |
| operator agx::Vec3f () const | |
| operator agx::Vec4d () const | |
| bool | operator!= (const Vec4T &v) const |
| In-equality test. More... | |
| T | operator* (const Vec4T &rhs) const |
| const Vec4T | operator* (T rhs) const |
| Vec4T & | operator*= (T rhs) |
| const Vec4T | operator+ (const Vec4T &rhs) const |
| Binary vector add. More... | |
| const Vec4T | operator+ (const T &rhs) const |
| Binary vector add. More... | |
| Vec4T & | operator+= (const Vec4T &rhs) |
| Unary vector add. More... | |
| Vec4T & | operator+= (const T &rhs) |
| Unary vector add. More... | |
| const Vec4T | operator- (const Vec4T &rhs) const |
| Binary vector subtract. More... | |
| const Vec4T | operator- (const T &rhs) const |
| Binary vector subtract. More... | |
| const Vec4T | operator- () const |
| Negation operator. More... | |
| Vec4T & | operator-= (const Vec4T &rhs) |
| Unary vector subtract. More... | |
| Vec4T & | operator-= (const T &rhs) |
| Unary vector subtract. More... | |
| const Vec4T | operator/ (T rhs) const |
| Divide by scalar. More... | |
| Vec4T & | operator/= (T rhs) |
| bool | operator== (const Vec4T &v) const |
| Equality test. More... | |
| 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 |
| float | r () const |
| float & | r () |
| void | set (T x, T y, T z, T w) |
| Set the elements of the vector. More... | |
| void | set (T value) |
Set all elements of the vector with scalar value value. More... | |
| void | set (const Vec4T &rhs) |
Set the value of the vector with rhs. More... | |
| void | set (T val, size_t i) |
| Set the value of element i. Mainly for accessing vec4 in Lua. More... | |
| T & | w () |
| T | w () const |
| T & | x () |
| T | x () const |
| T & | y () |
| T | y () const |
| T & | z () |
| T | z () const |
Utility color class with "common colors".
Ref: http://kb.iu.edu/data/aetf.html
Stored as float [0..1]
|
inherited |
Definition at line 37 of file Vec4Template.h.
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
Definition at line 63 of file Color.h.
References agx::Vec4T< T >::w().
Referenced by asVec4(), and operator agx::Vec4d().
|
inline |
Definition at line 64 of file Color.h.
References agx::Vec4T< T >::w().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| AGXPHYSICS_EXPORT Color agxRender::Color::asHSV | ( | ) | const |
Referenced by asVec4().
|
inherited |
Definition at line 720 of file Vec4Template.h.
|
inline |
Definition at line 81 of file Color.h.
References a(), AGXPHYSICS_EXPORT, asHSV(), b(), fromHSV(), g(), getColor(), getNumColors(), HSVToRGB(), r(), and RGBToHSV().
|
inherited |
Definition at line 708 of file Vec4Template.h.
|
inlinestatic |
|
inline |
Definition at line 61 of file Color.h.
References agx::Vec4T< T >::z().
Referenced by asVec4(), operator agx::Vec3d(), operator agx::Vec3f(), and operator agx::Vec4d().
|
inline |
Definition at line 62 of file Color.h.
References agx::Vec4T< T >::z().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inherited |
Clamp a vector between a lower and upper bound (per component).
Definition at line 425 of file Vec4Template.h.
References agx::clamp().
Referenced by agx::clamp().
|
staticinherited |
Definition at line 377 of file Vec4Template.h.
References agx::max(), and agx::Vec4T< T >::Vec4T().
|
staticinherited |
Definition at line 371 of file Vec4Template.h.
References agx::min(), and agx::Vec4T< T >::Vec4T().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inherited |
Definition at line 687 of file Vec4Template.h.
References agx::Vec4T< T >::distance2().
|
inherited |
Definition at line 780 of file Vec4Template.h.
References agx::Vec4T< T >::length2().
Referenced by agx::Vec4T< T >::distance().
|
inherited |
Definition at line 788 of file Vec4Template.h.
References agx::Vec4T< T >::length2(), agx::max(), and agx::min().
|
inherited |
Definition at line 800 of file Vec4Template.h.
References agx::Vec4T< T >::length2(), agx::max(), and agx::min().
|
inherited |
Definition at line 812 of file Vec4Template.h.
References agx::Vec4T< T >::length2(), agx::max(), and agx::min().
|
inherited |
Definition at line 824 of file Vec4Template.h.
References agx::Vec4T< T >::length2(), agx::max(), and agx::min().
|
inlinestatic |
|
inherited |
Definition at line 435 of file Vec4Template.h.
References agx::equalsZero().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| AGXPHYSICS_EXPORT void agxRender::Color::fromHSV | ( | float | h, |
| float | s, | ||
| float | v | ||
| ) |
Set the color as HSV (Hue, Saturation, Value)
Referenced by asVec4().
| AGXPHYSICS_EXPORT void agxRender::Color::fromHSV | ( | const Color & | hsv | ) |
|
inlinestatic |
|
inline |
Definition at line 59 of file Color.h.
References agx::Vec4T< T >::y().
Referenced by asVec4(), operator agx::Vec3d(), operator agx::Vec3f(), and operator agx::Vec4d().
|
inline |
Definition at line 60 of file Color.h.
References agx::Vec4T< T >::y().
|
inlinestatic |
|
static |
Referenced by asVec4().
|
static |
Referenced by asVec4().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Convert a HSV color to RGB.
Referenced by asVec4().
|
inlinestatic |
|
inherited |
Definition at line 549 of file Vec4Template.h.
References agx::isFinite().
|
inherited |
Definition at line 543 of file Vec4Template.h.
References agx::isNaN().
Referenced by agx::Vec4T< T >::isValid().
|
inherited |
Definition at line 537 of file Vec4Template.h.
References agx::Vec4T< T >::isNaN().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inherited |
Definition at line 674 of file Vec4Template.h.
References agx::Vec4T< T >::length2().
Referenced by agx::Vec4T< T >::normalize().
|
inherited |
Definition at line 680 of file Vec4Template.h.
Referenced by agx::Vec4T< T >::distance2(), and agx::Vec4T< T >::length().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inherited |
Definition at line 389 of file Vec4Template.h.
References agx::max().
|
inherited |
Definition at line 410 of file Vec4Template.h.
References agx::absolute().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inherited |
Definition at line 383 of file Vec4Template.h.
References agx::min().
|
inherited |
Definition at line 395 of file Vec4Template.h.
References agx::absolute().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inherited |
Normalize the vector so that it has length unity.
Definition at line 694 of file Vec4Template.h.
References agx::Vec4T< T >::length().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inherited |
In-equality test.
Definition at line 364 of file Vec4Template.h.
|
inherited |
Definition at line 555 of file Vec4Template.h.
|
inherited |
rhs. Definition at line 570 of file Vec4Template.h.
References agx::Vec4T< T >::Vec4T().
|
inherited |
rhs Definition at line 577 of file Vec4Template.h.
|
inherited |
Binary vector add.
rhs Definition at line 604 of file Vec4Template.h.
References agx::Vec4T< T >::Vec4T().
|
inherited |
Binary vector add.
Definition at line 636 of file Vec4Template.h.
References agx::Vec4T< T >::Vec4T().
|
inherited |
Unary vector add.
Slightly more efficient because no temporary intermediate object.
Definition at line 610 of file Vec4Template.h.
|
inherited |
Unary vector add.
Slightly more efficient because no temporary intermediate object.
Definition at line 642 of file Vec4Template.h.
|
inherited |
Binary vector subtract.
Definition at line 620 of file Vec4Template.h.
References agx::Vec4T< T >::Vec4T().
|
inherited |
Binary vector subtract.
Definition at line 652 of file Vec4Template.h.
References agx::Vec4T< T >::Vec4T().
|
inherited |
Negation operator.
Returns the negative of the Vec4T.
Definition at line 668 of file Vec4Template.h.
References agx::Vec4T< T >::Vec4T().
|
inherited |
Unary vector subtract.
Definition at line 626 of file Vec4Template.h.
|
inherited |
Unary vector subtract.
Definition at line 658 of file Vec4Template.h.
|
inherited |
Divide by scalar.
Definition at line 587 of file Vec4Template.h.
References agx::Vec4T< T >::Vec4T().
|
inherited |
rhs. Definition at line 593 of file Vec4Template.h.
|
inherited |
Equality test.
Definition at line 358 of file Vec4Template.h.
|
inherited |
Definition at line 478 of file Vec4Template.h.
|
inherited |
Definition at line 484 of file Vec4Template.h.
|
inherited |
Definition at line 561 of file Vec4Template.h.
References agx::Vec4T< T >::Vec4T().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inherited |
Definition at line 442 of file Vec4Template.h.
|
inherited |
Definition at line 448 of file Vec4Template.h.
|
inlinestatic |
|
inline |
Definition at line 57 of file Color.h.
References agx::Vec4T< T >::x().
Referenced by asVec4(), operator agx::Vec3d(), operator agx::Vec3f(), and operator agx::Vec4d().
|
inline |
Definition at line 58 of file Color.h.
References agx::Vec4T< T >::x().
|
staticinherited |
min..max] Definition at line 726 of file Vec4Template.h.
References agx::random(), and agx::Vec4T< T >::Vec4T().
|
staticinherited |
min..max] Definition at line 732 of file Vec4Template.h.
References agx::random(), and agx::Vec4T< T >::Vec4T().
|
inlinestatic |
|
static |
Convert a rgb color to HSV.
Referenced by asVec4().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inherited |
Set the elements of the vector.
Definition at line 454 of file Vec4Template.h.
References agx::Vec4T< T >::w(), agx::Vec4T< T >::x(), agx::Vec4T< T >::y(), and agx::Vec4T< T >::z().
|
inherited |
Set all elements of the vector with scalar value value.
Definition at line 463 of file Vec4Template.h.
|
inherited |
Set the value of the vector with rhs.
Definition at line 469 of file Vec4Template.h.
|
inherited |
Set the value of element i. Mainly for accessing vec4 in Lua.
Definition at line 714 of file Vec4Template.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inherited |
Definition at line 508 of file Vec4Template.h.
Referenced by a(), agx::Matrix4x4T< T >::postMult(), agx::Matrix4x4T< T >::preMult(), agx::QuatT< Real >::QuatT(), agx::Vec4T< T >::set(), agx::QuatT< Real >::set(), and agx::Vec4T< T >::Vec4T().
|
inherited |
Definition at line 531 of file Vec4Template.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inherited |
Definition at line 490 of file Vec4Template.h.
Referenced by agx::Matrix4x4T< T >::postMult(), agx::Matrix4x4T< T >::preMult(), agx::QuatT< Real >::QuatT(), r(), agx::QuatT< Real >::set(), agx::Vec4T< T >::set(), and agx::Vec4T< T >::Vec4T().
|
inherited |
Definition at line 514 of file Vec4Template.h.
|
inherited |
Definition at line 496 of file Vec4Template.h.
Referenced by g(), agx::Matrix4x4T< T >::postMult(), agx::Matrix4x4T< T >::preMult(), agx::QuatT< Real >::QuatT(), agx::Vec4T< T >::set(), agx::QuatT< Real >::set(), and agx::Vec4T< T >::Vec4T().
|
inherited |
Definition at line 520 of file Vec4Template.h.
|
inlinestatic |
Definition at line 193 of file Color.h.
Referenced by agxOSG::setUniform().
|
inlinestatic |
|
inherited |
Definition at line 502 of file Vec4Template.h.
Referenced by b(), agx::Matrix4x4T< T >::postMult(), agx::Matrix4x4T< T >::preMult(), agx::QuatT< Real >::QuatT(), agx::Vec4T< T >::set(), agx::QuatT< Real >::set(), and agx::Vec4T< T >::Vec4T().
|
inherited |
Definition at line 525 of file Vec4Template.h.