GameEngine::Vector3 Class Reference

#include <Vector3.h>

Collaboration diagram for GameEngine::Vector3:

Collaboration graph
[legend]
List of all members.

Detailed Description

3D vector class

Definition at line 30 of file Vector3.h.

Public Member Functions

 Vector3 ()
 Vector3 (const Vector3 &v)
 Vector3 (Real x, Real y, Real z)
 ~Vector3 ()
Real length () const
Real dot (const Vector3 &v) const
Vector3 cross (const Vector3 &v) const
Vector3normalise ()
Vector3 operator+ (const Vector3 &v) const
Vector3 operator- (const Vector3 &v) const
Vector3 operator * (const Real scalar) const
Vector3operator *= (Real scalar)
 operator Ogre::Vector3 () const
 operator opal::Vec3r () const
 operator opal::Point3r () const

Static Public Member Functions

static Vector3 vecFromOgre (Ogre::Vector3 v)
static Vector3 vecFromOpal (opal::Vec3r v)
static Vector3 vecFromOpal (opal::Point3r v)

Public Attributes

Real mX
Real mY
Real mZ

Static Public Attributes

static const Vector3 ZERO
static const Vector3 UNIT_X
static const Vector3 UNIT_Y
static const Vector3 UNIT_Z


Constructor & Destructor Documentation

GameEngine::Vector3::Vector3 (  ) 

Default constructor

Definition at line 30 of file Vector3.cpp.

GameEngine::Vector3::Vector3 ( const Vector3 v  ) 

Copy contructor

Parameters:
v The vector to create a copy of

Definition at line 38 of file Vector3.cpp.

GameEngine::Vector3::Vector3 ( Real  x,
Real  y,
Real  z 
)

Construct a vector from three values

Parameters:
x The x component
y The y component
z The z component

Definition at line 47 of file Vector3.cpp.

GameEngine::Vector3::~Vector3 (  ) 

Definition at line 56 of file Vector3.cpp.


Member Function Documentation

Real GameEngine::Vector3::length (  )  const

Definition at line 61 of file Vector3.cpp.

Real GameEngine::Vector3::dot ( const Vector3 v  )  const

Definition at line 68 of file Vector3.cpp.

Vector3 GameEngine::Vector3::cross ( const Vector3 v  )  const

Definition at line 74 of file Vector3.cpp.

Vector3 & GameEngine::Vector3::normalise (  ) 

Normalise the vector

Definition at line 83 of file Vector3.cpp.

Vector3 GameEngine::Vector3::operator+ ( const Vector3 v  )  const

Definition at line 96 of file Vector3.cpp.

Vector3 GameEngine::Vector3::operator- ( const Vector3 v  )  const

Vector3 GameEngine::Vector3::operator * ( const Real  scalar  )  const

Definition at line 108 of file Vector3.cpp.

Vector3 & GameEngine::Vector3::operator *= ( Real  scalar  ) 

Definition at line 113 of file Vector3.cpp.

GameEngine::Vector3::operator Ogre::Vector3 (  )  const [inline]

Definition at line 85 of file Vector3.h.

GameEngine::Vector3::operator opal::Vec3r (  )  const [inline]

Definition at line 88 of file Vector3.h.

GameEngine::Vector3::operator opal::Point3r (  )  const [inline]

Definition at line 91 of file Vector3.h.

static Vector3 GameEngine::Vector3::vecFromOgre ( Ogre::Vector3  v  )  [inline, static]

Definition at line 96 of file Vector3.h.

static Vector3 GameEngine::Vector3::vecFromOpal ( opal::Vec3r  v  )  [inline, static]

Definition at line 100 of file Vector3.h.

static Vector3 GameEngine::Vector3::vecFromOpal ( opal::Point3r  v  )  [inline, static]

Definition at line 104 of file Vector3.h.


Member Data Documentation

Real GameEngine::Vector3::mX

Definition at line 107 of file Vector3.h.

Real GameEngine::Vector3::mY

Definition at line 107 of file Vector3.h.

Real GameEngine::Vector3::mZ

Definition at line 107 of file Vector3.h.

const Vector3 GameEngine::Vector3::ZERO [static]

Definition at line 110 of file Vector3.h.

const Vector3 GameEngine::Vector3::UNIT_X [static]

Definition at line 111 of file Vector3.h.

const Vector3 GameEngine::Vector3::UNIT_Y [static]

Definition at line 112 of file Vector3.h.

const Vector3 GameEngine::Vector3::UNIT_Z [static]

Definition at line 113 of file Vector3.h.


The documentation for this class was generated from the following files:
Generated on Thu Apr 19 09:49:11 2007 for GameEngine by  doxygen 1.5.2