SLIMMER
Public Member Functions | Static Public Attributes | Protected Attributes
SimpleTVec< T, STVEC_LEN, TS > Class Template Reference

Fixed Size Templated Vector Class. More...

#include <SimpleTVec.h>

Inheritance diagram for SimpleTVec< T, STVEC_LEN, TS >:
SimpleBaseTVec< T, TS >

List of all members.

Public Member Functions

 SimpleTVec ()
 Default Constructor.
 SimpleTVec (const SimpleTVec< T, STVEC_LEN, TS > &v2)
 Copy Constructor (from Same element Type) length same(=type)
template<typename T2 >
 SimpleTVec (const SimpleBaseTVec< T2, TS > &v2)
 Copy Constructor (from Other Vector Type derived from SimpleBaseVec)
 SimpleTVec (const T x, const T y)
 SimpleTVec (const T x, const T y, const T z)
 SimpleTVec (const T x, const T y, const T z, const T t)
 ~SimpleTVec ()
 Destructor (nothing to do)
T & operator[] (const TS &i)
 Return reference to given element (allows modification)
T & operator[] (const int &i)
 Return reference to given element (allows modification)
operator[] (const TS &i) const
operator() (const int &i) const
 Return copy of a given element (class constant)
operator() (const TS &i) const
 Return copy of a given element (class constant)
TS Size () const
 Return Size/Dimension of vector.
void ReSize (const TS s)
 Change Size/Dimension of vector (only works for variable length vectors)
void IncreaseSize (const TS s)
 Increase Size/Dimension of vector and Preserve Current Values (only works for variable length vectors)
SimpleTVec< T, STVEC_LEN, TS > Reflect () const
 Return Reflected Vector.
SimpleTVec< T, STVEC_LEN-1 > Skip (const TS element) const
 Return Vector one element shorter skipping given element.
SimpleTVec< T, STVEC_LEN, TS > & operator= (const SimpleTVec< T, STVEC_LEN, TS > &v2)
template<typename T2 >
SimpleTVec< T, STVEC_LEN, TS > & operator= (const SimpleTVec< T2, STVEC_LEN, TS > &v2)
template<typename T2 >
SimpleTVec< T, STVEC_LEN, TS > & operator*= (const SimpleBaseTVec< T2, TS > &v2)
template<typename T2 >
SimpleTVec< T, STVEC_LEN, TS > & operator-= (const SimpleBaseTVec< T2, TS > &v2)
template<typename T2 >
SimpleTVec< T, STVEC_LEN, TS > & operator+= (const SimpleBaseTVec< T2, TS > &v2)
SimpleTVec< T, STVEC_LEN, TS > & operator+= (const T &scalar)
SimpleTVec< T, STVEC_LEN, TS > & operator-= (const T &scalar)
SimpleTVec< T, STVEC_LEN, TS > & operator*= (const T &scalar)
SimpleTVec< T, STVEC_LEN, TS > & operator/= (const T &scalar)
SimpleTVec< T, STVEC_LEN, TS > & operator++ ()
SimpleTVec< T, STVEC_LEN, TS > & operator-- ()
template<typename T2 >
SimpleTVec< T, STVEC_LEN, TS > operator* (const SimpleBaseTVec< T2, TS > &v2) const
template<typename T2 >
SimpleTVec< T, STVEC_LEN, TS > operator- (const SimpleBaseTVec< T2, TS > &v2) const
template<typename T2 >
SimpleTVec< T, STVEC_LEN, TS > operator+ (const SimpleBaseTVec< T2, TS > &v2) const
template<typename T2 >
SimpleTVec< T, STVEC_LEN, TS > operator/ (const SimpleBaseTVec< T2, TS > &v2) const
template<typename T2 >
SimpleTVec< T, STVEC_LEN, TS > crossV (const SimpleTVec< T2, STVEC_LEN, TS > &v2) const
SimpleTVec< T, STVEC_LEN, TS > operator* (const T &v2) const
SimpleTVec< T, STVEC_LEN, TS > operator- (const T &v2) const
SimpleTVec< T, STVEC_LEN, TS > operator+ (const T &v2) const
SimpleTVec< T, STVEC_LEN, TS > operator/ (const T &v2) const
Sum () const
 Return Sum:
template<>
float Sum () const
 Return Sum.
template<>
float Sum () const
 Return Sum.
template<>
float Sum () const
 Return Sum.
template<>
float Sum () const
 Return Sum.
template<>
float Sum () const
 Return Sum.
template<>
float Sum () const
 Return Sum.
template<>
 SimpleTVec (const SimpleTVec< float, 3, unsigned int > &v2)
template<>
SimpleTVec< float, 3, unsigned
int > & 
operator= (const SimpleTVec< float, 3, unsigned int > &v2)
template<>
SimpleTVec< float, 3, unsigned
int > & 
operator+= (const SimpleBaseTVec< float, unsigned int > &v2)
template<>
SimpleTVec< float, 3, unsigned
int > & 
operator-= (const SimpleBaseTVec< float, unsigned int > &v2)
template<>
SimpleTVec< float, 3, unsigned
int > & 
operator*= (const SimpleBaseTVec< float, unsigned int > &v2)
template<>
SimpleTVec< float, 3, unsigned
int > 
operator* (const SimpleBaseTVec< float, unsigned int > &v2) const
template<>
SimpleTVec< float, 3, unsigned
int > 
operator- (const SimpleBaseTVec< float, unsigned int > &v2) const
template<>
SimpleTVec< float, 3, unsigned
int > 
operator+ (const SimpleBaseTVec< float, unsigned int > &v2) const
template<>
SimpleTVec< float, 3, unsigned
int > 
operator/ (const SimpleBaseTVec< float, unsigned int > &v2) const
template<>
SimpleTVec< float, 3, unsigned
int > & 
operator*= (const float &scalar)
template<>
SimpleTVec< float, 3, unsigned
int > & 
operator+= (const float &scalar)
template<>
SimpleTVec< float, 3, unsigned
int > & 
operator-= (const float &scalar)
template<>
SimpleTVec< float, 3, unsigned
int > & 
operator/= (const float &scalar)
template<>
SimpleTVec< float, 3, unsigned
int > & 
operator++ ()
template<>
SimpleTVec< float, 3, unsigned
int > & 
operator-- ()
template<>
const char _versionID []
template<>
const char _versionID []
template<>
const char _versionID []
template<>
const char _versionID []

Static Public Attributes

static const char _versionID []

Protected Attributes

_elem [STVEC_LEN]
 Storage.

Detailed Description

template<typename T, unsigned int STVEC_LEN = 3, typename TS = unsigned int>
class SimpleTVec< T, STVEC_LEN, TS >

Fixed Size Templated Vector Class.

Contains functions for use in Fixed Sized Vectors

Id:
SimpleTVec.h,v 1.43 2011/12/01 20:20:10 bicg Exp

Member Function Documentation

template<typename T, unsigned int STVEC_LEN = 3, typename TS = unsigned int>
T SimpleTVec< T, STVEC_LEN, TS >::Sum ( ) const [inline, virtual]

Return Sum:

reimplemetation in this class to allow specialisations of length type

Reimplemented from SimpleBaseTVec< T, TS >.

 All Classes Functions Variables Typedefs