| CMakeLists.txt |
|
3752 |
- |
| designer |
|
|
- |
| qquick3dparticle.cpp |
!
\qmltype Particle3D
\inherits Object3D
\inqmlmodule QtQuick3D.Particles3D
\brief Abstract logical particle.
\since 6.2
This element defines the common properties of the logical particles.
Particle3D is an abstract base class of particles, use \l ModelParticle3D or \l SpriteParticle3D instead.
\note Unlike the materials used with the models, particles default to being rendered with assuming
semi-transparency, and so with blending enabled. This is the desired behavior most of the time due
to particle textures, color (alpha) variations, fadings etc. If you don't need the blending,
set the \l hasTransparency to \c false for possible performance gains.
|
12077 |
- |
| qquick3dparticle_p.h |
|
6214 |
- |
| qquick3dparticleabstractshape.cpp |
!
\qmltype ParticleAbstractShape3D
\inherits QtObject
\inqmlmodule QtQuick3D.Particles3D
\brief Abstract base type of particle shapes.
\since 6.2
The ParticleAbstractShape3D is an abstract base type of shapes like \l ParticleShape3D
and \l ParticleModelShape3D. Shapes can be used to provide start and end positions
for the particles.
|
1156 |
- |
| qquick3dparticleabstractshape_p.h |
|
1615 |
- |
| qquick3dparticleaffector.cpp |
!
\qmltype Affector3D
\inherits Node
\inqmlmodule QtQuick3D.Particles3D
\brief Affectors modify the attributes of particles during their lifetime.
\since 6.2
The Affector3D is an abstract base class of affectors like \l Gravity3D, \l Wander3D, and \l PointRotator3D.
By default affectors affect all particles in the system, but this can be limited by defining
the \l particles list. If the system has multiple affectors, the order of affectors may
result in different outcome, as affectors are applied one after another.
|
5915 |
- |
| qquick3dparticleaffector_p.h |
|
3166 |
- |
| qquick3dparticleattractor.cpp |
!
\qmltype Attractor3D
\inherits Affector3D
\inqmlmodule QtQuick3D.Particles3D
\brief Attracts particles towards a position or a shape.
\since 6.2
This element attracts particles towards a position inside the 3D view. To model
the gravity of a massive object whose center of gravity is far away, use \l Gravity3D.
The attraction position is defined either with the \l {Node::position}{position} and
\l positionVariation or with \l shape. If both are defined, \l shape is used.
|
8824 |
- |
| qquick3dparticleattractor_p.h |
|
3146 |
- |
| qquick3dparticlecustomshape.cpp |
!
\qmltype ParticleCustomShape3D
\inherits ParticleAbstractShape3D
\inqmlmodule QtQuick3D.Particles3D
\brief Loads custom particle shapes for emitters and affectors.
\since 6.3
The ParticleCustomShape3D element can be used to load custom particle shapes.
For example, to emit particles from positions defined in heart.cbor:
\qml
ParticleEmitter3D {
shape: ParticleCustomShape3D {
source: "heart.cbor"
}
...
}
\endqml
The format of CBOR shape files is following:
\badcode
[
"QQ3D_SHAPE", // string
version, // integer
[
posX, // float
posY, // float
posZ, // float
posX, // float
...
]
]
\endcode
To assist in generating these shape files you can use the shapegen tool.
|
5016 |
- |
| qquick3dparticlecustomshape_p.h |
|
1686 |
- |
| qquick3dparticledata_p.h |
|
2126 |
- |
| qquick3dparticledirection.cpp |
!
\qmltype Direction3D
\inherits QtObject
\inqmlmodule QtQuick3D.Particles3D
\brief Directions assign velocity for the emitted particles.
\since 6.2
The Direction3D is an abstract base class of directions like \l TargetDirection3D and \l VectorDirection3D.
|
625 |
- |
| qquick3dparticledirection_p.h |
|
1151 |
- |
| qquick3dparticledynamicburst.cpp |
!
\qmltype DynamicBurst3D
\inherits EmitBurst3D
\inqmlmodule QtQuick3D.Particles3D
\brief Dynamic emitter bursts.
\since 6.3
This element defines particle bursts in the \l ParticleEmitter3D. These bursts are
dynamic, meaning that they are evaluated while the particlesystem runs. Use these
instead of \l EmitBurst3D for example when the emitter moves, so that emitting
happens at the correct position.
For example, to emit 100 particles at 1 second time and 200 particles at 2 second:
\qml
ParticleEmitter3D {
...
emitBursts: [
DynamicBurst3D {
time: 1000
amount: 100
},
DynamicBurst3D {
time: 2000
amount: 200
}
]
}
\endqml
|
3583 |
- |
| qquick3dparticledynamicburst_p.h |
|
1824 |
- |
| qquick3dparticleemitburst.cpp |
!
\qmltype EmitBurst3D
\inherits QtObject
\inqmlmodule QtQuick3D.Particles3D
\brief Declarative emitter bursts.
\since 6.2
This element defines particle bursts in the \l ParticleEmitter3D. These bursts are
static, meaning that they are evaluated when the particlesystem starts. This allows
better performance than \l DynamicBurst3D and bursting outside of the particlesystem
time (so e.g. burst at 1000ms while system time starts from 2000ms).
\note EmitBurst3D uses emitter properties (position, rotation etc.) at the
particlesystem start. For dynamic emitters, use \l DynamicBurst3D instead.
For example, to emit 100 particles at the beginning, and 50 particles at 2 seconds,
so that both bursts take 200 milliseconds:
\qml
ParticleEmitter3D {
...
emitBursts: [
EmitBurst3D {
time: 0
amount: 100
duration: 200
},
EmitBurst3D {
time: 2000
amount: 50
duration: 200
}
]
}
\endqml
|
3763 |
- |
| qquick3dparticleemitburst_p.h |
|
1878 |
- |
| qquick3dparticleemitter.cpp |
!
\qmltype ParticleEmitter3D
\inherits Node
\inqmlmodule QtQuick3D.Particles3D
\brief Emitter for logical particles.
\since 6.2
This element emits logical particles into the \l ParticleSystem3D, with the given starting attributes.
At least one emitter is required to have particles in the \l ParticleSystem3D. There are a few different
ways to control the emitting amount:
\list
\li Set the \l emitRate which controls how many particles per second get emitted continuously.
\li Add \l EmitBurst3D elements into emitBursts property to emit bursts declaratively.
\li Call any of the \l burst() methods to emit bursts immediately.
\endlist
|
40562 |
- |
| qquick3dparticleemitter_p.h |
|
9837 |
- |
| qquick3dparticlegravity.cpp |
!
\qmltype Gravity3D
\inherits Affector3D
\inqmlmodule QtQuick3D.Particles3D
\brief Accelerates particles to a vector of the specified magnitude in the specified direction.
\since 6.2
This element models the gravity of a massive object whose center of gravity is far away (and thus the
gravitational pull is effectively constant across the scene). To model the gravity of an object near
or inside the scene, use \l Attractor3D.
|
2218 |
- |
| qquick3dparticlegravity_p.h |
|
1584 |
- |
| qquick3dparticlelineparticle.cpp |
!
\qmltype LineParticle3D
\inherits SpriteParticle3D
\inqmlmodule QtQuick3D.Particles3D
\brief Line particle.
\since 6.4
The LineParticle3D creates line shaped sprite particles.
The line is created from the path of the particle when it moves.
The length of the line is specified either by the \l length parameter
or the segment count and minimum delta between points. In latter case the
length of the line may vary if the particles speed varies.
|
25167 |
- |
| qquick3dparticlelineparticle_p.h |
|
5437 |
- |
| qquick3dparticlemodelblendparticle.cpp |
!
\qmltype ModelBlendParticle3D
\inherits Particle3D
\inqmlmodule QtQuick3D.Particles3D
\brief Blends particle effect with a 3D model.
The type provides a way to blend particle effect with a 3D model. The provided model needs to be
triangle-based. Each triangle in the model is converted into a particle, which are then used by
the emitter. Instead of particle shader, the model is shaded using the \l {Model::materials}{material}
specified in the model. The way the effect is blended is determined by the \l modelBlendMode.
The possible modes are:
\list
\li \b Construct, where the model gets constructed from the particles.
\li \b Explode, where the model gets converted into particles.
\li \b Transfer, where Construct and Explode are combined to create an effect where the model is
transferred from one place to another.
\endlist
By default the particles are emitted in the order they are specified in the model unless \l emitMode is set
to \c Random or \l emitMode is set to \c Activation and \l activationNode is set.
Some features defined in base class and emitters are not functional with this type:
\list
\li \l Particle3D::alignMode is not functional since the particles can be in arbitrary orientation
in the model.
\li\l Particle3D::sortMode is not functional since the particles are always rendered in the order
the primitives are specified in the model.
\li \l ParticleEmitter3D::depthBias is not functional since the model depth bias is used instead.
\endlist
\note The default \l {Particle3D::fadeInEffect}{fadeInEffect} and \l {Particle3D::fadeInEffect}{fadeOutEffect}
are \c Particle3D.FadeNone.
|
31765 |
- |
| qquick3dparticlemodelblendparticle_p.h |
|
5361 |
- |
| qquick3dparticlemodelparticle.cpp |
!
\qmltype ModelParticle3D
\inherits Particle3D
\inqmlmodule QtQuick3D.Particles3D
\brief Particle using a Qt Quick 3D Model.
\since 6.2
The ModelParticle3D is a logical particle element that creates particles
from a Qt Quick 3D \l Model component.
|
8889 |
- |
| qquick3dparticlemodelparticle_p.h |
|
2717 |
- |
| qquick3dparticlemodelshape.cpp |
!
\qmltype ParticleModelShape3D
\inherits ParticleAbstractShape3D
\inqmlmodule QtQuick3D.Particles3D
\brief Offers particle shape from model for emitters and affectors.
\since 6.2
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:
\qml
Component {
id: suzanneComponent
Model {
source: "meshes/suzanne.mesh"
scale: Qt.vector3d(100, 100, 100)
}
}
ParticleEmitter3D {
shape: ParticleModelShape3D {
model: suzanneComponent
fill: false
}
...
}
\endqml
|
6875 |
- |
| qquick3dparticlemodelshape_p.h |
|
1999 |
- |
| qquick3dparticlepointrotator.cpp |
!
\qmltype PointRotator3D
\inherits Affector3D
\inqmlmodule QtQuick3D.Particles3D
\brief Rotates particles around a pivot point.
\since 6.2
This element rotates particles around a \l pivotPoint towards the \l direction.
|
2973 |
- |
| qquick3dparticlepointrotator_p.h |
|
1912 |
- |
| qquick3dparticlerandomizer_p.h |
Simple helper to get pseudo-random numbers which remain the same per particle & user.
Particles don't need strong randomization and the ability to seed can be useful.
Based on brief testing on my laptop, getting 1.000.000 random numbers:
1) Using QRandomGenerator::global()->generateDouble()
-> ~120ms
2) Using QPRand::get(), with m_size 4096
-> ~8ms
3) Using QPRand::get(i, j), with m_size 4096
-> ~10ms
4) Using QPRand::get(i, j), with m_size 100000
-> ~10ms
So QPRand seems fast and increasing keys amount doesn't notably affect the performance,
just the memory usage. With more particles m_size should be relatively big to make sure
particles appear random enough.
Bounded usage tips:
- qrg->bounded(4.0) == QPRand::get() * 4.0
- qrg->bounded(4) == int(QPRand::get() * 4)
|
3784 |
- |
| qquick3dparticlerepeller.cpp |
!
\qmltype Repeller3D
\inherits Affector3D
\inqmlmodule QtQuick3D.Particles3D
\brief Particle repeller.
\since 6.4
Repeller affector repels particles from the position it is placed.
|
2859 |
- |
| qquick3dparticlerepeller_p.h |
|
1668 |
- |
| qquick3dparticlescaleaffector.cpp |
!
\qmltype ScaleAffector3D
\inherits Affector3D
\inqmlmodule QtQuick3D.Particles3D
\brief Particle scale affector.
\since 6.4
Scale affector scales the particle size based on its lifetime and parameters.
|
5673 |
- |
| qquick3dparticlescaleaffector_p.h |
|
2295 |
- |
| qquick3dparticlesceneshape.cpp |
!
\qmltype ParticleSceneShape3D
\inherits ParticleAbstractShape3D
\inqmlmodule QtQuick3D.Particles3D
\brief Offers particle shape from a scene for emitters and affectors.
\since 6.11
The ParticleSceneShape3D element can be used to get particle shape from a 3D scene.
The shape envelopes the scene into single shape based on the models in a scene.
For example,
\qml
ParticleEmitter3D {
id: emitter
particle: particle
...
shape: ParticleSceneShape3D {
id: sceneShape
scene: sceneRoot
sceneCenter: node.scenePosition
sceneExtents: Qt.vector3d(1000, 500, 1000)
}
...
}
\endqml
|
25536 |
- |
| qquick3dparticlesceneshape_p.h |
|
4085 |
- |
| qquick3dparticleshape.cpp |
!
\qmltype ParticleShape3D
\inherits ParticleAbstractShape3D
\inqmlmodule QtQuick3D.Particles3D
\brief Offers 3D shapes for emitters and affectors.
\since 6.2
The ParticleShape3D element supports shapes like \c Cube, \c Sphere and \c Cylinder for particles needs.
For example, emitter can use \l {ParticleEmitter3D::shape}{shape} property to emit particles from the
shape area.
Shapes don't have position, scale or rotation. Instead, they use parent node for these properties.
|
7114 |
- |
| qquick3dparticleshape_p.h |
|
2097 |
- |
| qquick3dparticleshapedatautils.cpp |
|
7220 |
- |
| qquick3dparticleshapedatautils_p.h |
|
1356 |
- |
| qquick3dparticlespriteparticle.cpp |
!
\qmltype SpriteParticle3D
\inherits Particle3D
\inqmlmodule QtQuick3D.Particles3D
\brief Particle using a 2D sprite texture.
\since 6.2
The SpriteParticle3D is a logical particle element that creates particles
from a 2D sprite texture.
|
27037 |
- |
| qquick3dparticlespriteparticle_p.h |
|
7771 |
- |
| qquick3dparticlespritesequence.cpp |
!
\qmltype SpriteSequence3D
\inherits QtObject
\inqmlmodule QtQuick3D.Particles3D
\brief Provides image sequence features for the Sprite particles.
\since 6.2
The SpriteSequence3D element provides support for animated images with multiple frames. The frames
should be aligned horizontally in the image, first frame being on the left and last on the right.
To make a \l SpriteParticle3D an animated sequence, set its \l {SpriteParticle3D::spriteSequence}{spriteSequence} property.
|
8611 |
- |
| qquick3dparticlespritesequence_p.h |
|
3470 |
- |
| qquick3dparticlesystem.cpp |
!
\qmltype ParticleSystem3D
\inherits Node
\inqmlmodule QtQuick3D.Particles3D
\brief A system which includes particle, emitter, and affector types.
\since 6.2
This element is the root of the particle system, which handles the system timing and groups all
the other related elements like particles, emitters, and affectors together. To group the system
elements, they either need to be direct children of the ParticleSystem3D like this:
\qml,
ParticleSystem3D {
ParticleEmitter3D {
...
}
SpriteParticle3D {
...
}
}
\endqml
Or if the system elements are not direct children, they need to use \c system property to point
which ParticleSystem3D they belong to. Like this:
\qml
ParticleSystem3D {
id: psystem
}
ParticleEmitter3D {
system: psystem
...
}
SpriteParticle3D {
system: psystem
...
}
\endqml
|
35322 |
- |
| qquick3dparticlesystem_p.h |
|
7988 |
- |
| qquick3dparticlesystemlogging.cpp |
!
\qmltype ParticleSystem3DLogging
\inherits QtObject
\inqmlmodule QtQuick3D.Particles3D
\brief Provides information of the particle system.
\since 6.2
The \c ParticleSystem3DLogging type provides information about particle system statistics.
This element cannot be created directly, but can be retrieved from a \l ParticleSystem3D.
|
6018 |
- |
| qquick3dparticlesystemlogging_p.h |
|
2361 |
- |
| qquick3dparticletargetdirection.cpp |
!
\qmltype TargetDirection3D
\inherits Direction3D
\inqmlmodule QtQuick3D.Particles3D
\brief For specifying a direction towards the target position.
\since 6.2
This element sets emitted particle velocity towards the target position.
For example, to emit particles towards position (100, 0, 0) with
random magnitude between 10..20:
\qml
ParticleEmitter3D {
...
velocity: TargetDirection3D {
position: Qt.vector3d(100, 0, 0)
normalized: true
magnitude: 15.0
magnitudeVariation: 5.0
}
}
\endqml
|
4977 |
- |
| qquick3dparticletargetdirection_p.h |
|
2325 |
- |
| qquick3dparticletrailemitter.cpp |
!
\qmltype TrailEmitter3D
\inherits ParticleEmitter3D
\inqmlmodule QtQuick3D.Particles3D
\brief Emitter for logical particles from other particles.
\since 6.2
TrailEmitter3D is a special emitter for emitting particles with starting positions inherited from
other logical particles.
|
3835 |
- |
| qquick3dparticletrailemitter_p.h |
|
1680 |
- |
| qquick3dparticleutils.cpp |
|
15299 |
- |
| qquick3dparticleutils_p.h |
|
3182 |
- |
| qquick3dparticlevectordirection.cpp |
!
\qmltype VectorDirection3D
\inherits Direction3D
\inqmlmodule QtQuick3D.Particles3D
\brief For specifying a direction towards the target direction.
\since 6.2
This element sets emitted particle velocity towards the target direction vector.
The length of the direction vector is used as the velocity magnitude.
For example, to emit particles towards some random direction within
x: 50..150, y: -20..20, z: 0:
\qml
ParticleEmitter3D {
...
velocity: VectorDirection3D {
direction: Qt.vector3d(100, 0, 0)
directionVariation: Qt.vector3d(50, 20, 0)
}
}
\endqml
|
3542 |
- |
| qquick3dparticlevectordirection_p.h |
|
1825 |
- |
| qquick3dparticlewander.cpp |
!
\qmltype Wander3D
\inherits Affector3D
\inqmlmodule QtQuick3D.Particles3D
\brief Applies random wave curves to particles.
\since 6.2
This element applies random wave curves to particles. Curves can combine
global values which are the same for all particles and unique values which
differ randomly.
|
10654 |
- |
| qquick3dparticlewander_p.h |
|
3536 |
- |
| qtquick3dparticlesglobal.h |
|
356 |
- |
| qtquick3dparticlesglobal_p.h |
|
751 |
- |