QGIS API Documentation
3.4.15-Madeira (e83d02e274)
|
3 Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precision instead of single precision floating point numbers. More...
#include <qgsvector3d.h>
Public Member Functions | |
QgsVector3D ()=default | |
Constructs a null vector. More... | |
QgsVector3D (double x, double y, double z) | |
Constructs a vector from given coordinates. More... | |
QgsVector3D (const QVector3D &v) | |
Constructs a vector from single-precision QVector3D. More... | |
bool | isNull () const |
Returns true if all three coordinates are zero. More... | |
double | length () const |
Returns the length of the vector. More... | |
void | normalize () |
Normalizes the current vector in place. More... | |
bool | operator!= (const QgsVector3D &other) const |
QgsVector3D | operator* (const double factor) const |
Returns a new vector multiplied by scalar. More... | |
QgsVector3D | operator+ (const QgsVector3D &other) const |
Returns sum of two vectors. More... | |
QgsVector3D | operator- (const QgsVector3D &other) const |
Returns difference of two vectors. More... | |
QgsVector3D | operator/ (const double factor) const |
Returns a new vector divided by scalar. More... | |
bool | operator== (const QgsVector3D &other) const |
void | set (double x, double y, double z) |
Sets vector coordinates. More... | |
double | x () const |
Returns X coordinate. More... | |
double | y () const |
Returns Y coordinate. More... | |
double | z () const |
Returns Z coordinate. More... | |
Static Public Member Functions | |
static QgsVector3D | crossProduct (const QgsVector3D &v1, const QgsVector3D &v2) |
Returns the cross product of two vectors. More... | |
static double | dotProduct (const QgsVector3D &v1, const QgsVector3D &v2) |
Returns the dot product of two vectors. More... | |
3 Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precision instead of single precision floating point numbers.
Definition at line 31 of file qgsvector3d.h.
|
default |
Constructs a null vector.
|
inline |
Constructs a vector from given coordinates.
Definition at line 38 of file qgsvector3d.h.
|
inline |
Constructs a vector from single-precision QVector3D.
Definition at line 42 of file qgsvector3d.h.
|
inlinestatic |
Returns the cross product of two vectors.
Definition at line 104 of file qgsvector3d.h.
|
inlinestatic |
Returns the dot product of two vectors.
Definition at line 98 of file qgsvector3d.h.
|
inline |
Returns true if all three coordinates are zero.
Definition at line 46 of file qgsvector3d.h.
|
inline |
Returns the length of the vector.
Definition at line 112 of file qgsvector3d.h.
|
inline |
Normalizes the current vector in place.
Definition at line 118 of file qgsvector3d.h.
|
inline |
Definition at line 67 of file qgsvector3d.h.
|
inline |
Returns a new vector multiplied by scalar.
Definition at line 85 of file qgsvector3d.h.
|
inline |
Returns sum of two vectors.
Definition at line 73 of file qgsvector3d.h.
|
inline |
Returns difference of two vectors.
Definition at line 79 of file qgsvector3d.h.
|
inline |
Returns a new vector divided by scalar.
Definition at line 92 of file qgsvector3d.h.
|
inline |
Definition at line 63 of file qgsvector3d.h.
|
inline |
Sets vector coordinates.
Definition at line 56 of file qgsvector3d.h.
|
inline |
Returns X coordinate.
Definition at line 49 of file qgsvector3d.h.
|
inline |
Returns Y coordinate.
Definition at line 51 of file qgsvector3d.h.
|
inline |
Returns Z coordinate.
Definition at line 53 of file qgsvector3d.h.