Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQuick3DParticle Class Reference

#include <qquick3dparticle_p.h>

+ Inheritance diagram for QQuick3DParticle:
+ Collaboration diagram for QQuick3DParticle:

Public Types

enum  FadeType { FadeNone , FadeOpacity , FadeScale }
 
enum  AlignMode { AlignNone , AlignTowardsTarget , AlignTowardsStartVelocity }
 
enum  SortMode { SortNone , SortNewest , SortOldest , SortDistance }
 

Public Slots

void setSystem (QQuick3DParticleSystem *system)
 
void setMaxAmount (int maxAmount)
 
void setColor (QColor color)
 
void setColorVariation (QVector4D colorVariation)
 
void setUnifiedColorVariation (bool unified)
 
void setFadeInEffect (QQuick3DParticle::FadeType fadeInEffect)
 
void setFadeOutEffect (QQuick3DParticle::FadeType fadeOutEffect)
 
void setFadeInDuration (int fadeInDuration)
 
void setFadeOutDuration (int fadeOutDuration)
 
void setAlignMode (QQuick3DParticle::AlignMode alignMode)
 
void setAlignTargetPosition (const QVector3D &alignPosition)
 
void setHasTransparency (bool transparency)
 
void setSortMode (QQuick3DParticle::SortMode sortMode)
 
- Public Slots inherited from QQuick3DObject
void update ()
 
void setParentItem (QQuick3DObject *parentItem)
 
- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 

Signals

void systemChanged ()
 
void maxAmountChanged ()
 
void colorChanged ()
 
void colorVariationChanged ()
 
void unifiedColorVariationChanged ()
 
void fadeInEffectChanged ()
 
void fadeOutEffectChanged ()
 
void fadeInDurationChanged ()
 
void fadeOutDurationChanged ()
 
void alignModeChanged ()
 
void alignTargetPositionChanged ()
 
void hasTransparencyChanged ()
 
void sortModeChanged ()
 
- Signals inherited from QQuick3DObject
void parentChanged ()
 
void childrenChanged ()
 
void stateChanged ()
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 

Public Member Functions

 QQuick3DParticle (QQuick3DObject *parent=nullptr)
 \qmltype Particle3D \inherits Object3D \inqmlmodule QtQuick3D.Particles3D
 
 ~QQuick3DParticle () override
 
QQuick3DParticleSystemsystem () const
 
int maxAmount () const
 \qmlproperty int Particle3D::maxAmount
 
QColor color () const
 \qmlproperty color Particle3D::color
 
QVector4D colorVariation () const
 \qmlproperty vector4d Particle3D::colorVariation
 
bool unifiedColorVariation () const
 \qmlproperty bool Particle3D::unifiedColorVariation
 
FadeType fadeInEffect () const
 \qmlproperty enumeration Particle3D::FadeType
 
FadeType fadeOutEffect () const
 \qmlproperty FadeType Particle3D::fadeOutEffect
 
int fadeInDuration () const
 \qmlproperty int Particle3D::fadeInDuration
 
int fadeOutDuration () const
 \qmlproperty int Particle3D::fadeOutDuration
 
AlignMode alignMode () const
 \qmlproperty enumeration Particle3D::AlignMode
 
QVector3D alignTargetPosition () const
 \qmlproperty vector3d Particle3D::alignTargetPosition
 
bool hasTransparency () const
 \qmlproperty bool Particle3D::hasTransparency
 
SortMode sortMode () const
 \qmlproperty enumeration Particle3D::SortMode
 
float opacity () const
 
void resetColor ()
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
void killTimer (Qt::TimerId id)
 
template<typename T >
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 
- Public Member Functions inherited from QQmlParserStatus
 QQmlParserStatus ()
 
virtual ~QQmlParserStatus ()
 

Protected Member Functions

void componentComplete () override
 Invoked after the root component that caused this instantiation has completed construction.
 
 QQuick3DParticle (QQuick3DObjectPrivate &dd, QQuick3DNode *parent=nullptr)
 
