ParticleModelShape3D QML Type
为发射器和作用器提供基于模型的粒子形状。更多...
| Import Statement: | import QtQuick3D.Particles3D |
| Since: | Qt 6.2 |
| Inherits: |
属性
详细说明
ParticleModelShape3D 元素可用于从 3D 模型中获取粒子形状。
例如,要从模型轮廓中发射粒子:
Component {
id: suzanneComponent
Model {
source: "meshes/suzanne.mesh"
scale: Qt.vector3d(100, 100, 100)
}
}
ParticleEmitter3D {
shape: ParticleModelShape3D {
model: suzanneComponent
fill: false
}
...
}属性文档
delegate : Component
该委托提供了一个模板,用于定义ParticleModelShape3D 的模型。例如,使用默认的球体模型和默认材质
Component {
id: modelComponent
Model {
source: "#Sphere"
scale: Qt.vector3d(0.5, 0.5, 0.5)
materials: DefaultMaterial { diffuseColor: "red" }
}
}
ParticleModelShape3D {
delegate: modelComponent
}fill : bool
此属性用于确定形状应填充颜色,还是仅显示轮廓。
默认值为true 。
© 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.