MorphTarget QML Type
定义变形目标的属性。更多
| Import Statement: | import QtQuick3D |
| Inherits: |
属性
- attributes : enumeration
- weight : real
详细说明
每个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 表示没有影响。
© 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.