xc
Public Member Functions | List of all members

ASDQuaternion A simple fixed size 3D vector. More...

#include <ASDMath.h>

Public Member Functions

 ASDVector3 ()
 Creates a Zero ASDVector3.
 
 ASDVector3 (T x, T y, T z)
 Creates a ASDVector3 from its coefficients. More...
 
 ASDVector3 (const Vector &v, size_t index=0)
 Creates a ASDVector3 from a Vector starting from index. More...
 
 ASDVector3 (const ASDVector3 &other)
 Creates a ASDVector3 from another ASDVector3. More...
 
ASDVector3operator= (const ASDVector3 &other)
 Copies a ASDVector3. More...
 
const T x () const
 Returns the X coefficient of this vector. More...
 
const T y () const
 Returns the Y coefficient of this vector. More...
 
const T z () const
 Returns the Z coefficient of this vector. More...
 
operator() (size_t i) const
 Returns the i-th coefficient of this vector. More...
 
T & operator() (size_t i)
 Returns the i-th coefficient of this vector. More...
 
operator[] (size_t i) const
 Returns the i-th coefficient of this vector. More...
 
T & operator[] (size_t i)
 Returns the i-th coefficient of this vector. More...
 
squaredNorm () const
 Returns the squared norm this vector. More...
 
norm () const
 Returns the norm this vector. More...
 
normalize ()
 makes this vector a unit vector. More...
 
dot (const ASDVector3 &b) const
 Returns the dot product this vector with another vector. More...
 
ASDVector3 cross (const ASDVector3 &b) const
 Returns the cross product this vector with another vector. More...
 
void operator+= (const ASDVector3 &b)
 
ASDVector3 operator+ (const ASDVector3 &b) const
 
void operator-= (const ASDVector3 &b)
 
ASDVector3 operator- (const ASDVector3 &b) const
 
void operator*= (T b)
 
ASDVector3 operator* (T b) const
 
void operator/= (T b)
 
ASDVector3 operator/ (T b) const
 

Detailed Description

template<class T>
class XC::ASDVector3< T >

ASDQuaternion A simple fixed size 3D vector.

Constructor & Destructor Documentation

◆ ASDVector3() [1/3]

template<class T>
XC::ASDVector3< T >::ASDVector3 ( x,
y,
z 
)
inline

Creates a ASDVector3 from its coefficients.

Parameters
xx coefficient
yy coefficient
zz coefficient

◆ ASDVector3() [2/3]

template<class T>
XC::ASDVector3< T >::ASDVector3 ( const Vector v,
size_t  index = 0 
)
inline

Creates a ASDVector3 from a Vector starting from index.

Note: no check is made on the input data size!

Parameters
vthe vector
indexthe index (optional, default = 0)

◆ ASDVector3() [3/3]

template<class T>
XC::ASDVector3< T >::ASDVector3 ( const ASDVector3< T > &  other)
inline

Creates a ASDVector3 from another ASDVector3.

Parameters
otherthe other ASDVector3

Member Function Documentation

◆ cross()

template<class T>
ASDVector3 XC::ASDVector3< T >::cross ( const ASDVector3< T > &  b) const
inline

Returns the cross product this vector with another vector.

Parameters
bthe other vector
Returns
the cross product.

◆ dot()

template<class T>
T XC::ASDVector3< T >::dot ( const ASDVector3< T > &  b) const
inline

Returns the dot product this vector with another vector.

Parameters
bthe other vector
Returns
the dot product.

◆ norm()

template<class T>
T XC::ASDVector3< T >::norm ( ) const
inline

Returns the norm this vector.

Returns
the norm of this vector.

◆ normalize()

template<class T>
T XC::ASDVector3< T >::normalize ( )
inline

makes this vector a unit vector.

Returns
the norm of this vector.

◆ operator()() [1/2]

template<class T>
T XC::ASDVector3< T >::operator() ( size_t  i) const
inline

Returns the i-th coefficient of this vector.

Returns
the i-th coefficient of this vector.

◆ operator()() [2/2]

template<class T>
T& XC::ASDVector3< T >::operator() ( size_t  i)
inline

Returns the i-th coefficient of this vector.

Returns
the i-th coefficient of this vector.

◆ operator=()

template<class T>
ASDVector3& XC::ASDVector3< T >::operator= ( const ASDVector3< T > &  other)
inline

Copies a ASDVector3.

Parameters
otherthe other ASDVector3

◆ operator[]() [1/2]

template<class T>
T XC::ASDVector3< T >::operator[] ( size_t  i) const
inline

Returns the i-th coefficient of this vector.

Returns
the i-th coefficient of this vector.

◆ operator[]() [2/2]

template<class T>
T& XC::ASDVector3< T >::operator[] ( size_t  i)
inline

Returns the i-th coefficient of this vector.

Returns
the i-th coefficient of this vector.

◆ squaredNorm()

template<class T>
T XC::ASDVector3< T >::squaredNorm ( ) const
inline

Returns the squared norm this vector.

Returns
the squared norm of this vector.

◆ x()

template<class T>
const T XC::ASDVector3< T >::x ( ) const
inline

Returns the X coefficient of this vector.

Returns
the X coefficient of this vector.

◆ y()

template<class T>
const T XC::ASDVector3< T >::y ( ) const
inline

Returns the Y coefficient of this vector.

Returns
the Y coefficient of this vector.

◆ z()

template<class T>
const T XC::ASDVector3< T >::z ( ) const
inline

Returns the Z coefficient of this vector.

Returns
the Z coefficient of this vector.

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