QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
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 ()=default | |
Default constructor. More... | |
Vector3D (double x, double y, double z) | |
Constructor taking the three components as arguments. 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 |
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 = 0 |
X-component of the vector. More... | |
double | mY = 0 |
Y-component of the vector. More... | |
double | mZ = 0 |
Z-component of the vector. More... | |
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.
Definition at line 33 of file Vector3D.h.
|
inline |
Constructor taking the three components as arguments.
Definition at line 78 of file Vector3D.h.
|
default |
Default constructor.
double Vector3D::getLength | ( | ) | const |
Returns the length of the vector.
Definition at line 19 of file Vector3D.cpp.
|
inline |
Returns the x-component of the vector.
Definition at line 88 of file Vector3D.h.
|
inline |
Returns the y-component of the vector.
Definition at line 93 of file Vector3D.h.
|
inline |
Returns the z-component of the vector.
Definition at line 98 of file Vector3D.h.
bool Vector3D::operator!= | ( | const Vector3D & | v | ) | const |
Definition at line 37 of file Vector3D.cpp.
bool Vector3D::operator== | ( | const Vector3D & | v | ) | const |
Definition at line 32 of file Vector3D.cpp.
|
inline |
Sets the x-component of the vector.
Definition at line 103 of file Vector3D.h.
|
inline |
Sets the y-component of the vector.
Definition at line 108 of file Vector3D.h.
|
inline |
Sets the z-component of the vector.
Definition at line 113 of file Vector3D.h.
void Vector3D::standardise | ( | ) |
Standardises the vector.
Definition at line 24 of file Vector3D.cpp.
|
protected |
X-component of the vector.
Definition at line 37 of file Vector3D.h.
|
protected |
Y-component of the vector.
Definition at line 39 of file Vector3D.h.
|
protected |
Z-component of the vector.
Definition at line 41 of file Vector3D.h.