| 
    QGIS API Documentation 3.99.0-Master (f78f5286a64)
    
   | 
 
A 3D vector (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.   | |
| QgsVector3D (const QVector3D &v) | |
| Constructs a vector from single-precision QVector3D.   | |
| QgsVector3D (double x, double y, double z) | |
| Constructs a vector from given coordinates.   | |
| double | distance (const QgsVector3D &other) const | 
| Returns the distance with the other QgsVector3D.   | |
| bool | isNull () const | 
Returns true if all three coordinates are zero.   | |
| double | length () const | 
| Returns the length of the vector.   | |
| void | normalize () | 
| Normalizes the current vector in place.   | |
| bool | operator!= (const QgsVector3D &other) const | 
| QgsVector3D | operator* (const double factor) const | 
| Returns a new vector multiplied by scalar.   | |
| QgsVector3D | operator+ (const QgsVector3D &other) const | 
| Returns sum of two vectors.   | |
| const QgsVector3D | operator- () const | 
| Swaps the sign of the components of the vector.   | |
| QgsVector3D | operator- (const QgsVector3D &other) const | 
| Returns difference of two vectors.   | |
| QgsVector3D | operator/ (const double factor) const | 
| Returns a new vector divided by scalar.   | |
| bool | operator== (const QgsVector3D &other) const | 
| void | set (double x, double y, double z) | 
| Sets vector coordinates.   | |
| void | setX (double x) | 
| Sets X coordinate.   | |
| void | setY (double y) | 
| Sets Y coordinate.   | |
| void | setZ (double z) | 
| Sets Z coordinate.   | |
| QString | toString (int precision=17) const | 
| Returns a string representation of the 3D vector.   | |
| QVector3D | toVector3D () const | 
| Converts the current object to QVector3D.   | |
| double | x () const | 
| Returns X coordinate.   | |
| double | y () const | 
| Returns Y coordinate.   | |
| double | z () const | 
| Returns Z coordinate.   | |
Static Public Member Functions | |
| static QgsVector3D | crossProduct (const QgsVector3D &v1, const QgsVector3D &v2) | 
| Returns the cross product of two vectors.   | |
| static double | dotProduct (const QgsVector3D &v1, const QgsVector3D &v2) | 
| Returns the dot product of two vectors.   | |
| static QgsVector3D | perpendicularPoint (const QgsVector3D &v1, const QgsVector3D &v2, const QgsVector3D &vp) | 
| Returns the perpendicular point of vector vp from [v1 - v2].   | |
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of single precision floating point numbers.
Definition at line 29 of file qgsvector3d.h.
      
  | 
  default | 
Constructs a null vector.
      
  | 
  inline | 
Constructs a vector from given coordinates.
Definition at line 36 of file qgsvector3d.h.
      
  | 
  inline | 
Constructs a vector from single-precision QVector3D.
Definition at line 40 of file qgsvector3d.h.
      
  | 
  inlinestatic | 
Returns the cross product of two vectors.
Definition at line 131 of file qgsvector3d.h.
      
  | 
  inline | 
Returns the distance with the other QgsVector3D.
Definition at line 157 of file qgsvector3d.h.
      
  | 
  inlinestatic | 
Returns the dot product of two vectors.
Definition at line 125 of file qgsvector3d.h.
      
  | 
  inline | 
Returns true if all three coordinates are zero. 
Definition at line 44 of file qgsvector3d.h.
      
  | 
  inline | 
Returns the length of the vector.
Definition at line 139 of file qgsvector3d.h.
      
  | 
  inline | 
Normalizes the current vector in place.
Definition at line 145 of file qgsvector3d.h.
      
  | 
  inline | 
Definition at line 84 of file qgsvector3d.h.
      
  | 
  inline | 
Returns a new vector multiplied by scalar.
Definition at line 112 of file qgsvector3d.h.
      
  | 
  inline | 
Returns sum of two vectors.
Definition at line 90 of file qgsvector3d.h.
      
  | 
  inline | 
Swaps the sign of the components of the vector.
Definition at line 106 of file qgsvector3d.h.
      
  | 
  inline | 
Returns difference of two vectors.
Definition at line 96 of file qgsvector3d.h.
      
  | 
  inline | 
Returns a new vector divided by scalar.
Definition at line 119 of file qgsvector3d.h.
      
  | 
  inline | 
Definition at line 80 of file qgsvector3d.h.
      
  | 
  inlinestatic | 
Returns the perpendicular point of vector vp from [v1 - v2].
Definition at line 165 of file qgsvector3d.h.
      
  | 
  inline | 
Sets vector coordinates.
Definition at line 72 of file qgsvector3d.h.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Returns a string representation of the 3D vector.
Members will be truncated to the specified precision.
Definition at line 178 of file qgsvector3d.h.
      
  | 
  inline | 
Converts the current object to QVector3D.
Definition at line 195 of file qgsvector3d.h.
      
  | 
  inline | 
Returns X coordinate.
Definition at line 47 of file qgsvector3d.h.
      
  | 
  inline | 
Returns Y coordinate.
Definition at line 49 of file qgsvector3d.h.
      
  | 
  inline | 
Returns Z coordinate.
Definition at line 51 of file qgsvector3d.h.