Vector3D Class Reference

Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values. More...

#include <Vector3D.h>

List of all members.

Public Member Functions

 Vector3D (double x, double y, double z)
 Constructor taking the three components as arguments.
 Vector3D ()
 Default constructor.
 Vector3D (const Vector3D &v)
 Copy constructor.
 ~Vector3D ()
 Destructor.
Vector3Doperator= (const Vector3D &v)
bool operator== (const Vector3D &v)
bool operator!= (const Vector3D &v)
double getX () const
 Returns the x-component of the vector.
double getY () const
 Returns the y-component of the vector.
double getZ () const
 Returns the z-component of the vector.
double getLength () const
 Returns the length of the vector.
void setX (double x)
 Sets the x-component of the vector.
void setY (double y)
 Sets the y-component of the vector.
void setZ (double z)
 Sets the z-component of the vector.
void standardise ()
 Standardises the vector.

Protected Attributes

double mX
 X-component of the vector.
double mY
 Y-component of the vector.
double mZ
 Z-component of the vector.


Detailed Description

Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values.

In fact, the class is the same as Point3D. The name 'vector' makes it easier to understand the programs.

Definition at line 26 of file Vector3D.h.


Constructor & Destructor Documentation

Vector3D::Vector3D ( double  x,
double  y,
double  z 
) [inline]

Constructor taking the three components as arguments.

Definition at line 72 of file Vector3D.h.

Vector3D::Vector3D (  )  [inline]

Default constructor.

Definition at line 77 of file Vector3D.h.

Vector3D::Vector3D ( const Vector3D v  ) 

Copy constructor.

Vector3D::~Vector3D (  )  [inline]

Destructor.

Definition at line 82 of file Vector3D.h.


Member Function Documentation

Vector3D& Vector3D::operator= ( const Vector3D v  ) 

bool Vector3D::operator== ( const Vector3D v  ) 

bool Vector3D::operator!= ( const Vector3D v  ) 

double Vector3D::getX (  )  const [inline]

Returns the x-component of the vector.

Definition at line 89 of file Vector3D.h.

References mX.

double Vector3D::getY (  )  const [inline]

Returns the y-component of the vector.

Definition at line 94 of file Vector3D.h.

References mY.

double Vector3D::getZ (  )  const [inline]

Returns the z-component of the vector.

Definition at line 99 of file Vector3D.h.

References mZ.

double Vector3D::getLength (  )  const

Returns the length of the vector.

void Vector3D::setX ( double  x  )  [inline]

Sets the x-component of the vector.

Definition at line 104 of file Vector3D.h.

References mX.

void Vector3D::setY ( double  y  )  [inline]

Sets the y-component of the vector.

Definition at line 109 of file Vector3D.h.

References mY.

void Vector3D::setZ ( double  z  )  [inline]

Sets the z-component of the vector.

Definition at line 114 of file Vector3D.h.

References mZ.

void Vector3D::standardise (  ) 

Standardises the vector.


Member Data Documentation

double Vector3D::mX [protected]

X-component of the vector.

Definition at line 34 of file Vector3D.h.

Referenced by getX(), and setX().

double Vector3D::mY [protected]

Y-component of the vector.

Definition at line 36 of file Vector3D.h.

Referenced by getY(), and setY().

double Vector3D::mZ [protected]

Z-component of the vector.

Definition at line 38 of file Vector3D.h.

Referenced by getZ(), and setZ().


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

Generated on Sat Feb 4 19:17:59 2012 for Quantum GIS API Documentation by  doxygen 1.5.6