IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

ParticleModelShape3D QML Type

Offers particle shape from model for emitters and affectors.

This type was introduced in Qt 6.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

ParticleModelShape3D QML Type

  • Import Statement: import QtQuick3D.Particles3D

  • Since:: Qt 6.2

Detailed Description

The ParticleModelShape3D element can be used to get particle shape from a 3D model.

For example, to emit particles from outlines of a model shape:

 
Sélectionnez
Component {
    id: suzanneComponent
    Model {
        source: "meshes/suzanne.mesh"
        scale: Qt.vector3d(100, 100, 100)
    }
}

ParticleEmitter3D {
    shape: ParticleModelShape3D {
        model: suzanneComponent
        fill: false
    }
    ...
}

Property Documentation

 

delegate : Component

The delegate provides a template defining the model for the ParticleModelShape3D. For example, using the default sphere model with default material

 
Sélectionnez
Component {
    id: modelComponent
    Model {
        source: "#Sphere"
        scale: Qt.vector3d(0.5, 0.5, 0.5)
        materials: DefaultMaterial { diffuseColor: "red" }
    }
}
ParticleModelShape3D {
    delegate: modelComponent
}

fill : bool

This property defines if the shape should be filled or just use the shape outlines.

The default value is true.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+