Public Types | Public Member Functions | Protected Attributes

gmtl::VecBase< DATA_TYPE, SIZE, REP > Class Template Reference

Base type for vector-like objects including Points and Vectors. More...

#include <VecBase.h>

Collaboration diagram for gmtl::VecBase< DATA_TYPE, SIZE, REP >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Params { Size = SIZE }
 

The number of components this VecB has.

More...
typedef DATA_TYPE DataType
 The datatype used for the components of this VecB.

Public Member Functions

 VecBase ()
 VecBase (const REP &rep)
DATA_TYPE operator[] (const unsigned i)
 Conversion operator to default vecbase type.
const DATA_TYPE operator[] (const unsigned i) const

Protected Attributes

const REP expRep

Detailed Description

template<class DATA_TYPE, unsigned SIZE, typename REP = meta::DefaultVecTag>
class gmtl::VecBase< DATA_TYPE, SIZE, REP >

Base type for vector-like objects including Points and Vectors.

It is templated on the component datatype as well as the number of components that make it up.

Parameters:
DATA_TYPE the datatype to use for the components
SIZE the number of components this VecB has
REP the representation to use for the vector. (expression template or default)

Definition at line 40 of file VecBase.h.


Member Typedef Documentation

template<class DATA_TYPE, unsigned SIZE, typename REP = meta::DefaultVecTag>
typedef DATA_TYPE gmtl::VecBase< DATA_TYPE, SIZE, REP >::DataType

The datatype used for the components of this VecB.

Reimplemented in gmtl::Point< DATA_TYPE, SIZE >, and gmtl::Point< DATA_TYPE, 3 >.

Definition at line 47 of file VecBase.h.


Member Enumeration Documentation

template<class DATA_TYPE, unsigned SIZE, typename REP = meta::DefaultVecTag>
enum gmtl::VecBase::Params

The number of components this VecB has.

Enumerator:
Size 

Reimplemented in gmtl::AxisAngle< DATA_TYPE >, gmtl::Point< DATA_TYPE, SIZE >, and gmtl::Point< DATA_TYPE, 3 >.

Definition at line 50 of file VecBase.h.

{ Size = SIZE };


Constructor & Destructor Documentation

template<class DATA_TYPE, unsigned SIZE, typename REP = meta::DefaultVecTag>
gmtl::VecBase< DATA_TYPE, SIZE, REP >::VecBase (  )  [inline]

Definition at line 53 of file VecBase.h.

   {;}

template<class DATA_TYPE, unsigned SIZE, typename REP = meta::DefaultVecTag>
gmtl::VecBase< DATA_TYPE, SIZE, REP >::VecBase ( const REP &  rep  )  [inline]

Definition at line 56 of file VecBase.h.

      : expRep(rep)
   {;}


Member Function Documentation

template<class DATA_TYPE, unsigned SIZE, typename REP = meta::DefaultVecTag>
DATA_TYPE gmtl::VecBase< DATA_TYPE, SIZE, REP >::operator[] ( const unsigned  i  )  [inline]

Conversion operator to default vecbase type.

Return the value at given location.

Definition at line 69 of file VecBase.h.

   {
      gmtlASSERT(i < SIZE);
      return expRep[i];
   }

template<class DATA_TYPE, unsigned SIZE, typename REP = meta::DefaultVecTag>
const DATA_TYPE gmtl::VecBase< DATA_TYPE, SIZE, REP >::operator[] ( const unsigned  i  )  const [inline]

Definition at line 74 of file VecBase.h.

   {
      gmtlASSERT(i < SIZE);
      return expRep[i];
   }


Member Data Documentation

template<class DATA_TYPE, unsigned SIZE, typename REP = meta::DefaultVecTag>
const REP gmtl::VecBase< DATA_TYPE, SIZE, REP >::expRep [protected]

Definition at line 43 of file VecBase.h.


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