#include <Vector4.h>
Public Member Functions | |
Vector4 (const Type &x=0, const Type &y=0, const Type &z=0, const Type &w=1) | |
const Type | getLength () const |
const Type | getSquaredLength () const |
const Vector4< Type > & | normalize () |
Vector4< Type > | getNormalized () const |
Related Functions | |
(Note that these are not member functions.) | |
template<class Type > | |
bool | equals (const Vector4< Type > &lhs, const Vector4< Type > &rhs, double fEpsilon=EPSILON) |
template<class Type > | |
bool | operator== (const Vector4< Type > &lhs, const Vector4< Type > &rhs) |
template<class Type > | |
bool | operator!= (const Vector4< Type > &lhs, const Vector4< Type > &rhs) |
template<class Type > | |
std::ostream & | operator<< (std::ostream &stream, const Vector4< Type > &vec) |
template<class Type > | |
std::istream & | operator>> (std::istream &stream, Vector4< Type > &vec) |
This represents a 4-dimensional vector
ARSTD::Vector4< Type >::Vector4 | ( | const Type & | x = 0 , |
const Type & | y = 0 , |
||
const Type & | z = 0 , |
||
const Type & | w = 1 |
||
) |
Constructs a vector from given components
x | x-component |
y | y-component |
z | z-component |
w | w-component |
const Type ARSTD::Vector4< Type >::getLength | ( | ) | const |
Returns the length
Vector4< Type > ARSTD::Vector4< Type >::getNormalized | ( | ) | const |
Returns the normalized version of this vector
const Type ARSTD::Vector4< Type >::getSquaredLength | ( | ) | const |
Returns the squared length
const Vector4< Type > & ARSTD::Vector4< Type >::normalize | ( | ) |
Normalizes the vector to a length of 1
|
related |
Compares two vectors with the epsilon given by the parameter fEpsilon
|
related |
Compares two matrices using default EPSILON
|
related |
Writes the vector to a std output stream
|
related |
Compares two matrices using default EPSILON
|
related |
Reads the vector from a std input stream