ModelParticle3D QML Type
Qt Quick 3D モデルを使用したパーティクル。もっと見る...
| Import Statement: | import QtQuick3D.Particles3D |
| Since: | Qt 6.2 |
| Inherits: |
プロパティ
- delegate : Component
- instanceTable : Instancing
詳細説明
ModelParticle3D は、Qt Quick 3D Model コンポーネントからパーティクルを作成する論理パーティクル要素です。
プロパティの説明
delegate : Component
デリゲートは、パーティクルがインスタンス化する各オブジェクトを定義するテンプレートを提供します。
例えば、200個の赤いキューブパーティクルを割り当てる場合:
Component {
id: particleComponent
Model {
source: "#Cube"
scale: Qt.vector3d(0.2, 0.2, 0.2)
materials: DefaultMaterial { }
}
}
ModelParticle3D {
id: particleRed
delegate: particleComponent
maxAmount: 200
color: "#ff0000"
}instanceTable : Instancing
instanceTable は、モデルパーティクルのInstancing テーブルへのアクセスを提供します。ModelParticle3D は、効率的なレンダリングを実装するために内部インスタンステーブルを使用します。このテーブルは、パーティクルシステムの一部ではないモデルのinstancing プロパティに適用できます。
また、この機能を使用して、パーティクルを表示せずにインスタンステーブルを提供することも可能です。これは、delegate プロパティを省略することで行います。例えば
ParticleSystem3D {
id: psystem
ModelParticle3D {
id: particleRed
maxAmount: 200
color: "#ff0000"
colorVariation: Qt.vector4d(0.5,0.5,0.5,0.5)
}
ParticleEmitter3D {
particle: particleRed
velocity: VectorDirection3D {
direction: Qt.vector3d(-20, 200, 0)
directionVariation: Qt.vector3d(20, 20, 20)
}
particleScale: 0.2
emitRate: 20
lifeSpan: 2000
}
}
Model {
source: "#Sphere"
instancing: particleRed.instanceTable
materials: PrincipledMaterial {
baseColor: "yellow"
}
}© 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.