virtual void reset ()
 
virtual void doSetMaxAmount (int amount)
 
void updateBurstIndex (int amount)
 
virtual int nextCurrentIndex (const QQuick3DParticleEmitter *emitter)
 
QSSGRenderGraphObjectupdateSpatialNode (QSSGRenderGraphObject *node) override
 
virtual void setDepthBias (float bias)
 
float depthBias () const
 
- Protected Member Functions inherited from QQuick3DObject
virtual void markAllDirty ()
 
virtual void itemChange (ItemChange, const ItemChangeData &)
 
 QQuick3DObject (QQuick3DObjectPrivate &dd, QQuick3DObject *parent=nullptr)
 
void classBegin () override
 Invoked after class creation, but before any properties have been set.
 
bool isComponentComplete () const
 
virtual void preSync ()
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 

Protected Attributes

QList< QQuick3DParticleDatam_particleData
 
QQuick3DParticleSpriteSequencem_spriteSequence = nullptr
 
int m_maxAmount = 100
 
int m_currentIndex = -1
 
int m_lastBurstIndex = 0
 
AlignMode m_alignMode = AlignNone
 
QVector3D m_alignTarget
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 

Properties

int maxAmount
 
QColor color
 
QVector4D colorVariation
 
bool unifiedColorVariation
 
FadeType fadeInEffect
 
FadeType fadeOutEffect
 
int fadeInDuration
 
int fadeOutDuration
 
AlignMode alignMode
 
QVector3D alignTargetPosition
 
bool hasTransparency
 
SortMode sortMode
 
- Properties inherited from QQuick3DObject
QQuick3DObjectparent
 \qmlproperty Object3D QtQuick3D::Object3D::parent This property holds the parent of the Object3D in a 3D scene.
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Friends

class QQuick3DParticleSystem
 
class QQuick3DParticleEmitter
 
class QQuick3DParticleSpriteSequence
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 

Detailed Description

Definition at line 28 of file qquick3dparticle_p.h.

Member Enumeration Documentation

◆ AlignMode

Enumerator
AlignNone 
AlignTowardsTarget 
AlignTowardsStartVelocity 

Definition at line 60 of file qquick3dparticle_p.h.

◆ FadeType

Enumerator
FadeNone 
FadeOpacity 
FadeScale 

Definition at line 52 of file qquick3dparticle_p.h.

◆ SortMode

Enumerator
SortNone 
SortNewest 
SortOldest 
SortDistance 

Definition at line 68 of file qquick3dparticle_p.h.

Constructor & Destructor Documentation

◆ QQuick3DParticle() [1/2]

QT_BEGIN_NAMESPACE QQuick3DParticle::QQuick3DParticle ( QQuick3DObject * parent = nullptr)

\qmltype Particle3D \inherits Object3D \inqmlmodule QtQuick3D.Particles3D

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 false for possible performance gains.

Definition at line 24 of file qquick3dparticle.cpp.

◆ ~QQuick3DParticle()

QQuick3DParticle::~QQuick3DParticle ( )
override

Definition at line 39 of file qquick3dparticle.cpp.

References QQuick3DParticleSystem::unRegisterParticle().

+ Here is the call graph for this function:

◆ QQuick3DParticle() [2/2]

QQuick3DParticle::QQuick3DParticle ( QQuick3DObjectPrivate & dd,
QQuick3DNode * parent = nullptr )
protected

Definition at line 31 of file qquick3dparticle.cpp.

Member Function Documentation

◆ alignMode()

QQuick3DParticle::AlignMode QQuick3DParticle::alignMode ( ) const

\qmlproperty enumeration Particle3D::AlignMode

Defines the type of the alignment.

\value Particle3D.AlignNone No alignment. Particles rotation can be defined with \l {ParticleEmitter3D::particleRotation}{particleRotation}. \value Particle3D.AlignTowardsTarget Align the particles towards \l alignTargetPosition direction. \value Particle3D.AlignTowardsStartVelocity Align the particles towards their starting \l {ParticleEmitter3D::velocity}{velocity} direction.

