Vector3d Class Reference

This class represents a three dimensional vector. More...

#include <Vector3d.h>

List of all members.

Public Member Functions

 Vector3d ()
 Standard constructer which initializes the vector to {0.0; 0.0; 0.0}.
 Vector3d (double p_x, double p_y, double p_z)
 Constructor which initializes the vector with the given values.
virtual ~Vector3d ()
 Standard destructor.
Vector3d operator/ (double divident)
 Divides the vector by the given value.
Vector3d operator- (Vector3d subtrahend)
 Subtracts the given vector.
Vector3d operator+ (Vector3d summand)
 Adds the given vector.
Vector3d operator * (double factor)
 Multiplies the vector with the given value.
Vector3d operator+= (Vector3d summand)
 Adds the given vector.
Vector3d operator-= (Vector3d subtrahend)
 Subtracts the given vector.
Vector3d operator *= (double factor)
 Multiplies the vector with the given value.
Vector3d operator/= (double divident)
 Divides the vector by the given value.
double length ()
 Returns the length of the vector in three dimensional room.

Public Attributes

double x
 Holds the x-value of the vector.
double y
 Holds the y-value of the vector.
double z
 Holds the z-value of the vector.


Detailed Description

This class represents a three dimensional vector.

Definition at line 27 of file Vector3d.h.


Constructor & Destructor Documentation

Vector3d::Vector3d (  ) 

Standard constructer which initializes the vector to {0.0; 0.0; 0.0}.

Definition at line 25 of file Vector3d.cpp.

References x, y, and z.

Vector3d::Vector3d ( double  p_x,
double  p_y,
double  p_z 
)

Constructor which initializes the vector with the given values.

Parameters:
p_x The amaount for the x-value of the vector.
p_y The amaount for the y-value of the vector.
p_z The amaount for the z-value of the vector.

Definition at line 32 of file Vector3d.cpp.

References x, y, and z.

Vector3d::~Vector3d (  )  [virtual]

Standard destructor.

Definition at line 102 of file Vector3d.cpp.


Member Function Documentation

Vector3d Vector3d::operator/ ( double  divident  ) 

Divides the vector by the given value.

Parameters:
divident The value the vector will be divided by.
Returns:
The resultiung vector.

Definition at line 72 of file Vector3d.cpp.

References x, y, and z.

Vector3d Vector3d::operator- ( Vector3d  subtrahend  ) 

Subtracts the given vector.

Parameters:
subtrahend The vector that will be substracted.
Returns:
The resultiung vector.

Definition at line 54 of file Vector3d.cpp.

References x, y, and z.

Vector3d Vector3d::operator+ ( Vector3d  summand  ) 

Adds the given vector.

Parameters:
summand The vector that will be added.
Returns:
The resultiung vector.

Definition at line 45 of file Vector3d.cpp.

References x, y, and z.

Vector3d Vector3d::operator * ( double  factor  ) 

Multiplies the vector with the given value.

Parameters:
factor The value the vector will be multiplied with.
Returns:
The resulting vector.

Definition at line 63 of file Vector3d.cpp.

References x, y, and z.

Vector3d Vector3d::operator+= ( Vector3d  summand  ) 

Adds the given vector.

Parameters:
summand The vector that will be added.
Returns:
The resultiung vector.

Definition at line 81 of file Vector3d.cpp.

Vector3d Vector3d::operator-= ( Vector3d  subtrahend  ) 

Subtracts the given vector.

Parameters:
subtrahend The vector that will be substracted.
Returns:
The resultiung vector.

Definition at line 86 of file Vector3d.cpp.

Vector3d Vector3d::operator *= ( double  factor  ) 

Multiplies the vector with the given value.

Parameters:
factor The value the vector will be multiplied with.
Returns:
The resultiung vector.

Definition at line 91 of file Vector3d.cpp.

Vector3d Vector3d::operator/= ( double  divident  ) 

Divides the vector by the given value.

Parameters:
divident The value the vector will be divided by.
Returns:
The resultiung vector.

Definition at line 96 of file Vector3d.cpp.

double Vector3d::length (  ) 

Returns the length of the vector in three dimensional room.

Returns:
The length of the vector in three dimensional room.

Definition at line 39 of file Vector3d.cpp.

References x, y, and z.

Referenced by DAEffect::render().


Member Data Documentation

double Vector3d::x

Holds the x-value of the vector.

Definition at line 124 of file Vector3d.h.

Referenced by Level::initViewCamera(), length(), operator *(), operator+(), operator-(), operator/(), Unit::render(), Object::render(), Interface::render(), DAEffect::render(), Level::renderScene(), FunctionHandler::scroll(), FunctionHandler::scrollLeft(), FunctionHandler::scrollRight(), and Vector3d().

double Vector3d::y

Holds the y-value of the vector.

Definition at line 129 of file Vector3d.h.

Referenced by Level::initViewCamera(), length(), operator *(), operator+(), operator-(), operator/(), Unit::render(), Object::render(), Interface::render(), DAEffect::render(), Level::renderScene(), FunctionHandler::scroll(), FunctionHandler::scrollDown(), FunctionHandler::scrollUp(), and Vector3d().

double Vector3d::z

Holds the z-value of the vector.

Definition at line 134 of file Vector3d.h.

Referenced by Level::initViewCamera(), length(), operator *(), operator+(), operator-(), operator/(), Unit::render(), Object::render(), Interface::render(), DAEffect::render(), FunctionHandler::scroll(), Vector3d(), FunctionHandler::zoomIn(), and FunctionHandler::zoomOut().


The documentation for this class was generated from the following files:
Generated on Tue Jul 17 22:02:23 2007 for C0re by  doxygen 1.5.2