ModelParticle3D QML Type
Partícula que utiliza un modelo 3D Qt Quick. Más...
| Import Statement: | import QtQuick3D.Particles3D |
| Since: | Qt 6.2 |
| Inherits: |
Propiedades
- delegate : Component
- instanceTable : Instancing
Descripción detallada
El ModelParticle3D es un elemento lógico de partículas que crea partículas a partir de un componente Qt Quick 3D Model.
Documentación de propiedades
delegate : Component
El delegado proporciona una plantilla que define cada objeto instanciado por la partícula.
Por ejemplo, para asignar 200 partículas de cubo rojo:
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
La instanceTable proporciona acceso a la tabla Instancing de la partícula del modelo. ModelParticle3D utiliza una tabla de instancia interna para implementar un renderizado eficiente. Esta tabla puede aplicarse a la propiedad instancing de modelos que no forman parte del sistema de partículas.
También es posible utilizar esta característica para proporcionar una tabla de instancias sin mostrar ninguna partícula. Esto se hace omitiendo la propiedad delegate. Por ejemplo:
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.