Vector3D class

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 QgsPoint. The name 'vector' makes it easier to understand the programs.

Constructors, destructors, conversion operators

Vector3D(double x, double y, double z)
Constructor taking the three components as arguments.
Vector3D() defaulted
Default constructor.

Public functions

auto getLength() const -> double
Returns the length of the vector.
auto getX() const -> double
Returns the x-component of the vector.
auto getY() const -> double
Returns the y-component of the vector.
auto getZ() const -> double
Returns the z-component 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 variables

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