iaux::iaVector3< T > Struct Template Reference

#include <iaVector3.h>

Public Member Functions

 iaVector3 ()=default
 
 iaVector3 (T x, T y, T z)
 
iaVector3< T > operator+ (const iaVector3< T > &a) const
 
void operator+= (const iaVector3< T > &a)
 
iaVector3< T > operator- (const iaVector3< T > &a) const
 
void operator-= (const iaVector3< T > &a)
 
iaVector3< T > operator= (const iaVector3< T > &a)
 
iaVector3< T > operator% (const iaVector3< T > &a) const
 
iaVector3< T > operator* (T a) const
 
void operator*= (T a)
 
iaVector3< T > operator/ (T a) const
 
void operator/= (T a)
 
operator* (const iaVector3< T > &a) const
 
bool operator== (const iaVector3< T > &a) const
 
bool operator!= (const iaVector3< T > &a) const
 
const T & operator[] (int i) const
 
T & operator[] (int i)
 
void set (T x, T y, T z)
 
length () const
 
length2 () const
 
distance (const iaVector3< T > &v) const
 
distance2 (const iaVector3< T > &v) const
 
iaVector3< T > project (const iaVector3< T > &v) const
 
iaVector3< T > reject (const iaVector3< T > &v)
 
angle (const iaVector3< T > &a) const
 
angleXZ () const
 
void normalize ()
 
void negate ()
 
const T * getData () const
 
T * getData ()
 
template<class T2 >
iaVector3< T2 > convert () const
 
template<class T2 >
iaVector3< T2 > convert () const
 

Public Attributes

_x = static_cast<T>(0)
 
_y = static_cast<T>(0)
 
_z = static_cast<T>(0)
 

Detailed Description

template<typename T>
struct iaux::iaVector3< T >

3d vector class

Constructor & Destructor Documentation

◆ iaVector3() [1/2]

template<typename T >
iaux::iaVector3< T >::iaVector3 ( )
default

does nothing

◆ iaVector3() [2/2]

template<typename T >
iaVector3::iaVector3 ( x,
y,
z 
)

initializes member variables

Parameters
xx component
yy component
zz component

Member Function Documentation

◆ angle()

template<typename T >
T iaVector3::angle ( const iaVector3< T > &  a) const
Returns
angle beween to vectors in radians

◆ angleXZ()

template<typename T >
T iaVector3::angleXZ ( ) const

returns angle relative to XZ plane

◆ convert() [1/2]

template<typename T >
template<class T2 >
iaVector3< T2 > iaux::iaVector3< T >::convert ( ) const

converts the vector in to given type of vector

Returns
vector for given type

◆ convert() [2/2]

template<typename T >
template<class T2 >
iaVector3< T2 > iaux::iaVector3< T >::convert ( ) const

◆ distance()

template<typename T >
IGOR_INLINE T iaVector3::distance ( const iaVector3< T > &  v) const
Returns
distance between two vectors
Parameters
vsecond vector

◆ distance2()

template<typename T >
IGOR_INLINE T iaVector3::distance2 ( const iaVector3< T > &  v) const
Returns
quadratic distance between two vectors
Parameters
vsecond vector

◆ getData() [1/2]

template<typename T >
T * iaVector3::getData ( )
Returns
pointer to internal data

◆ getData() [2/2]

template<typename T >
const T * iaVector3::getData ( ) const

\retruns pointer to internal data

◆ length()

template<typename T >
IGOR_INLINE T iaVector3::length ( ) const
Returns
length of vector

◆ length2()

template<typename T >
IGOR_INLINE T iaVector3::length2 ( ) const
Returns
quadratic length of vector

◆ negate()

template<typename T >
IGOR_INLINE void iaVector3::negate ( )

negates the vector

◆ normalize()

template<typename T >
void iaVector3::normalize ( )

normalizes the vector

◆ operator!=()

template<typename T >
bool iaVector3::operator!= ( const iaVector3< T > &  a) const

