ModelParticle3D QML Type
Qt Quick 3D 모델을 사용하는 Particle. 더 보기...
| 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"
}참고: 델리게이트에서 인스턴스화된콘텐츠는 자체적인 ‘ layers ’ 할당을 유지하며, ‘ ParticleSystem3D ’의 ‘layers’ 값은 이에 적용되지 않습니다. 특정 콘텐츠 레이어에 파티클을 렌더링하려면 델리게이트 내 노드의 ‘layers’ 속성을 설정하십시오.
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.