[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Vector3 Class Reference

general : Vector3 is a class for handling 3D Vectors manipulation. More...

#include <Vector3.h>

List of all members.

Public Member Functions

 Vector3 ()
 default constructor
 Vector3 (double a, double b, double c)
 constructor with initialisation
 Vector3 (const Vector3 &v)
 copy contructor
Vector3operator= (const Vector3 &v)
 copy operator
void Set (double a, double b, double c)
 set
bool operator== (const Vector3 &v) const
 comparison : equality
bool operator!= (const Vector3 &v) const
 comparison : not equal
bool IsZero () const
 comparison : zero
bool IsNearlyZero () const
 comparison : nearly zero
bool IsNearlyEqual (const Vector3 &v) const
 comparison : nearly equal
Vector3 operator+ (const Vector3 &v) const
 operator +
Vector3 operator- (const Vector3 &v) const
 operator -
Vector3 operator * (double Scale) const
 operator *(double)
Vector3 operator/ (double Scale) const
 operator /(double)
Vector3 operator- () const
 Unary minus.
Vector3 operator+= (const Vector3 &v)
 operator +=
Vector3 operator-= (const Vector3 &v)
 operator -=
Vector3 operator *= (double Scale)
 double multiply
Vector3 operator/= (double Scale)
 double divide
double Norm () const
 euclidien norm
double NormSquared () const
 squared norm
Vector3 Cross (const Vector3 &v) const
 cross product
double Dot (const Vector3 &v) const
 dot product
bool Normalize ()
 Normalize.
Vector3 GetNormalized () const
 return a normalized vector

Public Attributes

double x
 x,y,z coordinates, 0 at the initialisation
double y
 x,y,z coordinates, 0 at the initialisation
double z
 x,y,z coordinates, 0 at the initialisation

Friends

Vector3 operator * (double Scale, const Vector3 &v)
 operator *


Detailed Description

general : Vector3 is a class for handling 3D Vectors manipulation.

We made a choose to store only a 3 dimensions vectors to speed up system when we change of view point. A general 3D transformation could be placed in a 4x4 matrix, but some of the coefficients are always null. So that's waste of time.


Constructor & Destructor Documentation

Vector3::Vector3  )  [inline]
 

default constructor

Vector3::Vector3 double  a,
double  b,
double  c
[inline]
 

constructor with initialisation

Vector3::Vector3 const Vector3 v  )  [inline]
 

copy contructor


Member Function Documentation

Vector3 Vector3::Cross const Vector3 v  )  const [inline]
 

cross product

double Vector3::Dot const Vector3 v  )  const [inline]
 

dot product

Vector3 Vector3::GetNormalized  )  const
 

return a normalized vector

bool Vector3::IsNearlyEqual const Vector3 v  )  const
 

comparison : nearly equal

bool Vector3::IsNearlyZero  )  const
 

comparison : nearly zero

bool Vector3::IsZero  )  const
 

comparison : zero

double Vector3::Norm  )  const
 

euclidien norm

bool Vector3::Normalize  ) 
 

Normalize.

double Vector3::NormSquared  )  const
 

squared norm

Vector3 Vector3::operator * double  Scale  )  const [inline]
 

operator *(double)

Vector3 Vector3::operator *= double  Scale  )  [inline]
 

double multiply

bool Vector3::operator!= const Vector3 v  )  const [inline]
 

comparison : not equal

Vector3 Vector3::operator+ const Vector3 v  )  const [inline]
 

operator +

Vector3 Vector3::operator+= const Vector3 v  )  [inline]
 

operator +=

Vector3 Vector3::operator-  )  const [inline]
 

Unary minus.

Vector3 Vector3::operator- const Vector3 v  )  const [inline]
 

operator -

Vector3 Vector3::operator-= const Vector3 v  )  [inline]
 

operator -=

Vector3 Vector3::operator/ double  Scale  )  const
 

operator /(double)

Vector3 Vector3::operator/= double  Scale  ) 
 

double divide

Vector3& Vector3::operator= const Vector3 v  )  [inline]
 

copy operator

bool Vector3::operator== const Vector3 v  )  const [inline]
 

comparison : equality

void Vector3::Set double  a,
double  b,
double  c
 

set


Friends And Related Function Documentation

Vector3 operator * double  Scale,
const Vector3 v
[friend]
 

operator *


Member Data Documentation

double Vector3::x
 

x,y,z coordinates, 0 at the initialisation

double Vector3::y
 

x,y,z coordinates, 0 at the initialisation

double Vector3::z
 

x,y,z coordinates, 0 at the initialisation


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

Generated on Mon Sep 20 01:01:35 2010 for Hugintrunk by doxygen 1.3.9.1