negated comparison of two vectors

Parameters
athe second vector to compare this vector with
Returns
true if vectors are not equal

◆ operator%()

template<typename T >
IGOR_INLINE iaVector3< T > iaVector3::operator% ( const iaVector3< T > &  a) const

cross product of two vectors

Parameters
athe vector to calculate the cross product with
Returns
the resulting cross product

◆ operator*() [1/2]

template<typename T >
IGOR_INLINE T iaVector3::operator* ( const iaVector3< T > &  a) const

dot product (scalar product) of two vectors

Parameters
asecond vector to calculate the scalar product with
Returns
the resulting scalar product

◆ operator*() [2/2]

template<typename T >
IGOR_INLINE iaVector3< T > iaVector3::operator* ( a) const

vector scaling

Parameters
athe factor to scale the vector with
Returns
the scaled vector

◆ operator*=()

template<typename T >
IGOR_INLINE void iaVector3::operator*= ( a)

vector scaling and assignment

Parameters
athe factor to scale this vector with

◆ operator+()

template<typename T >
IGOR_INLINE iaVector3< T > iaVector3::operator+ ( const iaVector3< T > &  a) const

vector addition

Parameters
athe vector to add
Returns
result of vector addition

◆ operator+=()

template<typename T >
IGOR_INLINE void iaVector3::operator+= ( const iaVector3< T > &  a)

vector addition and assignment

Parameters
athe vector to add to this vector

◆ operator-()

template<typename T >
IGOR_INLINE iaVector3< T > iaVector3::operator- ( const iaVector3< T > &  a) const

vector subtraction

Parameters
athe vector to subtract
Returns
result of vector subtraction

◆ operator-=()

template<typename T >
IGOR_INLINE void iaVector3::operator-= ( const iaVector3< T > &  a)

vector subtraction and assignment

Parameters
athe vector to subtract to this vector

◆ operator/()

template<typename T >
IGOR_INLINE iaVector3< T > iaVector3::operator/ ( a) const

vector scaling by division

Parameters
athe factor to scale the vector with
Returns
the scaled vector

◆ operator/=()

template<typename T >
IGOR_INLINE void iaVector3::operator/= ( a)

vector scaling by division and assignment

Parameters
athe factor to scale this vector with

◆ operator=()

template<typename T >
iaVector3< T > iaVector3::operator= ( const iaVector3< T > &  a)

vector assignment

Parameters
athe vector to assign to this vector
Returns
resulting vector

◆ operator==()

template<typename T >
bool iaVector3::operator== ( const iaVector3< T > &  a) const

comparison of two vectors

Parameters
athe second vector to compare this vector with
Returns
true if vectors are equal

◆ operator[]() [1/2]

template<typename T >
T & iaVector3::operator[] ( int  i)
Returns
component value by index
Parameters
iindex of component

◆ operator[]() [2/2]

template<typename T >
const T & iaVector3::operator[] ( int  i) const
Returns
component value by index (const version)
Parameters
iindex of component

◆ project()

template<typename T >
iaVector3< T > iaVector3::project ( const iaVector3< T > &  v) const

project this vector on v

Parameters
vthe vector to project on
Returns
the projected vector

◆ reject()

template<typename T >
iaVector3< T > iaVector3::reject ( const iaVector3< T > &  v)

reject this vector from v

Parameters
vthe vector to reject from
Returns
the rejected vector

◆ set()

template<typename T >
void iaVector3::set ( x,
y,
z 
)

sets components of vector

Parameters
xx component
yy component
zz component

Member Data Documentation

◆ _x

template<typename T >
T iaux::iaVector3< T >::_x = static_cast<T>(0)

x component

◆ _y

template<typename T >
T iaux::iaVector3< T >::_y = static_cast<T>(0)

y component

◆ _z

template<typename T >
T iaux::iaVector3< T >::_z = static_cast<T>(0)

z component


The documentation for this struct was generated from the following files: