Subgroup: other
Class: QgsVector3D¶
-
class
qgis.core.
QgsVector3D
¶ Bases:
sip.wrapper
Constructs a null vector
QgsVector3D(x: float, y: float, z: float) Constructs a vector from given coordinates
QgsVector3D(QgsVector3D)
Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precision instead of single precision floating point numbers.
New in version 3.0: Methods
crossProduct
Returns the cross product of two vectors dotProduct
Returns the dot product of two vectors isNull
Returns true if all three coordinates are zero length
Returns the length of the vector normalize
Normalizes the current vector in place. set
Sets vector coordinates x
Returns X coordinate y
Returns Y coordinate z
Returns Z coordinate Signals
Attributes
-
crossProduct
(v1: QgsVector3D, v2: QgsVector3D) → QgsVector3D¶ Returns the cross product of two vectors
-
dotProduct
(v1: QgsVector3D, v2: QgsVector3D) → float¶ Returns the dot product of two vectors
-
isNull
(self) → bool¶ Returns true if all three coordinates are zero
-
length
(self) → float¶ Returns the length of the vector
-
normalize
(self)¶ Normalizes the current vector in place.
-
set
(self, x: float, y: float, z: float)¶ Sets vector coordinates
-
x
(self) → float¶ Returns X coordinate
-
y
(self) → float¶ Returns Y coordinate
-
z
(self) → float¶ Returns Z coordinate
-