tagGame::Vec< T > Class Template Reference

A basic templatized vector class. More...

#include <Vec.h>

List of all members.

Public Member Functions

 Vec (size_t const n=0)
 Vec (std::vector< T > const &data)
 Vec (Vec const &v)
bool isAlmostEq (Vec const &v) const
bool isAlmostZero () const
std::ostream & output (std::ostream &out) const
Vecset (T const x)
Vecadd (Vec const &v)
Vecsubtract (Vec const &v)
Vecscale (T const x)
Vecscale (Vec const &v)
length () const
squaredLength () const
minElement () const
maxElement () const
size_t argMax () const
size_t argMin () const
dot (Vec const &v) const
sum () const
Vecnormalize ()
VecsetLength (T const x)
VecclampMaxLength (T const x)
Vecshuffle ()
Vecrandomize ()
Vecwrap (Vec const &v)
Vecclamp (Vec const &lower, Vec const &upper)
VecprobabilityDistribution ()
 Make this into a probability distribution.
Vec relativeTo (Vec const &v) const
 Calculate a new vector that is this vector relative to v.


Detailed Description

template<class T>
class tagGame::Vec< T >

A basic templatized vector class.

The world probably doesn't need yet another vector class, but this one has several desirable properties:

It is not however meant to be a fully fledged linear algebra class. If you are looking for such a library try www.boost.org, geometrictools.com, or any of a host of other libraries.


The documentation for this class was generated from the following file:
Generated on Sat Mar 31 22:31:01 2007 for tagGame by  doxygen 1.5.1