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