modm API documentation
modm::Vector< T, 4 > Class Template Reference

Class for handling common vector operations (4D) More...

#include <modm/math/geometry/vector4.hpp>

Public Member Functions

 Vector (T inVal)
 
 Vector (T inX, T inY, T inZ, T inW)
 
 Vector (const Vector< T, 1 > &inX, const Vector< T, 1 > &inY, const Vector< T, 1 > &inZ, const Vector< T, 1 > &inW)
 
 Vector (const Vector< T, 1 > &inX, const Vector< T, 1 > &inY, const Vector< T, 1 > &inZ, const T &inW)
 
 Vector (const Vector< T, 1 > &inX, const Vector< T, 1 > &inY, const T &inZ, const T &inW)
 
 Vector (const Vector< T, 1 > &inX, const T &inY, const Vector< T, 1 > &inZ, const T &inW)
 
 Vector (const T &inX, const Vector< T, 1 > &inY, const Vector< T, 1 > &inZ, const T &inW)
 
 Vector (const Vector< T, 1 > &inX, const T &inY, const T &inZ, const T &inW)
 
 Vector (const T &inX, const Vector< T, 1 > &inY, const T &inZ, const T &inW)
 
 Vector (const Vector< T, 1 > &inX, const Vector< T, 1 > &inY, const T &inZ, const Vector< T, 1 > &inW)
 
 Vector (const Vector< T, 1 > &inX, const T &inY, const T &inZ, const Vector< T, 1 > &inW)
 
 Vector (const T &inX, const Vector< T, 1 > &inY, const T &inZ, const Vector< T, 1 > &inW)
 
 Vector (const T &inX, const T &inY, const T &inZ, const Vector< T, 1 > &inW)
 
 Vector (const Vector< T, 1 > &inX, const T &inY, const Vector< T, 1 > &inZ, const Vector< T, 1 > &inW)
 
 Vector (const T &inX, const T &inY, const Vector< T, 1 > &inZ, const Vector< T, 1 > &inW)
 
 Vector (const T &inX, const Vector< T, 1 > &inY, const Vector< T, 1 > &inZ, const Vector< T, 1 > &inW)
 
 Vector (const Vector< T, 2 > &inXY, const Vector< T, 1 > &inZ, const Vector< T, 1 > &inW)
 
 Vector (const Vector< T, 2 > &inXY, const Vector< T, 1 > &inZ, const T &inW)
 
 Vector (const Vector< T, 2 > &inXY, const T &inZ, const T &inW)
 
 Vector (const Vector< T, 2 > &inXY, const T &inZ, const Vector< T, 1 > &inW)
 
 Vector (const Vector< T, 1 > &inX, const Vector< T, 2 > &inYZ, const Vector< T, 1 > &inW)
 
 Vector (const Vector< T, 1 > &inX, const Vector< T, 2 > &inYZ, const T &inW)
 
 Vector (const T &inX, const Vector< T, 2 > &inYZ, const T &inW)
 
 Vector (const T &inX, const Vector< T, 2 > &inYZ, const Vector< T, 1 > &inW)
 
 Vector (const Vector< T, 1 > &inX, const Vector< T, 1 > &inY, const Vector< T, 2 > &inZW)
 
 Vector (const Vector< T, 1 > &inX, const T &inY, const Vector< T, 2 > &inZW)
 
 Vector (const T &inX, const T &inY, const Vector< T, 2 > &inZW)
 
 Vector (const T &inX, const Vector< T, 1 > &inY, const Vector< T, 2 > &inZW)
 
 Vector (const Vector< T, 2 > &inXY, const Vector< T, 2 > &inZW)
 
 Vector (const Vector< T, 3 > &inXYZ, const Vector< T, 1 > &inW)
 
 Vector (const Vector< T, 3 > &inXYZ, const T &inW)
 
 Vector (const Vector< T, 1 > &inX, const Vector< T, 3 > &inYZW)
 
 Vector (const T &inX, const Vector< T, 3 > &inYZW)
 
 Vector (const Matrix< T, 4, 1 > &rhs)
 
void set (const T &x, const T &y, const T &z, const T &w)
 
void setX (const T &value)
 
void setY (const T &value)
 
void setZ (const T &value)
 
void setW (const T &value)
 
const T & getX () const
 
const T & getY () const
 
const T & getZ () const
 
const T & getW () const
 
Vectoroperator= (const Matrix< T, 4, 1 > &rhs)
 
bool operator== (const Vector &rhs) const
 
bool operator!= (const Vector &rhs) const
 
bool operator< (const Vector &rhs) const
 
bool operator<= (const Vector &rhs) const
 
bool operator> (const Vector &rhs) const
 
bool operator>= (const Vector &rhs) const
 
const T & operator[] (uint8_t index) const
 
T & operator[] (uint8_t index)
 
T * ptr ()
 
const T * ptr () const
 
Vector operator- () const
 
Vector operator+ (const Vector &rhs) const
 
Vector operator- (const Vector &rhs) const
 
operator* (const Vector &rhs) const
 
Vector operator* (const T &rhs) const
 
Vector operator/ (const T &rhs) const
 
Vectoroperator+= (const Vector &rhs)
 
Vectoroperator-= (const Vector &rhs)
 
Vectoroperator*= (const T &rhs)
 
Vectoroperator/= (const T &rhs)
 
float getLength () const
 
float getLengthSquared () const
 
void scale (float newLength)
 
Vector scaled (float newLength) const
 
void normalize ()
 
Vector normalized () const
 
Matrix< T, 4, 1 > & asMatrix ()
 
const Matrix< T, 4, 1 > & asMatrix () const
 
Matrix< T, 1, 4 > & asTransposedMatrix ()
 
const Matrix< T, 1, 4 > & asTransposedMatrix () const
 

Public Attributes

x
 
y
 
z
 
w
 

Detailed Description

template<typename T>
class modm::Vector< T, 4 >

Class for handling common vector operations (4D)

  • : addition of points

: different of points

  • : dot product or scalar multiplication / : scalar division

Adapted from the implementation of Gaspard Petit (gaspardpetit@gmail.com).

See also
<a href"http://www-etud.iro.umontreal.ca/~petitg/cpp/point.html">Homepage
Author
Niklas Hauser

The documentation for this class was generated from the following file: