MorphTarget QML Type

定义变形目标的属性。更多

Import Statement: import QtQuick3D
Inherits:

Object3D

属性

详细说明

每个MorphTarget都是顶点动画的变形目标。变形程度由weight 属性控制。

MorphTarget {
    id: morphtarget0
    attributes: MorphTarget.Position | MorphTarget.Normal
    weight: 0.5
}

变形示例展示了如何使用变形目标。

属性文档

attributes : enumeration

指定当前变形目标的属性集。要在变形中对顶点属性进行动画,网格必须包含这些目标属性,且变形目标必须启用这些属性。

变形目标的属性由以下值通过 OR 连接指定:

常量说明
MorphTarget.Position顶点位置动画
MorphTarget.Normal法线矢量动画
MorphTarget.Tangent切向量动画
MorphTarget.Binormal双法向量动画
MorphTarget.TexCoord0纹理坐标 0 向量动画
MorphTarget.TexCoord1纹理坐标 1 向量动画
MorphTarget.Color顶点颜色向量动画

weight : real

指定当前变形目标的权重。权重是线性插值使用的乘法因子。权重为 1 表示该目标已完全应用。权重为 0 表示没有影响。


© 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.