Qt3DCore::QJoint Class
class Qt3DCore::QJoint用于变换蒙皮网格的某些部分。更多
头文件: | #include <QJoint> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
qmake: | QT += 3dcore |
在 QML 中: | Joint |
继承: | Qt3DCore::QNode |
状态: | 已废弃 |
属性
|
|
公共功能
QJoint(Qt3DCore::QNode *parent = nullptr) | |
void | addChildJoint(Qt3DCore::QJoint *joint) |
QList<Qt3DCore::QJoint *> | childJoints() const |
QMatrix4x4 | inverseBindMatrix() const |
QString | name() const |
void | removeChildJoint(Qt3DCore::QJoint *joint) |
QQuaternion | rotation() const |
float | rotationX() const |
float | rotationY() const |
float | rotationZ() const |
QVector3D | scale() const |
QVector3D | translation() const |
公共插槽
void | setInverseBindMatrix(const QMatrix4x4 &inverseBindMatrix) |
void | setName(const QString &name) |
void | setRotation(const QQuaternion &rotation) |
void | setRotationX(float rotationX) |
void | setRotationY(float rotationY) |
void | setRotationZ(float rotationZ) |
void | setScale(const QVector3D &scale) |
void | setToIdentity() |
void | setTranslation(const QVector3D &translation) |
信号
void | inverseBindMatrixChanged(const QMatrix4x4 &inverseBindMatrix) |
void | nameChanged(const QString &name) |
void | rotationChanged(const QQuaternion &rotation) |
void | rotationXChanged(float rotationX) |
void | rotationYChanged(float rotationY) |
void | rotationZChanged(float rotationZ) |
void | scaleChanged(const QVector3D &scale) |
void | translationChanged(const QVector3D &translation) |
属性文档
inverseBindMatrix : QMatrix4x4
保存关节的逆绑定矩阵。该矩阵用于将顶点从模型空间转换到该关节的空间,然后再乘以关节的全局变换来执行蒙皮操作。
访问功能:
QMatrix4x4 | inverseBindMatrix() const |
void | setInverseBindMatrix(const QMatrix4x4 &inverseBindMatrix) |
通知信号
void | inverseBindMatrixChanged(const QMatrix4x4 &inverseBindMatrix) |
rotation : QQuaternion
将关节的旋转保持为QQuaternion 。
访问功能:
QQuaternion | rotation() const |
void | setRotation(const QQuaternion &rotation) |
通知信号:
void | rotationChanged(const QQuaternion &rotation) |
rotationX : float
以欧拉角形式保存关节的 x 旋转角度。
访问功能:
float | rotationX() const |
void | setRotationX(float rotationX) |
通知信号:
void | rotationXChanged(float rotationX) |
rotationY : float
以欧拉角形式保存关节的 y 旋转角度。
访问功能:
float | rotationY() const |
void | setRotationY(float rotationY) |
通知信号:
void | rotationYChanged(float rotationY) |
rotationZ : float
以欧拉角形式保存关节的 Z 旋转角度。
访问功能:
float | rotationZ() const |
void | setRotationZ(float rotationZ) |
通知信号:
void | rotationZChanged(float rotationZ) |
scale : QVector3D
保存接头的刻度。
访问功能:
QVector3D | scale() const |
void | setScale(const QVector3D &scale) |
通知信号:
void | scaleChanged(const QVector3D &scale) |
translation : QVector3D
将关节的平移值保存为QVector3D 。
访问功能:
QVector3D | translation() const |
void | setTranslation(const QVector3D &translation) |
通知信号:
void | translationChanged(const QVector3D &translation) |
成员函数 文档
[explicit]
QJoint::QJoint(Qt3DCore::QNode *parent = nullptr)
用parent 构建一个新的 QJoint。
void QJoint::addChildJoint(Qt3DCore::QJoint *joint)
将joint 添加为本连接的子连接。如果joint 没有父节点,则本节点将拥有其所有权。子节点位于父节点的坐标系中。
QList<Qt3DCore::QJoint *> QJoint::childJoints() const
该关节的子关节向量。
QString QJoint::name() const
返回接头的名称。
注: 属性名称的获取函数。
另请参阅 setName().
void QJoint::removeChildJoint(Qt3DCore::QJoint *joint)
从该连接的子连接列表中删除joint 。子节点不会被销毁。
[slot]
void QJoint::setToIdentity()
将此关节的变换矩阵设置为同一矩阵。
© 2025 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.