PythonQt.QtGui.QQuaternion · declarations 001
Back to PythonQt.QtGui.QQuaternion
conjugate
conjugate() -> Any
X.conjugate() -> PythonQt.QtGui.QQuaternion
Upstream PySide2 reference signatures (binding differences may apply):
conjugate(self) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#conjugate
conjugated
conjugated() -> Any
X.conjugated() -> PythonQt.QtGui.QQuaternion
Supplemental documentation: Qt 5 reference:
QQuaternion QQuaternion::conjugated() const
Returns the conjugate of this quaternion, which is (-x, -y, -z, scalar).
This function was introduced in Qt 5.5.
Upstream PySide2 reference signatures (binding differences may apply):
conjugated(self) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#conjugated
dotProduct
dotProduct(q1: Any, q2: Any) -> float
X.dotProduct(q1, q2) -> float
Supplemental documentation: Qt 5 reference:
[static] float QQuaternion::dotProduct(const QQuaternion \&q1, const QQuaternion \&q2)
Returns the dot product of q1 and q2.
This function was introduced in Qt 5.5.
See also length().
Upstream PySide2 reference signatures (binding differences may apply):
dotProduct(q1: PySide2.QtGui.QQuaternion, q2: PySide2.QtGui.QQuaternion) -> float
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#dotProduct
fromAxes
fromAxes(xAxis: Any, yAxis: Any, zAxis: Any) -> Any
X.fromAxes(xAxis, yAxis, zAxis) -> PythonQt.QtGui.QQuaternion
Supplemental documentation: Qt 5 reference:
[static] QQuaternion QQuaternion::fromAxes(const QVector3D \&xAxis, const QVector3D \&yAxis, const QVector3D \&zAxis)
Constructs the quaternion using 3 axes (xAxis, yAxis, zAxis).
Note: The axes are assumed to be orthonormal.
This function was introduced in Qt 5.5.
See also getAxes() and fromRotationMatrix().
Upstream PySide2 reference signatures (binding differences may apply):
fromAxes(xAxis: PySide2.QtGui.QVector3D, yAxis: PySide2.QtGui.QVector3D, zAxis: PySide2.QtGui.QVector3D) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#fromAxes
fromAxisAndAngle
fromAxisAndAngle(x: Any, y: Any, z: Any, angle: float) -> Any
X.fromAxisAndAngle(x, y, z, angle) -> PythonQt.QtGui.QQuaternion
Supplemental documentation: Qt 5 reference:
[static] QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D \&axis, float angle)
Creates a normalized quaternion that corresponds to rotating through angle degrees about the specified 3D axis.
See also getAxisAndAngle().
[static] QQuaternion QQuaternion::fromAxisAndAngle(float x, float y, float z, float angle)
Creates a normalized quaternion that corresponds to rotating through angle degrees about the 3D axis (x, y, z).
See also getAxisAndAngle().
Upstream PySide2 reference signatures (binding differences may apply):
fromAxisAndAngle(axis: PySide2.QtGui.QVector3D, angle: float) -> PySide2.QtGui.QQuaternion
fromAxisAndAngle(x: float, y: float, z: float, angle: float) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#fromAxisAndAngle
fromDirection
fromDirection(direction: Any, up: Any) -> Any
X.fromDirection(direction, up) -> PythonQt.QtGui.QQuaternion
Supplemental documentation: Qt 5 reference:
[static] QQuaternion QQuaternion::fromDirection(const QVector3D \&direction, const QVector3D \&up)
Constructs the quaternion using specified forward direction direction and upward direction up. If the upward direction was not specified or the forward and upward vectors are collinear, a new orthonormal upward direction will be generated.
This function was introduced in Qt 5.5.
See also fromAxes() and rotationTo().
Upstream PySide2 reference signatures (binding differences may apply):
fromDirection(direction: PySide2.QtGui.QVector3D, up: PySide2.QtGui.QVector3D) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#fromDirection
fromEulerAngles
fromEulerAngles(pitch: Any, yaw: Any, roll: Any) -> Any
X.fromEulerAngles(pitch, yaw, roll) -> PythonQt.QtGui.QQuaternion
Supplemental documentation: Qt 5 reference:
[static] QQuaternion QQuaternion::fromEulerAngles(float pitch, float yaw, float roll)
Creates a quaternion that corresponds to a rotation of roll degrees around the z axis, pitch degrees around the x axis, and yaw degrees around the y axis (in that order).
This function was introduced in Qt 5.5.
See also getEulerAngles().
[static] QQuaternion QQuaternion::fromEulerAngles(const QVector3D \&eulerAngles)
This is an overloaded function.
Creates a quaternion that corresponds to a rotation of eulerAngles: eulerAngles.z() degrees around the z axis, eulerAngles.x() degrees around the x axis, and eulerAngles.y() degrees around the y axis (in that order).
This function was introduced in Qt 5.5.
See also toEulerAngles().
Upstream PySide2 reference signatures (binding differences may apply):
fromEulerAngles(eulerAngles: PySide2.QtGui.QVector3D) -> PySide2.QtGui.QQuaternion
fromEulerAngles(pitch: float, yaw: float, roll: float) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#fromEulerAngles
getAxes
getAxes(xAxis: Any, yAxis: Any, zAxis: Any) -> None
X.getAxes(xAxis, yAxis, zAxis)
Supplemental documentation: Qt 5 reference:
void QQuaternion::getAxes(QVector3D *xAxis, QVector3D *yAxis, QVector3D *zAxis) const
Returns the 3 orthonormal axes (xAxis, yAxis, zAxis) defining the quaternion.
This function was introduced in Qt 5.5.
See also fromAxes() and toRotationMatrix().
Upstream PySide2 reference signatures (binding differences may apply):
getAxes(self, xAxis: PySide2.QtGui.QVector3D, yAxis: PySide2.QtGui.QVector3D, zAxis: PySide2.QtGui.QVector3D) -> None
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#getAxes
getAxisAndAngle
getAxisAndAngle(x: Any, y: Any, z: Any, angle: Any) -> Any
X.getAxisAndAngle(x, y, z, angle)
Supplemental documentation: Qt 5 reference:
void QQuaternion::getAxisAndAngle(float *x, float *y, float *z, float *angle) const
Extracts a 3D axis (x, y, z) and a rotating angle angle (in degrees) that corresponds to this quaternion.
This function was introduced in Qt 5.5.
See also fromAxisAndAngle().
void QQuaternion::getAxisAndAngle(QVector3D *axis, float *angle) const
This is an overloaded function.
Extracts a 3D axis axis and a rotating angle angle (in degrees) that corresponds to this quaternion.
This function was introduced in Qt 5.5.
See also fromAxisAndAngle().
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#getAxisAndAngle
getEulerAngles
getEulerAngles(pitch: Any, yaw: Any, roll: Any) -> Any
X.getEulerAngles(pitch, yaw, roll)
Supplemental documentation: Qt 5 reference:
void QQuaternion::getEulerAngles(float *pitch, float *yaw, float *roll) const
Calculates roll, pitch, and yaw Euler angles (in degrees) that corresponds to this quaternion.
This function was introduced in Qt 5.5.
See also fromEulerAngles().
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#getEulerAngles
inverted
inverted() -> Any
X.inverted() -> PythonQt.QtGui.QQuaternion
Supplemental documentation: Qt 5 reference:
QQuaternion QQuaternion::inverted() const
Returns the inverse of this quaternion. If this quaternion is null, then a null quaternion is returned.
This function was introduced in Qt 5.5.
See also isNull() and length().
Upstream PySide2 reference signatures (binding differences may apply):
inverted(self) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#inverted
isIdentity
isIdentity() -> bool
X.isIdentity() -> bool
Supplemental documentation: Qt 5 reference:
bool QQuaternion::isIdentity() const
Returns true if the x, y, and z components of this quaternion are set to 0.0, and the
scalar component is set to 1.0; otherwise returns false.
Upstream PySide2 reference signatures (binding differences may apply):
isIdentity(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#isIdentity
isNull
isNull() -> bool
X.isNull() -> bool
Supplemental documentation: Qt 5 reference:
bool QQuaternion::isNull() const
Returns true if the x, y, z, and scalar components of this quaternion 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/qquaternion.html#isNull
length
length() -> float
X.length() -> float
Supplemental documentation: Qt 5 reference:
float QQuaternion::length() const
Returns the length of the quaternion. This is also called the "norm".
See also lengthSquared(), normalized(), and dotProduct().
Upstream PySide2 reference signatures (binding differences may apply):
length(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#length
lengthSquared
lengthSquared() -> float
X.lengthSquared() -> float
Supplemental documentation: Qt 5 reference:
float QQuaternion::lengthSquared() const
Returns the squared length of the quaternion.
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/qquaternion.html#lengthSquared
nlerp
nlerp(q1: Any, q2: Any, t: float) -> Any
X.nlerp(q1, q2, t) -> PythonQt.QtGui.QQuaternion
Supplemental documentation: Qt 5 reference:
[static] QQuaternion QQuaternion::nlerp(const QQuaternion \&q1, const QQuaternion \&q2, float t)
Interpolates along the shortest linear path between the rotational positions q1 and q2. The value t should be between 0 and 1, indicating the distance to travel between q1 and q2. The result will be normalized().
If t is less than or equal to 0, then q1 will be returned. If t is greater than or equal to 1, then q2 will be returned.
The nlerp() function is typically faster than slerp() and will give approximate results to spherical interpolation that are good enough for some applications.
See also slerp().
Upstream PySide2 reference signatures (binding differences may apply):
nlerp(q1: PySide2.QtGui.QQuaternion, q2: PySide2.QtGui.QQuaternion, t: float) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#nlerp
normalize
normalize() -> None
X.normalize()
Supplemental documentation: Qt 5 reference:
void QQuaternion::normalize()
Normalizes the current quaternion in place. Nothing happens if this is a null quaternion or the length of the quaternion 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/qquaternion.html#normalize
normalized
normalized() -> Any
X.normalized() -> PythonQt.QtGui.QQuaternion
Supplemental documentation: Qt 5 reference:
QQuaternion QQuaternion::normalized() const
Returns the normalized unit form of this quaternion.
If this quaternion is null, then a null quaternion is returned. If the length of the quaternion is very close to 1, then the quaternion will be returned as-is. Otherwise the normalized form of the quaternion of length 1 will be returned.
See also normalize(), length(), and dotProduct().
Upstream PySide2 reference signatures (binding differences may apply):
normalized(self) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#normalized
rotatedVector
rotatedVector(vector: Any) -> Any
X.rotatedVector(vector) -> PythonQt.QtGui.QVector3D
Supplemental documentation: Qt 5 reference:
QVector3D QQuaternion::rotatedVector(const QVector3D \&vector) const
Rotates vector with this quaternion to produce a new vector in 3D space. The following code:
QVector3D result = q.rotatedVector(vector);
is equivalent to the following:
QVector3D result = (q * QQuaternion(0, vector) * q.conjugated()).vector();
Upstream PySide2 reference signatures (binding differences may apply):
rotatedVector(self, vector: PySide2.QtGui.QVector3D) -> PySide2.QtGui.QVector3D
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#rotatedVector
rotationTo
rotationTo(*args: Any, **kwargs: Any) -> Any
X.rotationTo(from, to) -> PythonQt.QtGui.QQuaternion
Supplemental documentation: Qt 5 reference:
[static] QQuaternion QQuaternion::rotationTo(const QVector3D \&from, const QVector3D \&to)
Returns the shortest arc quaternion to rotate from the direction described by the vector from to the direction described by the vector to.
This function was introduced in Qt 5.5.
See also fromDirection().
Upstream PySide2 reference signatures (binding differences may apply):
rotationTo(from_: PySide2.QtGui.QVector3D, to: PySide2.QtGui.QVector3D) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#rotationTo
scalar
scalar() -> float
X.scalar() -> float
Supplemental documentation: Qt 5 reference:
float QQuaternion::scalar() const
Returns the scalar component of this quaternion.
See also setScalar(), x(), y(), and z().
Upstream PySide2 reference signatures (binding differences may apply):
scalar(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#scalar
setScalar
setScalar(scalar: float) -> None
X.setScalar(scalar)
Supplemental documentation: Qt 5 reference:
void QQuaternion::setScalar(float scalar)
Sets the scalar component of this quaternion to scalar.
See also scalar(), setX(), setY(), and setZ().
Upstream PySide2 reference signatures (binding differences may apply):
setScalar(self, scalar: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#setScalar
setVector
setVector(x: Any, y: Any, z: Any) -> None
X.setVector(x, y, z)
Supplemental documentation: Qt 5 reference:
void QQuaternion::setVector(const QVector3D \&vector)
Sets the vector component of this quaternion to vector.
See also vector() and setScalar().
void QQuaternion::setVector(float x, float y, float z)
Sets the vector component of this quaternion to (x, y, z).
See also vector() and setScalar().
Upstream PySide2 reference signatures (binding differences may apply):
setVector(self, vector: PySide2.QtGui.QVector3D) -> None
setVector(self, x: float, y: float, z: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#setVector
setX
setX(x: float) -> None
X.setX(x)
Supplemental documentation: Qt 5 reference:
void QQuaternion::setX(float x)
Sets the x coordinate of this quaternion's vector to the given x coordinate.
See also x(), setY(), setZ(), and setScalar().
Upstream PySide2 reference signatures (binding differences may apply):
setX(self, x: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#setX
setY
setY(y: float) -> None
X.setY(y)
Supplemental documentation: Qt 5 reference:
void QQuaternion::setY(float y)
Sets the y coordinate of this quaternion's vector to the given y coordinate.
See also y(), setX(), setZ(), and setScalar().
Upstream PySide2 reference signatures (binding differences may apply):
setY(self, y: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#setY
setZ
setZ(z: float) -> None
X.setZ(z)
Supplemental documentation: Qt 5 reference:
void QQuaternion::setZ(float z)
Sets the z coordinate of this quaternion's vector to the given z coordinate.
See also z(), setX(), setY(), and setScalar().
Upstream PySide2 reference signatures (binding differences may apply):
setZ(self, z: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#setZ
slerp
slerp(q1: Any, q2: Any, t: float) -> Any
X.slerp(q1, q2, t) -> PythonQt.QtGui.QQuaternion
Supplemental documentation: Qt 5 reference:
[static] QQuaternion QQuaternion::slerp(const QQuaternion \&q1, const QQuaternion \&q2, float t)
Interpolates along the shortest spherical path between the rotational positions q1 and q2. The value t should be between 0 and 1, indicating the spherical distance to travel between q1 and q2.
If t is less than or equal to 0, then q1 will be returned. If t is greater than or equal to 1, then q2 will be returned.
See also nlerp().
Upstream PySide2 reference signatures (binding differences may apply):
slerp(q1: PySide2.QtGui.QQuaternion, q2: PySide2.QtGui.QQuaternion, t: float) -> PySide2.QtGui.QQuaternion
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#slerp
toEulerAngles
toEulerAngles() -> Any
X.toEulerAngles() -> PythonQt.QtGui.QVector3D
Supplemental documentation: Qt 5 reference:
QVector3D QQuaternion::toEulerAngles() const
This is an overloaded function.
Calculates roll, pitch, and yaw Euler angles (in degrees) that corresponds to this quaternion.
This function was introduced in Qt 5.5.
See also fromEulerAngles().
Upstream PySide2 reference signatures (binding differences may apply):
toEulerAngles(self) -> PySide2.QtGui.QVector3D
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#toEulerAngles
toVector4D
toVector4D() -> Any
X.toVector4D() -> PythonQt.QtGui.QVector4D
Supplemental documentation: Qt 5 reference:
QVector4D QQuaternion::toVector4D() const
Returns this quaternion as a 4D vector.
Upstream PySide2 reference signatures (binding differences may apply):
toVector4D(self) -> PySide2.QtGui.QVector4D
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#toVector4D
vector
vector() -> Any
X.vector() -> PythonQt.QtGui.QVector3D
Supplemental documentation: Qt 5 reference:
QVector3D QQuaternion::vector() const
Returns the vector component of this quaternion.
See also setVector() and scalar().
Upstream PySide2 reference signatures (binding differences may apply):
vector(self) -> PySide2.QtGui.QVector3D
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#vector
x
x() -> float
X.x() -> float
Supplemental documentation: Qt 5 reference:
float QQuaternion::x() const
Returns the x coordinate of this quaternion's vector.
See also setX(), y(), z(), and scalar().
Upstream PySide2 reference signatures (binding differences may apply):
x(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#x
y
y() -> float
X.y() -> float
Supplemental documentation: Qt 5 reference:
float QQuaternion::y() const
Returns the y coordinate of this quaternion's vector.
See also setY(), x(), z(), and scalar().
Upstream PySide2 reference signatures (binding differences may apply):
y(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#y
z
z() -> float
X.z() -> float
Supplemental documentation: Qt 5 reference:
float QQuaternion::z() const
Returns the z coordinate of this quaternion's vector.
See also setZ(), x(), y(), and scalar().
Upstream PySide2 reference signatures (binding differences may apply):
z(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qquaternion.html#z