\qmlproperty AlignMode Particle3D::alignMode

This property defines the align mode used for the particles. Particle alignment means the direction that particles face.

Note
When the \l SpriteParticle3D \l {SpriteParticle3D::billboard}{billboard} property is set to true, alignMode does not have an effect.

The default value is Particle3D.AlignNone.

See also
alignTargetPosition

Definition at line 343 of file qquick3dparticle.cpp.

References m_alignMode.

◆ alignModeChanged

void QQuick3DParticle::alignModeChanged ( )
signal

Referenced by setAlignMode().

+ Here is the caller graph for this function:

◆ alignTargetPosition()

QVector3D QQuick3DParticle::alignTargetPosition ( ) const

\qmlproperty vector3d Particle3D::alignTargetPosition

This property defines the position particles are aligned to. This property has effect only when the \l alignMode is set to Particle3D.AlignTowardsTarget.

See also
alignMode

Definition at line 357 of file qquick3dparticle.cpp.

References m_alignTarget.

◆ alignTargetPositionChanged

void QQuick3DParticle::alignTargetPositionChanged ( )
signal

Referenced by setAlignTargetPosition().

+ Here is the caller graph for this function:

◆ color()

QColor QQuick3DParticle::color ( ) const

\qmlproperty color Particle3D::color

This property defines the base color that is used for colorizing the particles.

The default value is "#FFFFFF" (white).

Definition at line 103 of file qquick3dparticle.cpp.

◆ colorChanged

void QQuick3DParticle::colorChanged ( )
signal

Referenced by setColor().

+ Here is the caller graph for this function:

◆ colorVariation()

QVector4D QQuick3DParticle::colorVariation ( ) const

\qmlproperty vector4d Particle3D::colorVariation

This property defines the color variation that is used for colorizing the particles. The values are in RGBA order and each value should be between 0.0 (no variation) and 1.0 (full variation).

For example, to create particles which will have translucent red colors between #ff0000 and #e50000, with 40% to 60% opacity:

\qml ModelParticle3D { ... color: "#7fff0000" colorVariation: Qt.vector4d(0.1, 0.0, 0.0, 0.2) } \endqml

The default value is (0, 0, 0, 0) (no variation).

See also
unifiedColorVariation

Definition at line 153 of file qquick3dparticle.cpp.

◆ colorVariationChanged

void QQuick3DParticle::colorVariationChanged ( )
signal

Referenced by setColorVariation().

+ Here is the caller graph for this function:

◆ componentComplete()

void QQuick3DParticle::componentComplete ( )
overrideprotectedvirtual

Invoked after the root component that caused this instantiation has completed construction.

At this point all static values and binding values have been assigned to the class.

Reimplemented from QQuick3DObject.

Reimplemented in QQuick3DParticleModelBlendParticle, QQuick3DParticleModelParticle, and QQuick3DParticleSpriteParticle.

Definition at line 455 of file qquick3dparticle.cpp.

References QQuick3DObject::componentComplete(), maxAmountChanged(), and Q_EMIT.

Referenced by QQuick3DParticleModelParticle::componentComplete(), and QQuick3DParticleSpriteParticle::componentComplete().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ depthBias()

float QQuick3DParticle::depthBias ( ) const
inlineprotected

Definition at line 152 of file qquick3dparticle_p.h.

◆ doSetMaxAmount()

void QQuick3DParticle::doSetMaxAmount ( int amount)
protectedvirtual

Reimplemented in QQuick3DParticleModelBlendParticle.

Definition at line 90 of file qquick3dparticle.cpp.

References m_maxAmount, maxAmountChanged(), and Q_EMIT.

Referenced by QQuick3DParticleModelBlendParticle::QQuick3DParticleModelBlendParticle(), and setMaxAmount().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fadeInDuration()

int QQuick3DParticle::fadeInDuration ( ) const

\qmlproperty int Particle3D::fadeInDuration

This property defines the duration in milliseconds for the fading in effect.

Note
The fading durations are part of the particles \l {ParticleEmitter3D::lifeSpan}{lifeSpan}. So e.g. if lifeSpan is 3000, fadeInDuration is 500 and fadeOutDuration is 500, the fully visible time of the particle is 2000ms.

The default value is 250.

See also
fadeInEffect, fadeOutDuration

Definition at line 279 of file qquick3dparticle.cpp.

◆ fadeInDurationChanged

void QQuick3DParticle::fadeInDurationChanged ( )
signal

Referenced by setFadeInDuration().

+ Here is the caller graph for this function:

◆ fadeInEffect()

QQuick3DParticle::FadeType QQuick3DParticle::fadeInEffect ( ) const

\qmlproperty enumeration Particle3D::FadeType

Defines the type of the fading effect.

\value Particle3D.FadeNone No fading. \value Particle3D.FadeOpacity Fade the particle opacity from/to 0.0. \value Particle3D.FadeScale Fade the particle scale from/to 0.0.

\qmlproperty FadeType Particle3D::fadeInEffect

This property defines the fading effect used when the particles appear.

The default value is Particle3D.FadeOpacity.

See also
fadeInDuration, fadeOutEffect

Definition at line 227 of file qquick3dparticle.cpp.

◆ fadeInEffectChanged

void QQuick3DParticle::fadeInEffectChanged ( )
signal

Referenced by setFadeInEffect().

+ Here is the caller graph for this function:

◆ fadeOutDuration()

int QQuick3DParticle::fadeOutDuration ( ) const

\qmlproperty int Particle3D::fadeOutDuration

This property defines the duration in milliseconds for the fading out effect.

The default value is 250.

See also
fadeOutEffect, fadeInDuration

Definition at line 302 of file qquick3dparticle.cpp.

◆ fadeOutDurationChanged

void QQuick3DParticle::fadeOutDurationChanged ( )
signal

Referenced by setFadeOutDuration().

+ Here is the caller graph for this function:

◆ fadeOutEffect()

QQuick3DParticle::FadeType QQuick3DParticle::fadeOutEffect ( ) const

\qmlproperty FadeType Particle3D::fadeOutEffect

This property defines the fading effect used when the particles reach their \l {ParticleEmitter3D::lifeSpan}{lifeSpan} and disappear.

The default value is Particle3D.FadeOpacity.

See also
fadeOutDuration, fadeInEffect

Definition at line 251 of file qquick3dparticle.cpp.

◆ fadeOutEffectChanged

void QQuick3DParticle::fadeOutEffectChanged ( )
signal

Referenced by setFadeOutEffect().

+ Here is the caller graph for this function:

◆ hasTransparency()

bool QQuick3DParticle::hasTransparency ( ) const

\qmlproperty bool Particle3D::hasTransparency

This property defines if the particle has any transparency and should be blended with the background. Usually this should be true, like when the particle color doesn't have full alpha, texture contains semi-transparent pixels or particles opacity is faded in or out. Setting this to false can be an optimization in specific cases.

The default value is true.

See also
color, fadeInEffect, fadeOutEffect

Definition at line 375 of file qquick3dparticle.cpp.

◆ hasTransparencyChanged

void QQuick3DParticle::hasTransparencyChanged ( )
signal

Referenced by setHasTransparency().

+ Here is the caller graph for this function:

◆ maxAmount()

int QQuick3DParticle::maxAmount ( ) const

\qmlproperty int Particle3D::maxAmount

This property defines the maximum amount of particles that can exist at the same time. You can use \l {ParticleSystem3DLogging::particlesUsed}{particlesUsed} for debugging how efficiently the allocated particles are used. If the maxAmount is too small, particles are reused before they reach the end of their \l {ParticleEmitter3D::lifeSpan}{lifeSpan}. If the maxAmount is too big, unnecessary memory is allocated for the particles.

Note
Changing the maxAmount resets all the particles in the particle system.

The default value is 100.

Definition at line 77 of file qquick3dparticle.cpp.

