Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QQuaternion class represents a quaternion consisting of a vector and scalar. More...
Related Symbols | |
(Note that these are not member symbols.) | |
const QQuaternion | operator+ (const QQuaternion &q1, const QQuaternion &q2) noexcept |
Returns a QQuaternion object that is the sum of the given quaternions, q1 and q2; each component is added separately. | |
const QQuaternion | operator- (const QQuaternion &q1, const QQuaternion &q2) noexcept |
Returns a QQuaternion object that is formed by subtracting q2 from q1; each component is subtracted separately. | |
const QQuaternion | operator* (float factor, const QQuaternion &quaternion) noexcept |
Returns a copy of the given quaternion, multiplied by the given factor. | |
const QQuaternion | operator* (const QQuaternion &quaternion, float factor) noexcept |
Returns a copy of the given quaternion, multiplied by the given factor. | |
const QQuaternion | operator* (const QQuaternion &q1, const QQuaternion &q2) noexcept |
Multiplies q1 and q2 using quaternion multiplication. | |
const QQuaternion | operator- (const QQuaternion &quaternion) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QQuaternion object that is formed by changing the sign of all three components of the given quaternion. | |
const QQuaternion | operator/ (const QQuaternion &quaternion, float divisor) |
Returns the QQuaternion object formed by dividing all components of the given quaternion by the given divisor. | |
QVector3D | operator* (const QQuaternion &quaternion, const QVector3D &vec) noexcept |
bool | qFuzzyCompare (const QQuaternion &q1, const QQuaternion &q2) noexcept |
Returns true if q1 and q2 are equal, allowing for a small fuzziness factor for floating-point comparisons; false otherwise. | |
QDataStream & | operator<< (QDataStream &stream, const QQuaternion &quaternion) |
Writes the given quaternion to the given stream and returns a reference to the stream. | |
QDataStream & | operator>> (QDataStream &stream, QQuaternion &quaternion) |
Reads a quaternion from the given stream into the given quaternion and returns a reference to the stream. | |
The QQuaternion class represents a quaternion consisting of a vector and scalar.
\inmodule QtGui
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.
|
related |
Multiplies q1 and q2 using quaternion multiplication.
The result corresponds to applying both of the rotations specified by q1 and q2.
Definition at line 223 of file qquaternion.h.
|
related |
Rotates a vector vec with a quaternion quaternion to produce a new vector in 3D space.
Definition at line 309 of file qquaternion.h.
|
related |
Returns a copy of the given quaternion, multiplied by the given factor.
Definition at line 269 of file qquaternion.h.
|
related |
Returns a copy of the given quaternion, multiplied by the given factor.
Definition at line 264 of file qquaternion.h.
|
related |
Returns a QQuaternion object that is the sum of the given quaternions, q1 and q2; each component is added separately.
Definition at line 254 of file qquaternion.h.
|
related |
Returns a QQuaternion object that is formed by subtracting q2 from q1; each component is subtracted separately.
Definition at line 259 of file qquaternion.h.
|
related |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a QQuaternion object that is formed by changing the sign of all three components of the given quaternion.
Equivalent to {QQuaternion(0,0,0,0)
- quaternion}.
Definition at line 274 of file qquaternion.h.
|
related |
Returns the QQuaternion object formed by dividing all components of the given quaternion by the given divisor.
Definition at line 279 of file qquaternion.h.
|
related |
|
related |
|
related |
Returns true
if q1 and q2 are equal, allowing for a small fuzziness factor for floating-point comparisons; false otherwise.
Definition at line 284 of file qquaternion.h.