Keos::CVector3< T > Class Template Reference

Standard 3-dimensional vector with customizable type. More...

#include <KeosVector3.h>

List of all members.

Public Member Functions

 CVector3 (T X=0, T Y=0, T Z=0)
 Default constructor.
void Set (T X, T Y, T Z)
 Set vector.
Length () const
 Returns the length (magnitude) of the vector (sqrt(x² + y²)).
LengthSq () const
 Returns the square of the length(magnitude) of the vector (x² + y²).
void Normalize ()
 Normalizes the vector.
CVector3< T > operator+ () const
CVector3< T > operator- () const
CVector3< T > operator+ (const CVector3< T > &v) const
CVector3< T > operator- (const CVector3< T > &v) const
const CVector3< T > & operator+= (const CVector3< T > &v)
const CVector3< T > & operator-= (const CVector3< T > &v)
const CVector3< T > & operator *= (T t)
const CVector3< T > & operator/= (T t)
bool operator== (const CVector3< T > &v) const
bool operator!= (const CVector3< T > &v) const
 operator T * ()
 T* cast operator.

Public Attributes

x
y
z


Detailed Description

template<class T>
class Keos::CVector3< T >

Standard 3-dimensional vector with customizable type.

Definition at line 34 of file KeosVector3.h.


Constructor & Destructor Documentation

template<class T>
Keos::CVector3< T >::CVector3 ( X = 0,
Y = 0,
Z = 0 
) [inline]

Default constructor.

Definition at line 104 of file KeosVector3.h.


Member Function Documentation

template<class T>
void Keos::CVector3< T >::Set ( X,
Y,
Z 
) [inline]

Set vector.

Definition at line 112 of file KeosVector3.h.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

template<class T>
T Keos::CVector3< T >::Length (  )  const [inline]

Returns the length (magnitude) of the vector (sqrt(x² + y²)).

Definition at line 121 of file KeosVector3.h.

References Keos::CVector3< T >::LengthSq().

Referenced by Keos::CVector3< T >::Normalize().

template<class T>
T Keos::CVector3< T >::LengthSq (  )  const [inline]

Returns the square of the length(magnitude) of the vector (x² + y²).

Definition at line 128 of file KeosVector3.h.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

Referenced by Keos::CMesh::ComputeNormals(), and Keos::CVector3< T >::Length().

template<class T>
void Keos::CVector3< T >::Normalize (  )  [inline]

Normalizes the vector.

Definition at line 135 of file KeosVector3.h.

References Keos::CVector3< T >::Length(), Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

Referenced by Keos::CMath::calculateBasicFaceNormal(), Keos::CMesh::ComputeNormals(), and Keos::CMatrix4::LookAt().

template<class T>
CVector3< T > Keos::CVector3< T >::operator+ (  )  const [inline]

Definition at line 149 of file KeosVector3.h.

template<class T>
CVector3< T > Keos::CVector3< T >::operator- (  )  const [inline]

Definition at line 156 of file KeosVector3.h.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

template<class T>
CVector3< T > Keos::CVector3< T >::operator+ ( const CVector3< T > &  v  )  const [inline]

Definition at line 163 of file KeosVector3.h.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

template<class T>
CVector3< T > Keos::CVector3< T >::operator- ( const CVector3< T > &  v  )  const [inline]

Definition at line 170 of file KeosVector3.h.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

template<class T>
const CVector3< T > & Keos::CVector3< T >::operator+= ( const CVector3< T > &  v  )  [inline]

Definition at line 177 of file KeosVector3.h.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

template<class T>
const CVector3< T > & Keos::CVector3< T >::operator-= ( const CVector3< T > &  v  )  [inline]

Definition at line 188 of file KeosVector3.h.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

template<class T>
const CVector3< T > & Keos::CVector3< T >::operator *= ( t  )  [inline]

Definition at line 199 of file KeosVector3.h.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

template<class T>
const CVector3< T > & Keos::CVector3< T >::operator/= ( t  )  [inline]

Definition at line 210 of file KeosVector3.h.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

template<class T>
bool Keos::CVector3< T >::operator== ( const CVector3< T > &  v  )  const [inline]

Definition at line 221 of file KeosVector3.h.

References Keos::CVector3< T >::x, Keos::CVector3< T >::y, and Keos::CVector3< T >::z.

template<class T>
bool Keos::CVector3< T >::operator!= ( const CVector3< T > &  v  )  const [inline]

Definition at line 230 of file KeosVector3.h.