References m_maxAmount.

◆ maxAmountChanged

void QQuick3DParticle::maxAmountChanged ( )
signal

Referenced by QQuick3DParticleModelParticle::QQuick3DParticleModelParticle(), QQuick3DParticleSpriteParticle::QQuick3DParticleSpriteParticle(), componentComplete(), and doSetMaxAmount().

+ Here is the caller graph for this function:

◆ nextCurrentIndex()

int QQuick3DParticle::nextCurrentIndex ( const QQuick3DParticleEmitter * emitter)
protectedvirtual

Reimplemented in QQuick3DParticleLineParticle, QQuick3DParticleModelBlendParticle, and QQuick3DParticleSpriteParticle.

Definition at line 449 of file qquick3dparticle.cpp.

References m_currentIndex, m_lastBurstIndex, and m_maxAmount.

Referenced by QQuick3DParticleEmitter::emitParticle(), QQuick3DParticleModelBlendParticle::nextCurrentIndex(), and QQuick3DParticleSpriteParticle::nextCurrentIndex().

+ Here is the caller graph for this function:

◆ opacity()

float QQuick3DParticle::opacity ( ) const

Definition at line 108 of file qquick3dparticle.cpp.

References QColor::alphaF().

+ Here is the call graph for this function:

◆ reset()

void QQuick3DParticle::reset ( )
protectedvirtual

Reimplemented in QQuick3DParticleLineParticle, QQuick3DParticleModelBlendParticle, and QQuick3DParticleSpriteParticle.

Definition at line 462 of file qquick3dparticle.cpp.

References QList< T >::fill(), m_currentIndex, m_lastBurstIndex, and m_particleData.

Referenced by QQuick3DParticleEmitter::generateEmitBursts(), QQuick3DParticleModelBlendParticle::reset(), and QQuick3DParticleSpriteParticle::reset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetColor()

void QQuick3DParticle::resetColor ( )

Definition at line 125 of file qquick3dparticle.cpp.

◆ setAlignMode

void QQuick3DParticle::setAlignMode ( QQuick3DParticle::AlignMode alignMode)
slot

Definition at line 389 of file qquick3dparticle.cpp.

References alignMode, alignModeChanged(), m_alignMode, and Q_EMIT.

+ Here is the call graph for this function:

◆ setAlignTargetPosition

void QQuick3DParticle::setAlignTargetPosition ( const QVector3D & alignPosition)
slot

Definition at line 398 of file qquick3dparticle.cpp.

References alignTargetPositionChanged(), m_alignTarget, and Q_EMIT.

+ Here is the call graph for this function:

◆ setColor

void QQuick3DParticle::setColor ( QColor color)
slot

Definition at line 114 of file qquick3dparticle.cpp.

References color, colorChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setColorVariation

void QQuick3DParticle::setColorVariation ( QVector4D colorVariation)
slot

Definition at line 158 of file qquick3dparticle.cpp.

References colorVariation, colorVariationChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setDepthBias()

virtual void QQuick3DParticle::setDepthBias ( float bias)
inlineprotectedvirtual

Reimplemented in QQuick3DParticleModelParticle, and QQuick3DParticleSpriteParticle.

Definition at line 148 of file qquick3dparticle_p.h.

Referenced by QQuick3DParticleModelParticle::setDepthBias(), QQuick3DParticleSpriteParticle::setDepthBias(), and QQuick3DParticleEmitter::setParticle().

+ Here is the caller graph for this function:

◆ setFadeInDuration

void QQuick3DParticle::setFadeInDuration ( int fadeInDuration)
slot

Definition at line 284 of file qquick3dparticle.cpp.

References fadeInDuration, fadeInDurationChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setFadeInEffect

void QQuick3DParticle::setFadeInEffect ( QQuick3DParticle::FadeType fadeInEffect)
slot

Definition at line 232 of file qquick3dparticle.cpp.

References fadeInEffect, fadeInEffectChanged(), and Q_EMIT.

