ModelParticle3D QML Type

파티클을 사용하는 Qt Quick 3D 모델. 더 보기...

Import Statement: import QtQuick3D.Particles3D
Since: Qt 6.2
Inherits:

Particle3D

속성

상세 설명

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

인스턴스 테이블은 모델 파티클의 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"
    }
}

© 2025 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.