0.44.0
|
#include <iaVector2.h>
Public Member Functions | |
iaVector2 ()=default | |
iaVector2 (T x, T y) | |
iaVector2< T > | operator+ (const iaVector2< T > &vec) const |
void | operator+= (const iaVector2< T > &vec) |
iaVector2< T > | operator- (const iaVector2< T > &vec) const |
void | operator-= (const iaVector2< T > &vec) |
iaVector2< T > | operator= (const iaVector2< T > &vec) |
iaVector2< T > | operator* (T scalar) const |
void | operator*= (T scalar) |
iaVector2< T > | operator/ (T scalar) const |
void | operator/= (T scalar) |
bool | operator== (const iaVector2< T > &vec) const |
bool | operator!= (const iaVector2< T > &vec) const |
T | operator* (const iaVector2< T > &vec) const |
const T & | operator[] (int index) const |
T & | operator[] (int index) |
T * | getData () |
const T * | getData () const |
void | set (T x, T y) |
T | length () const |
T | length2 () const |
T | distance (const iaVector2< T > &vec) const |
T | distance2 (const iaVector2< T > &vec) const |
T | angle () const |
T | angle (iaVector2< T > &vec) const |
void | rotateXY (T angle) |
void | normalize () |
void | negate () |
template<class T2 > | |
iaVector2< T2 > | convert () const |
template<class T2 > | |
IGOR_INLINE iaVector2< T2 > | convert () const |
Public Attributes | |
T | _x = static_cast<T>(0) |
T | _y = static_cast<T>(0) |
2 dimensional vector
|
default |
does nothing
IGOR_INLINE iaVector2::iaVector2 | ( | T | x, |
T | y | ||
) |
initializes the vector with x y components
x | x component |
y | y component |
IGOR_INLINE T iaVector2::angle | ( | ) | const |
-PI/2 |PI ----— 0.0 | PI/2
IGOR_INLINE T iaVector2::angle | ( | iaVector2< T > & | vec | ) | const |
vec | second vector to calculate the angle with |
converts the vector in to given type of vector
IGOR_INLINE iaVector2< T2 > iaux::iaVector2< T >::convert | ( | ) | const |
IGOR_INLINE T iaVector2::distance | ( | const iaVector2< T > & | vec | ) | const |
vec | the second position to calculate the distance to |
IGOR_INLINE T iaVector2::distance2 | ( | const iaVector2< T > & | vec | ) | const |
vec | the second position to calculate the distance to |
IGOR_INLINE T * iaVector2::getData | ( | ) |
IGOR_INLINE const T * iaVector2::getData | ( | ) | const |
IGOR_INLINE T iaVector2::length | ( | ) | const |
IGOR_INLINE T iaVector2::length2 | ( | ) | const |
IGOR_INLINE void iaVector2::negate | ( | ) |
conjugates (or negates) the vector
IGOR_INLINE void iaVector2::normalize | ( | ) |
normalizes the vector
IGOR_INLINE bool iaVector2::operator!= | ( | const iaVector2< T > & | vec | ) | const |
comparison of two vectors
no deviation accepted
IGOR_INLINE T iaVector2::operator* | ( | const iaVector2< T > & | vec | ) | const |
dot product between two vectors
vec | vector to multiply this vector with |
IGOR_INLINE iaVector2< T > iaVector2::operator* | ( | T | scalar | ) | const |
multiplication of vector with scalar
scalar | value to multiply with this vector |
IGOR_INLINE void iaVector2::operator*= | ( | T | scalar | ) |
multiplication of vector with scalar and assignment
scalar | value to multiply with this vector |
IGOR_INLINE iaVector2< T > iaVector2::operator+ | ( | const iaVector2< T > & | vec | ) | const |
vector addition
vec | vector to be added to this vector |
IGOR_INLINE void iaVector2::operator+= | ( | const iaVector2< T > & | vec | ) |
vector addition and assignment
vec | vector to be added to this vector |
IGOR_INLINE iaVector2< T > iaVector2::operator- | ( | const iaVector2< T > & | vec | ) | const |
vector subtraction
vec | vector to be subtracted from this vector |
IGOR_INLINE void iaVector2::operator-= | ( | const iaVector2< T > & | vec | ) |
vector subtraction and assignment
vec | vector to be subtracted from this vector |
IGOR_INLINE iaVector2< T > iaVector2::operator/ | ( | T | scalar | ) | const |
division of vector with scalar
scalar | value to devide this vector by |
IGOR_INLINE void iaVector2::operator/= | ( | T | scalar | ) |
division of vector with scalar and assignment
scalar | value to devide this vector by |
vector assignment
vec | vector to be assigned to this vector |
IGOR_INLINE bool iaVector2::operator== | ( | const iaVector2< T > & | vec | ) | const |
comparison of two vectors
no deviation accepted
IGOR_INLINE T & iaVector2::operator[] | ( | int | index | ) |
index | the index of the value to be returned |
IGOR_INLINE const T & iaVector2::operator[] | ( | int | index | ) | const |
index | the index of the value to be returned |
IGOR_INLINE void iaVector2::rotateXY | ( | T | angle | ) |
rotates a vector in XY plane
angle | the angle in rad to rotate the vector with |
IGOR_INLINE void iaVector2::set | ( | T | x, |
T | y | ||
) |
set values
x | x value to set |
y | y value to set |
T iaux::iaVector2< T >::_x = static_cast<T>(0) |
x component
T iaux::iaVector2< T >::_y = static_cast<T>(0) |
y component