Referenced by QQuick3DParticleModelBlendParticle::QQuick3DParticleModelBlendParticle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFadeOutDuration

void QQuick3DParticle::setFadeOutDuration ( int fadeOutDuration)
slot

Definition at line 307 of file qquick3dparticle.cpp.

References fadeOutDuration, fadeOutDurationChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setFadeOutEffect

void QQuick3DParticle::setFadeOutEffect ( QQuick3DParticle::FadeType fadeOutEffect)
slot

Definition at line 256 of file qquick3dparticle.cpp.

References fadeOutEffect, fadeOutEffectChanged(), and Q_EMIT.

Referenced by QQuick3DParticleModelBlendParticle::QQuick3DParticleModelBlendParticle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHasTransparency

void QQuick3DParticle::setHasTransparency ( bool transparency)
slot

Definition at line 380 of file qquick3dparticle.cpp.

References hasTransparencyChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setMaxAmount

void QQuick3DParticle::setMaxAmount ( int maxAmount)
slot

Definition at line 82 of file qquick3dparticle.cpp.

References doSetMaxAmount(), m_maxAmount, and maxAmount.

+ Here is the call graph for this function:

◆ setSortMode

void QQuick3DParticle::setSortMode ( QQuick3DParticle::SortMode sortMode)
slot

Definition at line 436 of file qquick3dparticle.cpp.

References Q_EMIT, and sortModeChanged().

+ Here is the call graph for this function:

◆ setSystem

void QQuick3DParticle::setSystem ( QQuick3DParticleSystem * system)
slot

Definition at line 50 of file qquick3dparticle.cpp.

References Q_EMIT, QQuick3DParticleSystem::registerParticle(), system(), systemChanged(), and QQuick3DParticleSystem::unRegisterParticle().

Referenced by QQuick3DParticleModelBlendParticle::componentComplete(), QQuick3DParticleModelParticle::componentComplete(), QQuick3DParticleSpriteParticle::componentComplete(), QQuick3DParticleEmitter::setParticle(), and QQuick3DParticleEmitter::setSystem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUnifiedColorVariation

void QQuick3DParticle::setUnifiedColorVariation ( bool unified)
slot

Definition at line 196 of file qquick3dparticle.cpp.

References Q_EMIT, and unifiedColorVariationChanged().

+ Here is the call graph for this function:

◆ sortMode()

QQuick3DParticle::SortMode QQuick3DParticle::sortMode ( ) const

\qmlproperty enumeration Particle3D::SortMode

Defines the sorting mode of the particle. The sorting mode determines the order in which the particles are drawn.

\value Particle3D.SortNone No sorting. \value Particle3D.SortNewest Sort based on particle lifetime, newest first. \value Particle3D.SortOldest Sort based on particle lifetime, oldest first. \value Particle3D.SortDistance Sort based on distance to the camera, farthest first.

\qmlproperty SortMode Particle3D::sortMode

This property defines the sort mode used for the particles.

The default value is Particle3D.SortNone.

Definition at line 431 of file qquick3dparticle.cpp.

◆ sortModeChanged

void QQuick3DParticle::sortModeChanged ( )
signal

Referenced by QQuick3DParticleModelParticle::QQuick3DParticleModelParticle(), QQuick3DParticleSpriteParticle::QQuick3DParticleSpriteParticle(), and setSortMode().

+ Here is the caller graph for this function:

◆ system()

◆ systemChanged

void QQuick3DParticle::systemChanged ( )
signal

Referenced by QQuick3DParticleSpriteParticle::QQuick3DParticleSpriteParticle(), and setSystem().

+ Here is the caller graph for this function:

◆ unifiedColorVariation()

bool QQuick3DParticle::unifiedColorVariation ( ) const

\qmlproperty bool Particle3D::unifiedColorVariation

This property defines if the \l colorVariation should be applied uniformly for all the color channels. This means that all variations are applied with the same random amount.

For example, to create particles which will have yellow colors between #ffff00 and #7f7f00, so that the values of R and G color channels are always the same:

