SGE::CL_Vector3D< TType > Class Template Reference

The class is used to store and manipulate 3 dimensions vector. It has XML support to load/save the vectors from/to XML files. More...

#include <cl_vector3.h>

Inheritance diagram for SGE::CL_Vector3D< TType >:

Inheritance graph
[legend]
Collaboration diagram for SGE::CL_Vector3D< TType >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

_SG_TLS_INLINE CL_Vector3D ()
 Default Constructor, clear the Vector to 0.
_SG_TLS_INLINE CL_Vector3D (const CLT_Vector< TType > &_Vec)
 Constructor.
_SG_TLS_INLINE CL_Vector3D (const CL_Vector3D< TType > &_Vec)
 Copy Constructor.
_SG_TLS_INLINE CL_Vector3D (const TType *_Val)
 Constructor, set the vector with _Val.
_SG_TLS_INLINE CL_Vector3D (const TType _Val)
 Constructor, set the vector will _Val.
_SG_TLS_INLINE CL_Vector3D (const TType _x, const TType _y, const TType _z)
 Constructor, set the vector values.
 ~CL_Vector3D ()
 Default destructor, do nothing yet.
_SG_TLS_INLINE void Set (const TType _x, const TType _y, const TType _z)
 Set the vector's value to _x, _y, _z.
_SG_TLS_INLINE CL_Vector3D<
TType > & 
operator= (const CL_Vector3D< TType > &_Vec2)
_SG_TLS_INLINE CL_Vector3D<
TType > & 
operator= (const TType *_Val)
 operator = with TType *_f. All the vector dimension will be set to _f[] value.
_SG_TLS_INLINE CL_Vector3D<
TType > & 
operator= (const TType _Val)
 operator = with TType _f. All the vector dimension will be set to _f value.
_SG_TLS_INLINE const TType operator% (const CL_Vector3D< TType > &) const
 Calculate the dot product with another CL_Vector3D.
_SG_TLS_INLINE const CL_Vector3D<
TType > 
operator^ (const CL_Vector3D< TType > &) const
 Calculate the cross product with another CL_Vector3D.
_SG_TLS_INLINE const CL_Vector3D<
TType > & 
operator^= (const CL_Vector3D< TType > &)
 Calculate the cross product with another CL_Vector3D and store it into the current one.
_SG_TLS_INLINE const TType operator! () const
 Calculate the distance to 0,0,0.
_SG_TLS_INLINE const CL_Vector3D<
TType > 
operator| (const TType &) const
_SG_TLS_INLINE CL_Vector3D<
TType > & 
operator|= (const TType &)
_SG_TLS_INLINE const TType Angle (const CL_Vector3D< TType > &) const
_SG_TLS_INLINE const CL_Vector3D<
TType > 
Reflection (const CL_Vector3D< TType > &) const
_SG_TLS_INLINE const CL_Vector3D<
TType > 
Rotate (const TType &, const CL_Vector3D< TType > &) const

Public Attributes

TType & x
 < X axe value. Y axe value.
TType & y
 Z axe value.
TType & z
 Z axe value.

Detailed Description

template<typename TType>
class SGE::CL_Vector3D< TType >

The class is used to store and manipulate 3 dimensions vector. It has XML support to load/save the vectors from/to XML files.

Todo:
Add support for matrix transformation??

Finish documentation.

Note:
Author:
Yannouchka


Constructor & Destructor Documentation

template<typename TType>
SGE::CL_Vector3D< TType >::CL_Vector3D  ) 
 

Default Constructor, clear the Vector to 0.

Returns:
Nothing

template<typename TType>
SGE::CL_Vector3D< TType >::CL_Vector3D const CLT_Vector< TType > &  _Vec  ) 
 

Constructor.

Returns:
Nothing

template<typename TType>
SGE::CL_Vector3D< TType >::CL_Vector3D const CL_Vector3D< TType > &  _Vec  ) 
 

Copy Constructor.

Parameters:
_Vec => Original vector to copy.
Returns:
Nothing

template<typename TType>
SGE::CL_Vector3D< TType >::CL_Vector3D const TType *  _Val  ) 
 

Constructor, set the vector with _Val.

Parameters:
_Val => TType array, if not null the 3 first TType are affected to the vectors(X/Y/Z/)
Returns:
Nothing

template<typename TType>
SGE::CL_Vector3D< TType >::CL_Vector3D const TType  _Val  ) 
 

Constructor, set the vector will _Val.

Parameters:
_Val => TType value, the 3 axes X/Y/Z/ are set to _Val
Returns:
Nothing

template<typename TType>
SGE::CL_Vector3D< TType >::CL_Vector3D const TType  _x,
const TType  _y,
const TType  _z
 

Constructor, set the vector values.

Returns:
Nothing

template<typename TType>
SGE::CL_Vector3D< TType >::~CL_Vector3D  ) 
 

Default destructor, do nothing yet.

Returns:
Nothing


Member Function Documentation

template<typename TType>
const TType SGE::CL_Vector3D< TType >::operator!  )  const
 

Calculate the distance to 0,0,0.

Returns:
The distance.

template<typename TType>
const TType SGE::CL_Vector3D< TType >::operator% const CL_Vector3D< TType > &  v  )  const
 

Calculate the dot product with another CL_Vector3D.

Returns:
Dot product result.

template<typename TType>
CL_Vector3D< TType > & SGE::CL_Vector3D< TType >::operator= const TType *  _Val  ) 
 

operator = with TType *_f. All the vector dimension will be set to _f[] value.

Note:
*_f must be an array of size >= to the vector dimension.

Reimplemented from SGE::CLT_Vector< TType >.

template<typename TType>
const CL_Vector3D< TType > SGE::CL_Vector3D< TType >::operator^ const CL_Vector3D< TType > &  v  )  const
 

Calculate the cross product with another CL_Vector3D.

Returns:
cross product result.

template<typename TType>
const CL_Vector3D< TType > & SGE::CL_Vector3D< TType >::operator^= const CL_Vector3D< TType > &  v  ) 
 

Calculate the cross product with another CL_Vector3D and store it into the current one.

Returns:
Current CL_Vector3D reference.

template<typename TType>
void SGE::CL_Vector3D< TType >::Set const TType  _x,
const TType  _y,
const TType  _z
 

Set the vector's value to _x, _y, _z.

Parameters:
_x => TType value for the X axe.
_y => TType value for the Y axe.
_z => TType value for the Z axe.
Returns:
Nothing


The documentation for this class was generated from the following file:
Generated on Mon Mar 19 23:15:16 2007 for SugoiTools by  doxygen 1.4.6-NO