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) |
详细说明
代表三维轴的结构体,用于定义quaternions, 至three (orthonormal) axes 。
该结构体本身并不限制其x 、y 和z 成员的值,但使用该类型的QQuaternion 函数可能会限制其值。尤其是,轴对象不需要规范化。
该类型与QVector3D 非常相似,可以很容易地进行转换,但侧重点更窄。您可以将其称为QVector3D 的 "强类型定义"。
另请参见 QQuaternion::Axes 。
成员函数文档
[static constexpr noexcept] QQuaternion::Axis Axis::fromVector3D(QVector3D v)
从v 中构造一个轴,就像通过
return Axis{v.x(), v.y(), v.z()}}
[constexpr noexcept] QVector3D Axis::toVector3D() const
以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.