QQuaternion¶
- PyQt5.QtGui.QQuaternion
Description¶
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Quaternions are used to represent rotations in 3D space, and consist of a 3D rotation axis specified by the x, y, and z coordinates, and a scalar representing the rotation angle.
Methods¶
- __init__()
TODO
- __init__(QVector4D)
TODO
- __init__(QQuaternion)
TODO
- __init__(float, QVector3D)
TODO
- __init__(float, float, float, float)
TODO
- __add__(QQuaternion) → QQuaternion
TODO
- conjugate() → QQuaternion
TODO
- conjugated() → QQuaternion
TODO
-
@staticmethod
dotProduct(QQuaternion, QQuaternion) → float TODO
- __eq__(QQuaternion) → bool
TODO
-
@staticmethod
fromAxes(QVector3D, QVector3D, QVector3D) → QQuaternion TODO
-
@staticmethod
fromAxisAndAngle(QVector3D, float) → QQuaternion TODO
-
@staticmethod
fromAxisAndAngle(float, float, float, float) → QQuaternion TODO
-
@staticmethod
fromDirection(QVector3D, QVector3D) → QQuaternion TODO
-
@staticmethod
fromEulerAngles(QVector3D) → QQuaternion TODO
-
@staticmethod
fromEulerAngles(float, float, float) → QQuaternion TODO
-
@staticmethod
fromRotationMatrix(QMatrix3x3) → QQuaternion TODO
- getAxisAndAngle() → (QVector3D, float)
TODO
- getEulerAngles() → (float, float, float)
TODO
- __iadd__(QQuaternion) → QQuaternion
TODO
- __imul__(float) → QQuaternion
TODO
- __imul__(QQuaternion) → QQuaternion
TODO
- inverted() → QQuaternion
TODO
- isIdentity() → bool
TODO
- isNull() → bool
TODO
- __isub__(QQuaternion) → QQuaternion
TODO
- __itruediv__(float) → QQuaternion
TODO
- length() → float
Returns the length of the quaternion. This is also called the “norm”.
See also
- lengthSquared() → float
Returns the squared length of the quaternion.
See also
- __mul__(QQuaternion) → QQuaternion
TODO
- __mul__(float) → QQuaternion
TODO
- __ne__(QQuaternion) → bool
TODO
- __neg__() → QQuaternion
TODO
-
@staticmethod
nlerp(QQuaternion, QQuaternion, float) → QQuaternion TODO
- 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
- normalized() → QQuaternion
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
- __repr__() → str
TODO
- __rmul__(float) → QQuaternion
TODO
- rotatedVector(QVector3D) → QVector3D
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();
-
@staticmethod
rotationTo(QVector3D, QVector3D) → QQuaternion TODO
- scalar() → float
See also
- setScalar(float)
TODO
- setVector(float, float, float)
TODO
- setX(float)
TODO
- setY(float)
TODO
- setZ(float)
TODO
-
@staticmethod
slerp(QQuaternion, QQuaternion, float) → QQuaternion TODO
- __sub__(QQuaternion) → QQuaternion
TODO
- toEulerAngles() → QVector3D
TODO
- toRotationMatrix() → QMatrix3x3
TODO
- toVector4D() → QVector4D
TODO
- __truediv__(float) → QQuaternion
TODO
- vector() → QVector3D
See also
- x() → float
See also
- y() → float
See also
- z() → float
See also