|
TrueReality
v0.1.1912
|
General purpose 3D double Vector. More...
#include <Vec4d.h>
Public Types | |
| using | value_type = double |
| Data type of vector components. More... | |
Public Member Functions | |
| Vec4d () | |
| Default constructor. More... | |
| Vec4d (value_type x, value_type y, value_type z, value_type w) | |
| Constructor. More... | |
| Vec4d (const osg::Vec4d &v) | |
| Copy Constructor from osg::Vec to trBase::Vec. More... | |
| Vec4d (const osg::Vec4f &v) | |
| Copy Constructor from osg::Vec to trBase::Vec. More... | |
| const osg::Vec4d & | GetOSGVector () const |
| Returns the internal OSG vector. More... | |
| value_type | Length () const |
| Length of the vector = sqrt( vec . More... | |
| value_type | Length2 () const |
| Length squared of the vector = vec . More... | |
| value_type | Normalize () |
| Normalize the vector so that it has length unity. More... | |
| value_type & | X () |
| Returns the X component of the vector. More... | |
| value_type & | Y () |
| Returns the Y component of the vector. More... | |
| value_type & | Z () |
| Returns the Z component of the vector. More... | |
| value_type & | W () |
| Returns the W component of the vector. More... | |
| value_type | X () const |
| Returns the X component of the vector. More... | |
| value_type | Y () const |
| Returns the Y component of the vector. More... | |
| value_type | Z () const |
| Returns the Z component of the vector. More... | |
| value_type | W () const |
| Returns the W component of the vector. More... | |
| value_type & | R () |
| Returns the R component of the vector. More... | |
| value_type & | G () |
| Returns the G component of the vector. More... | |
| value_type & | B () |
| Returns the B component of the vector. More... | |
| value_type & | A () |
| Returns the A component of the vector. More... | |
| value_type | R () const |
| Returns the R component of the vector. More... | |
| value_type | G () const |
| Returns the G component of the vector. More... | |
| value_type | B () const |
| Returns the B component of the vector. More... | |
| value_type | A () const |
| Returns the A component of the vector. More... | |
| void | Set (value_type x, value_type y, value_type z, value_type w) |
| Sets the initial values of the vector. More... | |
| void | Set (const Vec4d &v) |
| Sets the initial values of the vector. More... | |
| void | SetRGBA (value_type r, value_type g, value_type b, value_type a) |
| Sets the initial values of the vector. More... | |
| void | Lerp (const Vec4d &to, value_type alpha) |
| Linear interpolation of this vector to a passed in vector. More... | |
| Vec4d | Lerp (const Vec4d &from, const Vec4d &to, value_type alpha) |
| Linear interpolation of two vectors. More... | |
| std::string | ToString (int precision=-1) |
| Convert this object into a string representation. More... | |
| value_type * | Ptr () |
| Pointer to the internal Vector array. More... | |
| const value_type * | Ptr () const |
| Pointer to the internal Vector array. More... | |
| value_type & | operator[] (int i) |
| Index operator. More... | |
| value_type | operator[] (int i) const |
| Index operator. More... | |
| void | operator= (const Vec4d &v) |
| Set operator. More... | |
| void | operator= (const Vec4f &v) |
| Set operator. More... | |
| void | operator= (const osg::Vec4d &v) |
| Set operator. More... | |
| bool | operator== (const Vec4d &v) const |
| Equality operator. More... | |
| bool | operator!= (const Vec4d &v) const |
| Inequality operator. More... | |
| bool | operator< (const Vec4d &v) const |
| Less than operator. More... | |
| bool | operator> (const Vec4d &v) const |
| Greater than operator. More... | |
| value_type | operator* (const Vec4d &rhs) const |
| Dot product operator. More... | |
| const Vec4d | operator* (value_type rhs) const |
| Scalar multiplication operator. More... | |
| Vec4d & | operator*= (value_type rhs) |
| Unary scalar multiplication operator. More... | |
| const Vec4d | operator/ (value_type rhs) const |
| Divide by scalar operator. More... | |
| Vec4d & | operator/= (value_type rhs) |
| Unary divide by scalar operator. More... | |
| const Vec4d | operator+ (const Vec4d &rhs) const |
| Binary vector add operator. More... | |
| Vec4d & | operator+= (const Vec4d &rhs) |
| Unary vector add operator. More... | |
| const Vec4d | operator- (const Vec4d &rhs) const |
| Binary vector subtraction operator. More... | |
| Vec4d & | operator-= (const Vec4d &rhs) |
| Unary vector subtraction operator. More... | |
| const Vec4d | operator- () const |
| Negation operator. More... | |
| operator osg::Vec4d () const | |
| Implicit conversion operator to OSG Vector. More... | |
| operator osg::Vec4d & () | |
| Implicit conversion operator to OSG Vector. More... | |
| operator const osg::Vec4d & () const | |
| Implicit conversion operator to OSG Vector. More... | |
| operator osg::Vec4d * () | |
| Implicit conversion operator to OSG Vector. More... | |
Static Public Attributes | |
| static const int | NUM_OF_COMPONENTS |
Protected Attributes | |
| osg::Vec4d | mVec |
| using trBase::Vec4d::value_type = double |
| trBase::Vec4d::Vec4d | ( | ) |
Default constructor.
| trBase::Vec4d::Vec4d | ( | value_type | x, |
| value_type | y, | ||
| value_type | z, | ||
| value_type | w | ||
| ) |
Constructor.
| x | The x component of the vector. |
| y | The y component of the vector. |
| z | The z component of the vector. |
| w | The w component of the vector. |
| trBase::Vec4d::Vec4d | ( | const osg::Vec4d & | v | ) |
Copy Constructor from osg::Vec to trBase::Vec.
| v | The osg::Vec4d to process. |
| trBase::Vec4d::Vec4d | ( | const osg::Vec4f & | v | ) |
| value_type& trBase::Vec4d::A | ( | ) |
Returns the A component of the vector.
| value_type trBase::Vec4d::A | ( | ) | const |
Returns the A component of the vector.
| value_type& trBase::Vec4d::B | ( | ) |
Returns the B component of the vector.
| value_type trBase::Vec4d::B | ( | ) | const |
Returns the B component of the vector.
| value_type& trBase::Vec4d::G | ( | ) |
Returns the G component of the vector.
| value_type trBase::Vec4d::G | ( | ) | const |
Returns the G component of the vector.
| const osg::Vec4d& trBase::Vec4d::GetOSGVector | ( | ) | const |
Returns the internal OSG vector.
| value_type trBase::Vec4d::Length | ( | ) | const |
Length of the vector = sqrt( vec .
vec )
| value_type trBase::Vec4d::Length2 | ( | ) | const |
Length squared of the vector = vec .
vec
| void trBase::Vec4d::Lerp | ( | const Vec4d & | to, |
| value_type | alpha | ||
| ) |
Linear interpolation of this vector to a passed in vector.
| to | The vector that we are interpolating to. |
| alpha | Amount of change (0-1). |
| Vec4d trBase::Vec4d::Lerp | ( | const Vec4d & | from, |
| const Vec4d & | to, | ||
| value_type | alpha | ||
| ) |
Linear interpolation of two vectors.
| from | The vector that we are interpolating from. |
| to | The vector that we are interpolating to. |
| alpha | Amount of change (0-1). |
| value_type trBase::Vec4d::Normalize | ( | ) |
Normalize the vector so that it has length unity.
Returns the previous length of the vector.
| trBase::Vec4d::operator const osg::Vec4d & | ( | ) | const |
Implicit conversion operator to OSG Vector.
| trBase::Vec4d::operator osg::Vec4d | ( | ) | const |
Implicit conversion operator to OSG Vector.
| trBase::Vec4d::operator osg::Vec4d & | ( | ) |
Implicit conversion operator to OSG Vector.
| trBase::Vec4d::operator osg::Vec4d * | ( | ) |
Implicit conversion operator to OSG Vector.
| bool trBase::Vec4d::operator!= | ( | const Vec4d & | v | ) | const |
Inequality operator.
| value_type trBase::Vec4d::operator* | ( | const Vec4d & | rhs | ) | const |
Dot product operator.
| const Vec4d trBase::Vec4d::operator* | ( | value_type | rhs | ) | const |
Scalar multiplication operator.
| Vec4d& trBase::Vec4d::operator*= | ( | value_type | rhs | ) |
Unary scalar multiplication operator.
Unary vector add operator.
Slightly more efficient because it has no temporary intermediate objects.
| const Vec4d trBase::Vec4d::operator- | ( | ) | const |
Negation operator.
Returns the negative of the Vec4d.
| const Vec4d trBase::Vec4d::operator/ | ( | value_type | rhs | ) | const |
Divide by scalar operator.
| Vec4d& trBase::Vec4d::operator/= | ( | value_type | rhs | ) |
Unary divide by scalar operator.
| bool trBase::Vec4d::operator< | ( | const Vec4d & | v | ) | const |
Less than operator.
| void trBase::Vec4d::operator= | ( | const Vec4d & | v | ) |
Set operator.
| void trBase::Vec4d::operator= | ( | const Vec4f & | v | ) |
Set operator.
Definition at line 40 of file Vec4d.cpp.
References mVec, trBase::Vec4f::W(), trBase::Vec4f::X(), trBase::Vec4f::Y(), and trBase::Vec4f::Z().

| void trBase::Vec4d::operator= | ( | const osg::Vec4d & | v | ) |
Set operator.
| bool trBase::Vec4d::operator== | ( | const Vec4d & | v | ) | const |
Equality operator.
| bool trBase::Vec4d::operator> | ( | const Vec4d & | v | ) | const |
Greater than operator.
| value_type& trBase::Vec4d::operator[] | ( | int | i | ) |
Index operator.
| value_type trBase::Vec4d::operator[] | ( | int | i | ) | const |
Index operator.
| value_type* trBase::Vec4d::Ptr | ( | ) |
Pointer to the internal Vector array.
| const value_type* trBase::Vec4d::Ptr | ( | ) | const |
Pointer to the internal Vector array.
| value_type& trBase::Vec4d::R | ( | ) |
Returns the R component of the vector.
| value_type trBase::Vec4d::R | ( | ) | const |
Returns the R component of the vector.
| void trBase::Vec4d::Set | ( | value_type | x, |
| value_type | y, | ||
| value_type | z, | ||
| value_type | w | ||
| ) |
Sets the initial values of the vector.
| void trBase::Vec4d::Set | ( | const Vec4d & | v | ) |
Sets the initial values of the vector.
| void trBase::Vec4d::SetRGBA | ( | value_type | r, |
| value_type | g, | ||
| value_type | b, | ||
| value_type | a | ||
| ) |
Sets the initial values of the vector.
| std::string trBase::Vec4d::ToString | ( | int | precision = -1 | ) |
Convert this object into a string representation.
| precision | (Optional) The precision. |
| value_type& trBase::Vec4d::W | ( | ) |
Returns the W component of the vector.
Referenced by trBase::Vec4f::operator=(), and trBase::Quat::Set().

| value_type trBase::Vec4d::W | ( | ) | const |
Returns the W component of the vector.
| value_type& trBase::Vec4d::X | ( | ) |
Returns the X component of the vector.
Referenced by trBase::Vec4f::operator=(), and trBase::Quat::Set().

| value_type trBase::Vec4d::X | ( | ) | const |
Returns the X component of the vector.
| value_type& trBase::Vec4d::Y | ( | ) |
Returns the Y component of the vector.
Referenced by trBase::Vec4f::operator=(), and trBase::Quat::Set().

| value_type trBase::Vec4d::Y | ( | ) | const |
Returns the Y component of the vector.
| value_type& trBase::Vec4d::Z | ( | ) |
Returns the Z component of the vector.
Referenced by trBase::Vec4f::operator=(), and trBase::Quat::Set().

| value_type trBase::Vec4d::Z | ( | ) | const |
Returns the Z component of the vector.
|
protected |
Definition at line 360 of file Vec4d.h.
Referenced by operator=().