template<class T>
Keos::CVector3< T >::operator T * (  )  [inline]

T* cast operator.

Returns:
Pointer on the vector components.

Definition at line 237 of file KeosVector3.h.

References Keos::CVector3< T >::x.


Member Data Documentation

template<class T>
T Keos::CVector3< T >::x

Definition at line 80 of file KeosVector3.h.

Referenced by Keos::CMath::calculateFaceNormal(), Keos::CMath::calculateFaceNormalWithoutNormalize(), Keos::CQuaternion::FromAxisAngle(), Keos::CVector3< T >::LengthSq(), Keos::CMatrix4::LookAt(), Keos::CVector3< T >::Normalize(), Keos::CVector3< T >::operator *=(), Keos::CVector3< T >::operator T *(), Keos::CVector3< T >::operator+(), Keos::CVector3< T >::operator+=(), Keos::CVector3< T >::operator-(), Keos::CVector3< T >::operator-=(), Keos::CVector3< T >::operator/=(), Keos::CVector3< T >::operator==(), Keos::operator>>(), Keos::CVector3< T >::Set(), Keos::CLight::SetDirection(), Keos::COGLRenderSystem::SetLight(), Keos::CD3D9RenderSystem::SetLight(), Keos::CShader::SetParameter(), Keos::CLight::SetPosition(), Keos::CMatrix4::SetRotationX(), Keos::CMatrix4::SetRotationY(), Keos::CMatrix4::SetRotationZ(), Keos::CMatrix4::SetTranslation(), Keos::CQuaternion::ToAxisAngle(), Keos::VectorBetweenTwoPoints(), Keos::VectorCross(), and Keos::VectorDot().

template<class T>
T Keos::CVector3< T >::y

Definition at line 80 of file KeosVector3.h.

Referenced by Keos::CMath::calculateFaceNormal(), Keos::CMath::calculateFaceNormalWithoutNormalize(), Keos::CQuaternion::FromAxisAngle(), Keos::CVector3< T >::LengthSq(), Keos::CMatrix4::LookAt(), Keos::CVector3< T >::Normalize(), Keos::CVector3< T >::operator *=(), Keos::CVector3< T >::operator+(), Keos::CVector3< T >::operator+=(), Keos::CVector3< T >::operator-(), Keos::CVector3< T >::operator-=(), Keos::CVector3< T >::operator/=(), Keos::CVector3< T >::operator==(), Keos::operator>>(), Keos::CVector3< T >::Set(), Keos::CLight::SetDirection(), Keos::COGLRenderSystem::SetLight(), Keos::CD3D9RenderSystem::SetLight(), Keos::CShader::SetParameter(), Keos::CLight::SetPosition(), Keos::CMatrix4::SetRotationX(), Keos::CMatrix4::SetRotationY(), Keos::CMatrix4::SetRotationZ(), Keos::CMatrix4::SetTranslation(), Keos::CQuaternion::ToAxisAngle(), Keos::VectorBetweenTwoPoints(), Keos::VectorCross(), and Keos::VectorDot().

template<class T>
T Keos::CVector3< T >::z

Definition at line 80 of file KeosVector3.h.

Referenced by Keos::CMath::calculateFaceNormal(), Keos::CMath::calculateFaceNormalWithoutNormalize(), Keos::CQuaternion::FromAxisAngle(), Keos::CVector3< T >::LengthSq(), Keos::CMatrix4::LookAt(), Keos::CVector3< T >::Normalize(), Keos::CVector3< T >::operator *=(), Keos::CVector3< T >::operator+(), Keos::CVector3< T >::operator+=(), Keos::CVector3< T >::operator-(), Keos::CVector3< T >::operator-=(), Keos::CVector3< T >::operator/=(), Keos::CVector3< T >::operator==(), Keos::operator>>(), Keos::CVector3< T >::Set(), Keos::CLight::SetDirection(), Keos::COGLRenderSystem::SetLight(), Keos::CD3D9RenderSystem::SetLight(), Keos::CShader::SetParameter(), Keos::CLight::SetPosition(), Keos::CMatrix4::SetRotationX(), Keos::CMatrix4::SetRotationY(), Keos::CMatrix4::SetRotationZ(), Keos::CMatrix4::SetTranslation(), Keos::CQuaternion::ToAxisAngle(), Keos::VectorBetweenTwoPoints(), Keos::VectorCross(), and Keos::VectorDot().


The documentation for this class was generated from the following file:
Generated on Fri Mar 9 14:29:30 2007 for Keos by  doxygen 1.5.1-p1