QVector3D subclass with string serialization support.
More...
#include <vector3d.h>
|
| constexpr | Vector3D () noexcept |
| | Default constructor — creates a zero vector.
|
| |
| | Vector3D (Qt::Initialization initialization) noexcept |
| | Construct with a Qt initialization sentinel.
|
| |
| constexpr | Vector3D (float xpos, float ypos, float zpos) noexcept |
| | Construct with explicit x, y, z components.
|
| |
| constexpr | Vector3D (QPoint point) noexcept |
| | Construct from a QPoint (z = 0).
|
| |
| constexpr | Vector3D (QPointF point) noexcept |
| | Construct from a QPointF (z = 0).
|
| |
| constexpr | Vector3D (QVector2D vector) noexcept |
| | Construct from a QVector2D (z = 0).
|
| |
| constexpr | Vector3D (QVector2D vector, float zpos) noexcept |
| | Construct from a QVector2D with an explicit z component.
|
| |
| constexpr | Vector3D (QVector4D vector) noexcept |
| | Construct from a QVector4D (w is discarded).
|
| |
| QString | toString () const |
| | Serialize the vector to a human-readable string.
|
| |
|
| static Vector3D | fromString (const QString &value) |
| | Deserialize a vector from a "x, y, z" string.
|
| |
QVector3D subclass with string serialization support.
Mirrors all QVector3D constructors and adds toString() / fromString() for human-readable "x, y, z" serialization.
Definition at line 12 of file vector3d.h.
◆ Vector3D() [1/8]
| constexpr Vector3D::Vector3D |
( |
| ) |
|
|
inlineconstexprnoexcept |
Default constructor — creates a zero vector.
Definition at line 16 of file vector3d.h.
◆ Vector3D() [2/8]
| Vector3D::Vector3D |
( |
Qt::Initialization |
initialization | ) |
|
|
inlineexplicitnoexcept |
Construct with a Qt initialization sentinel.
- Parameters
-
| initialization | Qt::Initialization value |
Definition at line 23 of file vector3d.h.
◆ Vector3D() [3/8]
| constexpr Vector3D::Vector3D |
( |
float |
xpos, |
|
|
float |
ypos, |
|
|
float |
zpos |
|
) |
| |
|
inlineconstexprnoexcept |
Construct with explicit x, y, z components.
- Parameters
-
| xpos | X component |
| ypos | Y component |
| zpos | Z component |
Definition at line 32 of file vector3d.h.
◆ Vector3D() [4/8]
| constexpr Vector3D::Vector3D |
( |
QPoint |
point | ) |
|
|
inlineexplicitconstexprnoexcept |
Construct from a QPoint (z = 0).
- Parameters
-
Definition at line 39 of file vector3d.h.
◆ Vector3D() [5/8]
| constexpr Vector3D::Vector3D |
( |
QPointF |
point | ) |
|
|
inlineexplicitconstexprnoexcept |
Construct from a QPointF (z = 0).
- Parameters
-
Definition at line 46 of file vector3d.h.
◆ Vector3D() [6/8]
| constexpr Vector3D::Vector3D |
( |
QVector2D |
vector | ) |
|
|
inlineexplicitconstexprnoexcept |
Construct from a QVector2D (z = 0).
- Parameters
-
Definition at line 54 of file vector3d.h.
◆ Vector3D() [7/8]
| constexpr Vector3D::Vector3D |
( |
QVector2D |
vector, |
|
|
float |
zpos |
|
) |
| |
|
inlineconstexprnoexcept |
Construct from a QVector2D with an explicit z component.
- Parameters
-
| vector | Source 2D vector |
| zpos | Z component |
Definition at line 62 of file vector3d.h.
◆ Vector3D() [8/8]
| constexpr Vector3D::Vector3D |
( |
QVector4D |
vector | ) |
|
|
inlineexplicitconstexprnoexcept |
Construct from a QVector4D (w is discarded).
- Parameters
-
Definition at line 71 of file vector3d.h.
◆ fromString()
| static Vector3D Vector3D::fromString |
( |
const QString & |
value | ) |
|
|
static |
Deserialize a vector from a "x, y, z" string.
- Parameters
-
- Returns
- Parsed Vector3D
◆ toString()
| QString Vector3D::toString |
( |
| ) |
const |
|
inline |
Serialize the vector to a human-readable string.
- Returns
- String of the form "x, y, z"
Definition at line 79 of file vector3d.h.
The documentation for this class was generated from the following file: