QQuaternion subclass adding string serialization helpers.
More...
#include <quaternion.h>
|
| constexpr | Quaternion () noexcept |
| | Default constructor — identity quaternion.
|
| |
| | Quaternion (Qt::Initialization initialization) noexcept |
| | Construct with explicit initialization.
|
| |
| constexpr | Quaternion (float scalar, float xpos, float ypos, float zpos) noexcept |
| | Construct from scalar and vector components.
|
| |
| constexpr | Quaternion (float scalar, const QVector3D &vector) noexcept |
| | Construct from a scalar and a 3D vector.
|
| |
| constexpr | Quaternion (const QVector4D &vector) noexcept |
| | Construct from a 4D vector.
|
| |
| QString | toString () const |
| | Format this quaternion as a comma-separated string.
|
| |
|
| static Quaternion | fromString (const QString &value) |
| | Parse a quaternion from a comma-separated string.
|
| |
QQuaternion subclass adding string serialization helpers.
Quaternion forwards all QQuaternion constructors and adds toString() for human-readable output and fromString() for round-trip parsing.
Definition at line 12 of file quaternion.h.
◆ Quaternion() [1/5]
| constexpr Quaternion::Quaternion |
( |
| ) |
|
|
inlineconstexprnoexcept |
Default constructor — identity quaternion.
Definition at line 16 of file quaternion.h.
◆ Quaternion() [2/5]
| Quaternion::Quaternion |
( |
Qt::Initialization |
initialization | ) |
|
|
inlineexplicitnoexcept |
Construct with explicit initialization.
- Parameters
-
| initialization | Qt initialization flag |
Definition at line 22 of file quaternion.h.
◆ Quaternion() [3/5]
| constexpr Quaternion::Quaternion |
( |
float |
scalar, |
|
|
float |
xpos, |
|
|
float |
ypos, |
|
|
float |
zpos |
|
) |
| |
|
inlineconstexprnoexcept |
Construct from scalar and vector components.
- Parameters
-
| scalar | Scalar (w) component |
| xpos | X component |
| ypos | Y component |
| zpos | Z component |
Definition at line 31 of file quaternion.h.
◆ Quaternion() [4/5]
| constexpr Quaternion::Quaternion |
( |
float |
scalar, |
|
|
const QVector3D & |
vector |
|
) |
| |
|
inlineconstexprnoexcept |
Construct from a scalar and a 3D vector.
- Parameters
-
| scalar | Scalar (w) component |
| vector | 3D vector (x, y, z) |
Definition at line 39 of file quaternion.h.
◆ Quaternion() [5/5]
| constexpr Quaternion::Quaternion |
( |
const QVector4D & |
vector | ) |
|
|
inlineexplicitconstexprnoexcept |
Construct from a 4D vector.
- Parameters
-
| vector | 4D vector (x, y, z, w) |
Definition at line 47 of file quaternion.h.
◆ fromString()
| static Quaternion Quaternion::fromString |
( |
const QString & |
value | ) |
|
|
static |
Parse a quaternion from a comma-separated string.
- Parameters
-
| value | String of the form "x, y, z, scalar" |
- Returns
- Parsed Quaternion
◆ toString()
| QString Quaternion::toString |
( |
| ) |
const |
|
inline |
Format this quaternion as a comma-separated string.
- Returns
- String of the form "x, y, z, scalar"
Definition at line 55 of file quaternion.h.
The documentation for this class was generated from the following file: