iaux::iaVector4< T > Struct Template Reference

#include <iaVector4.h>

Public Member Functions

 iaVector4 ()=default
 
 iaVector4 (T x, T y, T z, T w)
 
iaVector4< T > operator= (const iaVector4< T > &src)
 
iaVector4< T > operator= (const iaVector3< T > &src)
 
bool operator== (const iaVector4< T > &a) const
 
bool operator!= (const iaVector4< T > &a) const
 
const T & operator[] (int i) const
 
T & operator[] (int i)
 
void set (T x, T y, T z, T w)
 
T * getData ()
 
const T * getData () const
 
template<class T2 >
iaVector4< T2 > convert () const
 
template<class T2 >
iaVector4< T2 > convert () const
 

Public Attributes

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

Detailed Description

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

4d vector

Constructor & Destructor Documentation

◆ iaVector4() [1/2]

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

does nothing

◆ iaVector4() [2/2]

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

param ctor

\pram x x component \pram y y component \pram z z component \pram w w component

Member Function Documentation

◆ convert() [1/2]

template<typename T >
template<class T2 >
iaVector4< T2 > iaux::iaVector4< 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 >
iaVector4< T2 > iaux::iaVector4< T >::convert ( ) const

◆ getData() [1/2]

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

◆ getData() [2/2]

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

const variant

◆ operator!=()

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

compares two vectors

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

◆ operator=() [1/2]

template<typename T >
iaVector4< T > iaux::iaVector4< T >::operator= ( const iaVector3< T > &  src)

copy operator 3 components

leaves w component as is

Parameters
srcvector to copy
Returns
this

◆ operator=() [2/2]

template<typename T >
iaVector4< T > iaVector4::operator= ( const iaVector4< T > &  src)

copy operator

Parameters
srcvector to copy
Returns
this

◆ operator==()

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

compares two vectors

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

◆ operator[]() [1/2]

template<typename T >
T & iaVector4::operator[] ( int  i)

array operator read and write

Parameters
iindex of field to access
Returns
reference to value

◆ operator[]() [2/2]

template<typename T >
const T & iaVector4::operator[] ( int  i) const

array operator read only versione

Parameters
iindex of field to access
Returns
value of field

◆ set()

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

sets the components of this vector

\pram x x component \pram y y component \pram z z component \pram w w component

Member Data Documentation

◆ _w

template<typename T >
T iaux::iaVector4< T >::_w = static_cast<T>(1)

w component

◆ _x

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

x component

◆ _y

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

y component

◆ _z

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

z component


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