ML Reference
ml::Tvec5< DT > Class Template Reference

A five dimensional vector class for floating point types. More...

#include <mlVector5.h>

Inheritance diagram for ml::Tvec5< DT >:
ml::FloatingPointVector< DT, 5 > ml::FloatingPointVectorDataContainerBase< DT, size >

List of all members.

Public Types

typedef FloatingPointVector
< DT, 5 > 
Superclass
 A typedef as a shorthand for the base class.
typedef DT ComponentType
 A typedef to "export" the type of components.

Public Member Functions

constructors
 Tvec5 (const DT value=0)
 Default and value constructor.
 Tvec5 (const Tvec5< DT > &v)
 Copy constructor from Tvec5.
 Tvec5 (const Superclass &v)
 Copy constructor from FloatingPointVector.
 Tvec5 (const DT x, const DT y, const DT z, const DT c, const DT t)
 Build the vector from the scalars x, y, z, c and t to the components 0 to 4, respectively.
 Tvec5 (const Tvec2< DT > &v, const DT z, const DT c, const DT t)
 Cast Tvec2 to Tvec5. Last components are set to z, c and t.
 Tvec5 (const Tvec3< DT > &v, const DT c, const DT t)
 Cast Tvec3 to Tvec5. Last components are set to c and t.
 Tvec5 (const Tvec4< DT > &v, const DT t)
 Cast Tvec4 to Tvec5. Last component is set to t and u.
Other operators and methods
void assign (const DT x, const DT y, const DT z, const DT c, const DT t)
 Set all components to the passed values.
Tvec5< DT > & operator+= (const Tvec2< DT > &v)
 Incrementation by a Tvec2.
Tvec5< DT > & operator+= (const Tvec3< DT > &v)
 Incrementation by a Tvec3.
Tvec5< DT > & operator+= (const Tvec4< DT > &v)
 Incrementation by a Tvec4.
const Tvec3< DT > getVec3 () const
 Return a Tvec3 from components 0,1, and 2.
const Tvec4< DT > getVec4 () const
 Return a Tvec4 from components 0, 1, 2, and 3.

Detailed Description

template<class DT>
class ml::Tvec5< DT >

A five dimensional vector class for floating point types.

A five dimensional vector class.

Definition at line 57 of file mlVector5.h.


Member Typedef Documentation

template<class DT>
typedef DT ml::Tvec5< DT >::ComponentType

A typedef to "export" the type of components.

Reimplemented from ml::FloatingPointVector< DT, 5 >.

Definition at line 64 of file mlVector5.h.

template<class DT>
typedef FloatingPointVector<DT,5> ml::Tvec5< DT >::Superclass

A typedef as a shorthand for the base class.

Definition at line 61 of file mlVector5.h.


Constructor & Destructor Documentation

template<class DT>
ml::Tvec5< DT >::Tvec5 ( const DT  value = 0) [inline, explicit]

Default and value constructor.

Set all entries to a user given value. value is the init value for all entries. 0 is the default value.

Definition at line 72 of file mlVector5.h.

template<class DT>
ml::Tvec5< DT >::Tvec5 ( const Tvec5< DT > &  v) [inline]

Copy constructor from Tvec5.

This allows the usage of SclarVectorTemplate objects of the same DT in operators using the Tvec5, because the FloatingPointVector objects can implicitly be cast.

Definition at line 80 of file mlVector5.h.

template<class DT>
ml::Tvec5< DT >::Tvec5 ( const Superclass v) [inline]

Copy constructor from FloatingPointVector.

Definition at line 86 of file mlVector5.h.

template<class DT>
ml::Tvec5< DT >::Tvec5 ( const DT  x,
const DT  y,
const DT  z,
const DT  c,
const DT  t 
) [inline]

Build the vector from the scalars x, y, z, c and t to the components 0 to 4, respectively.

Definition at line 93 of file mlVector5.h.

template<class DT>
ml::Tvec5< DT >::Tvec5 ( const Tvec2< DT > &  v,
const DT  z,
const DT  c,
const DT  t 
) [inline]

Cast Tvec2 to Tvec5. Last components are set to z, c and t.

Definition at line 105 of file mlVector5.h.

template<class DT>
ml::Tvec5< DT >::Tvec5 ( const Tvec3< DT > &  v,
const DT  c,
const DT  t 
) [inline]

Cast Tvec3 to Tvec5. Last components are set to c and t.

Definition at line 117 of file mlVector5.h.

template<class DT>
ml::Tvec5< DT >::Tvec5 ( const Tvec4< DT > &  v,
const DT  t 
) [inline]

Cast Tvec4 to Tvec5. Last component is set to t and u.

Definition at line 129 of file mlVector5.h.


Member Function Documentation

template<class DT>
void ml::Tvec5< DT >::assign ( const DT  x,
const DT  y,
const DT  z,
const DT  c,
const DT  t 
) [inline]

Set all components to the passed values.

Definition at line 146 of file mlVector5.h.

template<class DT>
const Tvec3<DT> ml::Tvec5< DT >::getVec3 ( ) const [inline]

Return a Tvec3 from components 0,1, and 2.

Definition at line 191 of file mlVector5.h.

template<class DT>
const Tvec4<DT> ml::Tvec5< DT >::getVec4 ( ) const [inline]

Return a Tvec4 from components 0, 1, 2, and 3.

Definition at line 201 of file mlVector5.h.

template<class DT>
Tvec5<DT>& ml::Tvec5< DT >::operator+= ( const Tvec4< DT > &  v) [inline]

Incrementation by a Tvec4.

Definition at line 179 of file mlVector5.h.

template<class DT>
Tvec5<DT>& ml::Tvec5< DT >::operator+= ( const Tvec2< DT > &  v) [inline]

Incrementation by a Tvec2.

Definition at line 158 of file mlVector5.h.

template<class DT>
Tvec5<DT>& ml::Tvec5< DT >::operator+= ( const Tvec3< DT > &  v) [inline]

Incrementation by a Tvec3.

Definition at line 168 of file mlVector5.h.


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