SGVec4< T > Class Template Reference

4D Vector Class More...

#include <SGVec4.hxx>

List of all members.

Public Member Functions

 SGVec4 (void)
 Default constructor.
 SGVec4 (T x, T y, T z, T w)
 Constructor. Initialize by the given values.
 SGVec4 (const T *d)
 Constructor.
const T & operator() (unsigned i) const
 Access by index, the index is unchecked.
T & operator() (unsigned i)
 Access by index, the index is unchecked.
const T & operator[] (unsigned i) const
 Access raw data by index, the index is unchecked.
T & operator[] (unsigned i)
 Access raw data by index, the index is unchecked.
const T & x (void) const
 Access the x component.
T & x (void)
 Access the x component.
const T & y (void) const
 Access the y component.
T & y (void)
 Access the y component.
const T & z (void) const
 Access the z component.
T & z (void)
 Access the z component.
const T & w (void) const
 Access the x component.
T & w (void)
 Access the x component.
const T(& data (void) const)[4]
 Readonly raw storage interface.
T(& data (void))[4]
 Readonly raw storage interface.
SGVec4operator+= (const SGVec4 &v)
 Inplace addition.
SGVec4operator-= (const SGVec4 &v)
 Inplace subtraction.
template<typename S >
SGVec4operator*= (S s)
 Inplace scalar multiplication.
template<typename S >
SGVec4operator/= (S s)
 Inplace scalar multiplication by 1/s.

Static Public Member Functions

static SGVec4 zeros (void)
 Return an all zero vector.
static SGVec4 e1 (void)
 Return unit vectors.

Detailed Description

template<typename T>
class SGVec4< T >

4D Vector Class

Definition at line 28 of file SGVec4.hxx.


Constructor & Destructor Documentation

template<typename T>
SGVec4< T >::SGVec4 ( void   )  [inline]

Default constructor.

Does not initialize at all. If you need them zero initialized, use SGVec4::zeros()

Initialize with nans in the debug build, that will guarantee to have a fast uninitialized default constructor in the release but shows up uninitialized values in the debug build very fast ...

Definition at line 34 of file SGVec4.hxx.

template<typename T>
SGVec4< T >::SGVec4 ( const T *  d  )  [inline, explicit]

Constructor.

Initialize by the content of a plain array, make sure it has at least 3 elements

Definition at line 49 of file SGVec4.hxx.


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

Generated on 23 Feb 2010 for SimGear by  doxygen 1.6.1