PythonQt.QtGui.QVector3D · declarations 001
Back to PythonQt.QtGui.QVector3D
crossProduct
crossProduct(v1: Any, v2: Any) -> Any
X.crossProduct(v1, v2) -> PythonQt.QtGui.QVector3D
Supplemental documentation: Qt 5 reference:
[static] QVector3D QVector3D::crossProduct(const QVector3D \&v1, const QVector3D \&v2)
Returns the cross-product of vectors v1 and v2, which corresponds to the normal vector of a plane defined by v1 and v2.
See also normal().
Upstream PySide2 reference signatures (binding differences may apply):
crossProduct(v1: PySide2.QtGui.QVector3D, v2: PySide2.QtGui.QVector3D) -> PySide2.QtGui.QVector3D
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#crossProduct
distanceToLine
distanceToLine(point: Any, direction: Any) -> float
X.distanceToLine(point, direction) -> float
Supplemental documentation: Qt 5 reference:
float QVector3D::distanceToLine(const QVector3D \&point, const QVector3D \&direction) const
Returns the distance that this vertex is from a line defined by point and the unit vector direction.
If direction is a null vector, then it does not define a line. In that case, the distance from point to this vertex is returned.
See also distanceToPlane().
Upstream PySide2 reference signatures (binding differences may apply):
distanceToLine(self, point: PySide2.QtGui.QVector3D, direction: PySide2.QtGui.QVector3D) -> float
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#distanceToLine
distanceToPlane
distanceToPlane(plane1: Any, plane2: Any, plane3: Any) -> float
X.distanceToPlane(plane1, plane2, plane3) -> float
Supplemental documentation: Qt 5 reference:
float QVector3D::distanceToPlane(const QVector3D \&plane, const QVector3D \&normal) const
Returns the distance from this vertex to a plane defined by the vertex plane and a normal unit vector. The normal parameter is assumed to have been normalized to a unit vector.
The return value will be negative if the vertex is below the plane, or zero if it is on the plane.
See also normal() and distanceToLine().
float QVector3D::distanceToPlane(const QVector3D \&plane1, const QVector3D \&plane2, const QVector3D \&plane3) const
This is an overloaded function.
Returns the distance from this vertex to a plane defined by the vertices plane1, plane2 and plane3.
The return value will be negative if the vertex is below the plane, or zero if it is on the plane.
The two vectors that define the plane are plane2 - plane1 and plane3 - plane1.
See also normal() and distanceToLine().
Upstream PySide2 reference signatures (binding differences may apply):
distanceToPlane(self, plane1: PySide2.QtGui.QVector3D, plane2: PySide2.QtGui.QVector3D, plane3: PySide2.QtGui.QVector3D) -> float
distanceToPlane(self, plane: PySide2.QtGui.QVector3D, normal: PySide2.QtGui.QVector3D) -> float
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#distanceToPlane
distanceToPoint
distanceToPoint(point: Any) -> float
X.distanceToPoint(point) -> float
Supplemental documentation: Qt 5 reference:
float QVector3D::distanceToPoint(const QVector3D \&point) const
Returns the distance from this vertex to a point defined by the vertex point.
This function was introduced in Qt 5.1.
See also distanceToPlane() and distanceToLine().
Upstream PySide2 reference signatures (binding differences may apply):
distanceToPoint(self, point: PySide2.QtGui.QVector3D) -> float
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#distanceToPoint
dotProduct
dotProduct(v1: Any, v2: Any) -> float
X.dotProduct(v1, v2) -> float
Supplemental documentation: Qt 5 reference:
[static] float QVector3D::dotProduct(const QVector3D \&v1, const QVector3D \&v2)
Returns the dot product of v1 and v2.
Upstream PySide2 reference signatures (binding differences may apply):
dotProduct(v1: PySide2.QtGui.QVector3D, v2: PySide2.QtGui.QVector3D) -> float
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#dotProduct
isNull
isNull() -> bool
X.isNull() -> bool
Supplemental documentation: Qt 5 reference:
bool QVector3D::isNull() const
Returns true if the x, y, and z coordinates are set to 0.0, otherwise returns false.
Upstream PySide2 reference signatures (binding differences may apply):
isNull(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#isNull
length
length() -> float
X.length() -> float
Supplemental documentation: Qt 5 reference:
float QVector3D::length() const
Returns the length of the vector from the origin.
See also lengthSquared() and normalized().
Upstream PySide2 reference signatures (binding differences may apply):
length(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#length
lengthSquared
lengthSquared() -> float
X.lengthSquared() -> float
Supplemental documentation: Qt 5 reference:
float QVector3D::lengthSquared() const
Returns the squared length of the vector from the origin. This is equivalent to the dot product of the vector with itself.
See also length() and dotProduct().
Upstream PySide2 reference signatures (binding differences may apply):
lengthSquared(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#lengthSquared
normal
normal(v1: Any, v2: Any, v3: Any) -> Any
X.normal(v1, v2, v3) -> PythonQt.QtGui.QVector3D
Supplemental documentation: Qt 5 reference:
[static] QVector3D QVector3D::normal(const QVector3D \&v1, const QVector3D \&v2)
Returns the normal vector of a plane defined by vectors v1 and v2, normalized to be a unit vector.
Use crossProduct() to compute the cross-product of v1 and v2 if you do not need the result to be normalized to a unit vector.
See also crossProduct() and distanceToPlane().
[static] QVector3D QVector3D::normal(const QVector3D \&v1, const QVector3D \&v2, const QVector3D \&v3)
This is an overloaded function.
Returns the normal vector of a plane defined by vectors v2 - v1 and v3 - v1, normalized to be a unit vector.
Use crossProduct() to compute the cross-product of v2 - v1 and v3 - v1 if you do not need the result to be normalized to a unit vector.
See also crossProduct() and distanceToPlane().
Upstream PySide2 reference signatures (binding differences may apply):
normal(v1: PySide2.QtGui.QVector3D, v2: PySide2.QtGui.QVector3D) -> PySide2.QtGui.QVector3D
normal(v1: PySide2.QtGui.QVector3D, v2: PySide2.QtGui.QVector3D, v3: PySide2.QtGui.QVector3D) -> PySide2.QtGui.QVector3D
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#normal
normalize
normalize() -> None
X.normalize()
Supplemental documentation: Qt 5 reference:
void QVector3D::normalize()
Normalizes the currect vector in place. Nothing happens if this vector is a null vector or the length of the vector is very close to 1.
See also length() and normalized().
Upstream PySide2 reference signatures (binding differences may apply):
normalize(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#normalize
normalized
normalized() -> Any
X.normalized() -> PythonQt.QtGui.QVector3D
Supplemental documentation: Qt 5 reference:
QVector3D QVector3D::normalized() const
Returns the normalized unit vector form of this vector.
If this vector is null, then a null vector is returned. If the length of the vector is very close to 1, then the vector will be returned as-is. Otherwise the normalized form of the vector of length 1 will be returned.
See also length() and normalize().
Upstream PySide2 reference signatures (binding differences may apply):
normalized(self) -> PySide2.QtGui.QVector3D
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#normalized
project
project(modelView: Any, projection: Any, viewport: Any) -> Any
X.project(modelView, projection, viewport) -> PythonQt.QtGui.QVector3D
Supplemental documentation: Qt 5 reference:
QVector3D QVector3D::project(const QMatrix4x4 \&modelView, const QMatrix4x4 \&projection, const QRect \&viewport) const
Returns the window coordinates of this vector initially in object/model coordinates using the model view matrix modelView, the projection matrix projection and the viewport dimensions viewport.
When transforming from clip to normalized space, a division by the w component on the vector components takes place. To prevent dividing by 0 if w equals to 0, it is set to 1.
Note: the returned y coordinates are in OpenGL orientation. OpenGL expects the bottom to be 0 whereas for Qt top is 0.
This function was introduced in Qt 5.5.
See also unproject().
Upstream PySide2 reference signatures (binding differences may apply):
project(self, modelView: PySide2.QtGui.QMatrix4x4, projection: PySide2.QtGui.QMatrix4x4, viewport: PySide2.QtCore.QRect) -> PySide2.QtGui.QVector3D
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#project
setX
setX(x: float) -> None
X.setX(x)
Supplemental documentation: Qt 5 reference:
void QVector3D::setX(float x)
Sets the x coordinate of this point to the given x coordinate.
See also x(), setY(), and setZ().
Upstream PySide2 reference signatures (binding differences may apply):
setX(self, x: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#setX
setY
setY(y: float) -> None
X.setY(y)
Supplemental documentation: Qt 5 reference:
void QVector3D::setY(float y)
Sets the y coordinate of this point to the given y coordinate.
See also y(), setX(), and setZ().
Upstream PySide2 reference signatures (binding differences may apply):
setY(self, y: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#setY
setZ
setZ(z: float) -> None
X.setZ(z)
Supplemental documentation: Qt 5 reference:
void QVector3D::setZ(float z)
Sets the z coordinate of this point to the given z coordinate.
See also z(), setX(), and setY().
Upstream PySide2 reference signatures (binding differences may apply):
setZ(self, z: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#setZ
toPoint
toPoint() -> Any
X.toPoint() -> PythonQt.QtCore.QPoint
Supplemental documentation: Qt 5 reference:
QPoint QVector3D::toPoint() const
Returns the QPoint form of this 3D vector. The z coordinate is dropped.
See also toPointF() and toVector2D().
Upstream PySide2 reference signatures (binding differences may apply):
toPoint(self) -> PySide2.QtCore.QPoint
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#toPoint
toPointF
toPointF() -> Any
X.toPointF() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
QPointF QVector3D::toPointF() const
Returns the QPointF form of this 3D vector. The z coordinate is dropped.
See also toPoint() and toVector2D().
Upstream PySide2 reference signatures (binding differences may apply):
toPointF(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#toPointF
toVector2D
toVector2D() -> Any
X.toVector2D() -> PythonQt.QtGui.QVector2D
Supplemental documentation: Qt 5 reference:
QVector2D QVector3D::toVector2D() const
Returns the 2D vector form of this 3D vector, dropping the z coordinate.
See also toVector4D() and toPoint().
Upstream PySide2 reference signatures (binding differences may apply):
toVector2D(self) -> PySide2.QtGui.QVector2D
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#toVector2D
toVector4D
toVector4D() -> Any
X.toVector4D() -> PythonQt.QtGui.QVector4D
Supplemental documentation: Qt 5 reference:
QVector4D QVector3D::toVector4D() const
Returns the 4D form of this 3D vector, with the w coordinate set to zero.
See also toVector2D() and toPoint().
Upstream PySide2 reference signatures (binding differences may apply):
toVector4D(self) -> PySide2.QtGui.QVector4D
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#toVector4D
unproject
unproject(modelView: Any, projection: Any, viewport: Any) -> Any
X.unproject(modelView, projection, viewport) -> PythonQt.QtGui.QVector3D
Supplemental documentation: Qt 5 reference:
QVector3D QVector3D::unproject(const QMatrix4x4 \&modelView, const QMatrix4x4 \&projection, const QRect \&viewport) const
Returns the object/model coordinates of this vector initially in window coordinates using the model view matrix modelView, the projection matrix projection and the viewport dimensions viewport.
When transforming from clip to normalized space, a division by the w component of the vector components takes place. To prevent dividing by 0 if w equals to 0, it is set to 1.
Note: y coordinates in viewport should use OpenGL orientation. OpenGL expects the bottom to be 0 whereas for Qt top is 0.
This function was introduced in Qt 5.5.
See also project().
Upstream PySide2 reference signatures (binding differences may apply):
unproject(self, modelView: PySide2.QtGui.QMatrix4x4, projection: PySide2.QtGui.QMatrix4x4, viewport: PySide2.QtCore.QRect) -> PySide2.QtGui.QVector3D
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#unproject
x
x() -> float
X.x() -> float
Supplemental documentation: Qt 5 reference:
float QVector3D::x() const
Returns the x coordinate of this point.
See also setX(), y(), and z().
Upstream PySide2 reference signatures (binding differences may apply):
x(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#x
y
y() -> float
X.y() -> float
Supplemental documentation: Qt 5 reference:
float QVector3D::y() const
Returns the y coordinate of this point.
See also setY(), x(), and z().
Upstream PySide2 reference signatures (binding differences may apply):
y(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#y
z
z() -> float
X.z() -> float
Supplemental documentation: Qt 5 reference:
float QVector3D::z() const
Returns the z coordinate of this point.
See also setZ(), x(), and y().
Upstream PySide2 reference signatures (binding differences may apply):
z(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qvector3d.html#z