本页内容

MorphTarget QML Type

定义了形态目标的属性。更多...

Import Statement: import QtQuick3D
Inherits:

Object3D

属性

详细说明

每个MorphTarget都是顶点动画的变形目标。通过更改weight 属性来控制变形程度。

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

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

属性文档

attributes : enumeration

指定当前变形目标的一组属性。为了在变形过程中对顶点属性进行动画处理,网格必须包含这些目标属性,且变形目标必须已启用这些属性。

变形目标的属性通过将以下值进行“或”运算组合来指定:

常量描述
MorphTarget.Position动画化顶点位置
MorphTarget.Normal对法线向量进行动画处理
MorphTarget.Tangent对切向量进行动画处理
MorphTarget.Binormal对副法向量进行动画处理
MorphTarget.TexCoord0对纹理坐标 0 向量进行动画处理
MorphTarget.TexCoord1对纹理坐标 1 向量进行动画处理
MorphTarget.Color对顶点颜色向量进行动画处理

weight : real

指定当前变形目标的权重。该权重是线性插值所使用的乘数。权重为 1 表示完全应用该目标;权重为 0 表示该目标不产生任何影响。

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