\qml ModelParticle3D { ... color: "#ffff00" colorVariation: Qt.vector4d(0.5, 0.5, 0.0, 0.0) unifiedColorVariation: true } \endqml

The default value is false.

See also
colorVariation

Definition at line 191 of file qquick3dparticle.cpp.

◆ unifiedColorVariationChanged

void QQuick3DParticle::unifiedColorVariationChanged ( )
signal

Referenced by setUnifiedColorVariation().

+ Here is the caller graph for this function:

◆ updateBurstIndex()

void QQuick3DParticle::updateBurstIndex ( int amount)
protected

Definition at line 444 of file qquick3dparticle.cpp.

References m_lastBurstIndex.

Referenced by QQuick3DParticleEmitter::generateEmitBursts().

+ Here is the caller graph for this function:

◆ updateSpatialNode()

QSSGRenderGraphObject * QQuick3DParticle::updateSpatialNode ( QSSGRenderGraphObject * node)
inlineoverrideprotectedvirtual

Reimplemented from QQuick3DObject.

Reimplemented in QQuick3DParticleModelBlendParticle.

Definition at line 135 of file qquick3dparticle_p.h.

Friends And Related Symbol Documentation

◆ QQuick3DParticleEmitter

friend class QQuick3DParticleEmitter
friend

Definition at line 159 of file qquick3dparticle_p.h.

◆ QQuick3DParticleSpriteSequence

friend class QQuick3DParticleSpriteSequence
friend

Definition at line 160 of file qquick3dparticle_p.h.

◆ QQuick3DParticleSystem

friend class QQuick3DParticleSystem
friend

Definition at line 158 of file qquick3dparticle_p.h.

Member Data Documentation

◆ m_alignMode

AlignMode QQuick3DParticle::m_alignMode = AlignNone
protected

Definition at line 146 of file qquick3dparticle_p.h.

Referenced by alignMode(), and setAlignMode().

◆ m_alignTarget

QVector3D QQuick3DParticle::m_alignTarget
protected

Definition at line 147 of file qquick3dparticle_p.h.

Referenced by alignTargetPosition(), and setAlignTargetPosition().

◆ m_currentIndex

int QQuick3DParticle::m_currentIndex = -1
protected

◆ m_lastBurstIndex

int QQuick3DParticle::m_lastBurstIndex = 0
protected

Definition at line 145 of file qquick3dparticle_p.h.

Referenced by nextCurrentIndex(), reset(), and updateBurstIndex().

◆ m_maxAmount

◆ m_particleData

◆ m_spriteSequence

Property Documentation

◆ alignMode

AlignMode QQuick3DParticle::alignMode
readwrite

Definition at line 39 of file qquick3dparticle_p.h.

Referenced by setAlignMode().

◆ alignTargetPosition

QVector3D QQuick3DParticle::alignTargetPosition
readwrite

Definition at line 40 of file qquick3dparticle_p.h.

◆ color

◆ colorVariation

QVector4D QQuick3DParticle::colorVariation
readwrite

◆ fadeInDuration

int QQuick3DParticle::fadeInDuration
readwrite

Definition at line 37 of file qquick3dparticle_p.h.

Referenced by setFadeInDuration().

◆ fadeInEffect

FadeType QQuick3DParticle::fadeInEffect
readwrite

◆ fadeOutDuration

int QQuick3DParticle::fadeOutDuration
readwrite

Definition at line 38 of file qquick3dparticle_p.h.

Referenced by setFadeOutDuration().

◆ fadeOutEffect

FadeType QQuick3DParticle::fadeOutEffect
readwrite

◆ hasTransparency

bool QQuick3DParticle::hasTransparency
readwrite

◆ maxAmount

◆ sortMode

◆ unifiedColorVariation

bool QQuick3DParticle::unifiedColorVariation
readwrite

Definition at line 34 of file qquick3dparticle_p.h.

Referenced by QQuick3DParticleEmitter::emitParticle().


The documentation for this class was generated from the following files: