T Generic x, y, z, w vector. More...
#include <ignition/math/Vector4.hh>
Public Member Functions | |
Vector4 () | |
Constructor. More... | |
Vector4 (const T &_x, const T &_y, const T &_z, const T &_w) | |
Constructor with component values. More... | |
Vector4 (const Vector4< T > &_v) | |
Copy constructor. More... | |
virtual | ~Vector4 () |
Destructor. More... | |
T | Distance (const Vector4< T > &_pt) const |
Calc distance to the given point. More... | |
bool | IsFinite () const |
See if a point is finite (e.g., not nan) More... | |
T | Length () const |
Returns the length (magnitude) of the vector. More... | |
void | Normalize () |
Normalize the vector length. More... | |
bool | operator!= (const Vector4< T > &_pt) const |
Not equal to operator. More... | |
const Vector4< T > | operator* (const Vector4< T > &_pt) const |
Multiplication operator. More... | |
const Vector4< T > | operator* (const Matrix4< T > &_m) const |
Matrix multiplication operator. More... | |
const Vector4< T > | operator* (T _v) const |
Multiplication operators. More... | |
const Vector4< T > & | operator*= (const Vector4< T > &_pt) |
Multiplication assignment operator. More... | |
const Vector4< T > & | operator*= (T _v) |
Multiplication assignment operator. More... | |
Vector4< T > | operator+ (const Vector4< T > &_v) const |
Addition operator. More... | |
const Vector4< T > & | operator+= (const Vector4< T > &_v) |
Addition operator. More... | |
Vector4< T > | operator- (const Vector4< T > &_v) const |
Subtraction operator. More... | |
const Vector4< T > & | operator-= (const Vector4< T > &_v) |
Subtraction assigment operators. More... | |
const Vector4< T > | operator/ (const Vector4< T > &_v) const |
Division assignment operator. More... | |
const Vector4< T > | operator/ (T _v) const |
Division assignment operator. More... | |
const Vector4< T > & | operator/= (const Vector4< T > &_v) |
Division assignment operator. More... | |
const Vector4< T > & | operator/= (T _v) |
Division operator. More... | |
Vector4< T > & | operator= (const Vector4< T > &_v) |
Assignment operator. More... | |
Vector4< T > & | operator= (T _value) |
Assignment operator. More... | |
bool | operator== (const Vector4< T > &_v) const |
Equal to operator. More... | |
T | operator[] (size_t _index) const |
Array subscript operator. More... | |
void | Set (T _x=0, T _y=0, T _z=0, T _w=0) |
Set the contents of the vector. More... | |
T | SquaredLength () const |
Return the square of the length (magnitude) of the vector. More... | |
T | W () const |
Get the w value. More... | |
void | W (const T &_v) |
Set the w value. More... | |
T | X () const |
Get the x value. More... | |
void | X (const T &_v) |
Set the x value. More... | |
T | Y () const |
Get the y value. More... | |
void | Y (const T &_v) |
Set the y value. More... | |
T | Z () const |
Get the z value. More... | |
void | Z (const T &_v) |
Set the z value. More... | |
Static Public Attributes | |
static const Vector4< T > | One |
math::Vector3(1, 1, 1) More... | |
static const Vector4< T > | Zero |
math::Vector3(0, 0, 0) More... | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const ignition::math::Vector4< T > &_pt) |
Stream insertion operator. More... | |
std::istream & | operator>> (std::istream &_in, ignition::math::Vector4< T > &_pt) |
Stream extraction operator. More... | |
T Generic x, y, z, w vector.
|
inline |
Constructor.
|
inline |
Constructor with component values.
[in] | _x | value along x axis |
[in] | _y | value along y axis |
[in] | _z | value along z axis |
[in] | _w | value along w axis |
|
inline |
Copy constructor.
[in] | _v | vector |
|
inlinevirtual |
Destructor.
|
inline |
Calc distance to the given point.
[in] | _pt | the point |
|
inline |
See if a point is finite (e.g., not nan)
|
inline |
Returns the length (magnitude) of the vector.
Referenced by ignition::math::Vector4< T >::Normalize().
|
inline |
Normalize the vector length.
References ignition::math::Vector4< T >::Length().
|
inline |
Not equal to operator.
[in] | _pt | the other vector |
|
inline |
Multiplication operator.
[in] | _pt | another vector |
|
inline |
Matrix multiplication operator.
[in] | _m | matrix |
|
inline |
Multiplication operators.
[in] | _v | scaling factor |
|
inline |
Multiplication assignment operator.
[in] | _pt | a vector |
|
inline |
Multiplication assignment operator.
[in] | _v | scaling factor |
|
inline |
Addition operator.
[in] | _v | the vector to add |
|
inline |
Addition operator.
[in] | _v | the vector to add |
|
inline |
Subtraction operator.
[in] | _v | the vector to substract |
|
inline |
Subtraction assigment operators.
[in] | _v | the vector to substract |
|
inline |
Division assignment operator.
[in] | _v | the vector to perform element wise division with |
|
inline |
Division assignment operator.
[in] | _pt | another vector |
|
inline |
Division assignment operator.
[in] | _v | the vector to perform element wise division with |
|
inline |
Division operator.
[in] | _v | scaling factor |
|
inline |
Assignment operator.
[in] | _v | the vector |
|
inline |
Assignment operator.
[in] | _value |
|
inline |
Equal to operator.
[in] | _v | the other vector |
References ignition::math::equal().
|
inline |
Array subscript operator.
[in] | _index | The index, where 0 == x, 1 == y, 2 == z, 3 == w. |
IndexException | if _index is >= 4. |
|
inline |
Set the contents of the vector.
[in] | _x | value along x axis |
[in] | _y | value along y axis |
[in] | _z | value along z axis |
[in] | _w | value along w axis |
|
inline |
Return the square of the length (magnitude) of the vector.
|
inline |
Get the w value.
|
inline |
Set the w value.
[in] | _v | Value for the w component. |
|
inline |
Get the x value.
|
inline |
Set the x value.
[in] | _v | Value for the x component. |
|
inline |
Get the y value.
|
inline |
Set the y value.
[in] | _v | Value for the y component. |
|
inline |
Get the z value.
|
inline |
Set the z value.
[in] | _v | Value for the z component. |
|
friend |
Stream insertion operator.
[in] | _out | output stream |
[in] | _pt | Vector4 to output |
|
friend |
Stream extraction operator.
[in] | _in | input stream |
[in] | _pt | Vector4 to read values into |
|
static |
math::Vector3(1, 1, 1)
|
static |
math::Vector3(0, 0, 0)