version 3.3

VRS::Vector3Base< T > Class Template Reference

3D Vector Class. More...

#include <vrs/vector.h>

Inheritance diagram for VRS::Vector3Base< T >:

VRS::VertexData< 3, T >

List of all members.

Public Member Functions

 Vector3Base (T x=T(0.0), T y=T(0.0), T z=T(0.0))
bool operator== (const Vector3Base &other) const
bool operator!= (const Vector3Base &other) const
bool operator< (const Vector3Base &other) const
 The comparison is based on the lexiographic order.
T & operator[] (unsigned int index)
operator[] (unsigned int index) const
 Indices 0,1, and 2 correspond to the x,y,z coordinates of the vector.
Vector3Baseoperator+= (const Vector3Base &other)
Vector3Baseoperator-= (const Vector3Base &other)
Vector3Baseoperator*= (const Vector3Base &other)
Vector3Baseoperator*= (T scalar)
Vector3Baseoperator/= (T scalar)
Vector3Base operator+ (const Vector3Base &other) const
Vector3Base operator- (const Vector3Base &other) const
Vector3Base operator* (const Vector3Base &other) const
Vector3Base operator* (T scalar) const
Vector3Base operator/ (T scalar) const
Vector3Base operator- () const
Vector3Base normalized () const
bool normalize ()
abs () const
abs2 () const
dotProduct (const Vector3Base &other) const
 Vector3Base length and scalar and cross product methods.
Vector3Base crossProduct (const Vector3Base &other) const
bool isOrigin () const

Static Public Member Functions

static void convertVector3dToVector3f (const Vector3Base< double > &, Vector3Base< float > &)
static void convertVector3fToVector3d (const Vector3Base< float > &, Vector3Base< double > &)

Static Public Attributes

static const Vector3Baseorigin


Detailed Description

template<typename T>
class VRS::Vector3Base< T >

3D Vector Class.

Constructor & Destructor Documentation

template<typename T>
VRS::Vector3Base< T >::Vector3Base ( x = T(0.0),
y = T(0.0),
z = T(0.0) 
) [explicit]


Member Function Documentation

template<typename T>
bool VRS::Vector3Base< T >::operator== ( const Vector3Base< T > &  other  )  const

template<typename T>
bool VRS::Vector3Base< T >::operator!= ( const Vector3Base< T > &  other  )  const

template<typename T>
bool VRS::Vector3Base< T >::operator< ( const Vector3Base< T > &  other  )  const

The comparison is based on the lexiographic order.

template<typename T>
T& VRS::Vector3Base< T >::operator[] ( unsigned int  index  ) 

Reimplemented from VRS::VertexData< 3, T >.

template<typename T>
T VRS::Vector3Base< T >::operator[] ( unsigned int  index  )  const

Indices 0,1, and 2 correspond to the x,y,z coordinates of the vector.

Reimplemented from VRS::VertexData< 3, T >.

template<typename T>
Vector3Base& VRS::Vector3Base< T >::operator+= ( const Vector3Base< T > &  other  ) 

template<typename T>
Vector3Base& VRS::Vector3Base< T >::operator-= ( const Vector3Base< T > &  other  ) 

template<typename T>
Vector3Base& VRS::Vector3Base< T >::operator*= ( const Vector3Base< T > &  other  ) 

template<typename T>
Vector3Base& VRS::Vector3Base< T >::operator*= ( scalar  ) 

template<typename T>
Vector3Base& VRS::Vector3Base< T >::operator/= ( scalar  ) 

template<typename T>
Vector3Base VRS::Vector3Base< T >::operator+ ( const Vector3Base< T > &  other  )  const

template<typename T>
Vector3Base VRS::Vector3Base< T >::operator- ( const Vector3Base< T > &  other  )  const

template<typename T>
Vector3Base VRS::Vector3Base< T >::operator* ( const Vector3Base< T > &  other  )  const

template<typename T>
Vector3Base VRS::Vector3Base< T >::operator* ( scalar  )  const

template<typename T>
Vector3Base VRS::Vector3Base< T >::operator/ ( scalar  )  const

template<typename T>
Vector3Base VRS::Vector3Base< T >::operator- (  )  const

template<typename T>
Vector3Base VRS::Vector3Base< T >::normalized (  )  const

template<typename T>
bool VRS::Vector3Base< T >::normalize (  ) 

`normalized' returns a normalized copy of the vector object. `normalize' normalizes the vector object. If the length of the vector was > 0, it returns 1 for success, otherwise 0.

template<typename T>
T VRS::Vector3Base< T >::abs (  )  const

template<typename T>
T VRS::Vector3Base< T >::abs2 (  )  const

template<typename T>
T VRS::Vector3Base< T >::dotProduct ( const Vector3Base< T > &  other  )  const

Vector3Base length and scalar and cross product methods.

template<typename T>
Vector3Base VRS::Vector3Base< T >::crossProduct ( const Vector3Base< T > &  other  )  const

Vector3Base cross product method. Behavior like the mathematical expression, if you read the signature from left to right. Example: c = (0,0,1) = a.crossProduct (b), with a =(1,0,0), b=(0,1,0).

template<typename T>
static void VRS::Vector3Base< T >::convertVector3dToVector3f ( const Vector3Base< double > &  ,
Vector3Base< float > &   
) [static]

template<typename T>
static void VRS::Vector3Base< T >::convertVector3fToVector3d ( const Vector3Base< float > &  ,
Vector3Base< double > &   
) [static]

template<typename T>
bool VRS::Vector3Base< T >::isOrigin (  )  const


Member Data Documentation

template<typename T>
const Vector3Base& VRS::Vector3Base< T >::origin [static]


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

Generated on Wed May 22 06:00:36 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact