QQuaternion::Axis Struct
struct QQuaternion::Axis该结构体在 Qt 6.11 中引入。
- 所有成员列表(包括继承的成员)
- Axis 属于3D 渲染 的一部分。
公共函数
| QVector3D | toVector3D() const |
公共变量
静态公共成员
| QQuaternion::Axis | fromVector3D(QVector3D v) |
相关的非成员
(since 6.11) bool | qFuzzyIsNull(QQuaternion::Axis axis) |
详细说明
一个表示 3D 轴的结构体,用于定义quaternions 至three (orthonormal) axes 之间的坐标。
该结构体本身并不限制其x 、y 和z 成员的值,但使用此类型的QQuaternion 函数可能会进行限制。特别是,Axis对象无需归一化。
该类型与QVector3D 非常相似,可与之轻松互转,但应用范围更为狭窄。你可以将其视为QVector3D 的“强typedef”。
另请参阅 QQuaternion::Axes 。
成员函数文档
[static constexpr noexcept] QQuaternion::Axis Axis::fromVector3D(QVector3D v)
根据v 构建一个Axis,就像通过
return Axis{v.x(), v.y(), v.z()}}[constexpr noexcept] QVector3D Axis::toVector3D() const
将该Axis作为QVector3D 返回,如同通过
Axis a = *this;
return QVector3D{a.x, a.y, a.z}相关非成员
[noexcept, since 6.11] bool qFuzzyIsNull(QQuaternion::Axis axis)
如果axis 是退化的(即等于(0, 0, 0) ,这允许浮点数比较中存在微小的容差),则返回true ;否则返回false 。
该函数在 Qt 6.11 中引入。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.