QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | Protected Attributes | List of all members
Vector3D Class Reference

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

#include <Vector3D.h>

Public Member Functions

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

Protected Attributes

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

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 28 of file Vector3D.h.

Constructor & Destructor Documentation

◆ Vector3D() [1/3]

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

Constructor taking the three components as arguments.

Definition at line 70 of file Vector3D.h.

◆ Vector3D() [2/3]

Vector3D::Vector3D ( )
inline

Default constructor.

Definition at line 78 of file Vector3D.h.

◆ Vector3D() [3/3]

Vector3D::Vector3D ( const Vector3D v)

Copy constructor.

◆ ~Vector3D()

Vector3D::~Vector3D ( )
inline

Destructor.

Definition at line 86 of file Vector3D.h.

Member Function Documentation

◆ getLength()

double Vector3D::getLength ( ) const

Returns the length of the vector.

◆ getX()

double Vector3D::getX ( ) const
inline

Returns the x-component of the vector.

Definition at line 93 of file Vector3D.h.

◆ getY()

double Vector3D::getY ( ) const
inline

Returns the y-component of the vector.

Definition at line 98 of file Vector3D.h.

◆ getZ()

double Vector3D::getZ ( ) const
inline

Returns the z-component of the vector.

Definition at line 103 of file Vector3D.h.

◆ operator!=()

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

◆ operator=()

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

◆ operator==()

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

◆ setX()

void Vector3D::setX ( double  x)
inline

Sets the x-component of the vector.

Definition at line 108 of file Vector3D.h.

◆ setY()

void Vector3D::setY ( double  y)
inline

Sets the y-component of the vector.

Definition at line 113 of file Vector3D.h.

◆ setZ()

void Vector3D::setZ ( double  z)
inline

Sets the z-component of the vector.

Definition at line 118 of file Vector3D.h.

◆ standardise()

void Vector3D::standardise ( )

Standardises the vector.

Member Data Documentation

◆ mX

double Vector3D::mX
protected

X-component of the vector.

Definition at line 32 of file Vector3D.h.

◆ mY

double Vector3D::mY
protected

Y-component of the vector.

Definition at line 34 of file Vector3D.h.

◆ mZ

double Vector3D::mZ
protected

Z-component of the vector.

Definition at line 36 of file Vector3D.h.


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