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>.
|
#include <qquick3dparticlemodelblendparticle_p.h>
Public Types | |
enum | ModelBlendMode { Explode , Construct , Transfer } |
enum | ModelBlendEmitMode { Sequential , Random , Activation } |
Public Types inherited from QQuick3DParticle | |
enum | FadeType { FadeNone , FadeOpacity , FadeScale } |
enum | AlignMode { AlignNone , AlignTowardsTarget , AlignTowardsStartVelocity } |
enum | SortMode { SortNone , SortNewest , SortOldest , SortDistance } |
Public Member Functions | |
QQuick3DParticleModelBlendParticle (QQuick3DNode *parent=nullptr) | |
\qmltype ModelBlendParticle3D \inherits Particle3D \inqmlmodule QtQuick3D.Particles3D | |
~QQuick3DParticleModelBlendParticle () override | |
QQmlComponent * | delegate () const |
\qmlproperty Component ModelBlendParticle3D::delegate | |
QQuick3DNode * | endNode () const |
\qmlproperty Node ModelBlendParticle3D::endNode | |
ModelBlendMode | modelBlendMode () const |
\qmlproperty enumeration ModelBlendParticle3D::ModelBlendMode | |
int | endTime () const |
\qmlproperty int ModelBlendParticle3D::endTime | |
QQuick3DNode * | activationNode () const |
\qmlproperty Node ModelBlendParticle3D::activationNode | |
ModelBlendEmitMode | emitMode () const |
\qmlproperty enumeration ModelBlendParticle3D::ModelBlendEmitMode | |
Public Member Functions inherited from QQuick3DParticle | |
QQuick3DParticle (QQuick3DObject *parent=nullptr) | |
\qmltype Particle3D \inherits Object3D \inqmlmodule QtQuick3D.Particles3D | |
~QQuick3DParticle () override | |
QQuick3DParticleSystem * | system () 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< QString > | bindableObjectName () |
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). | |
QThread * | thread () 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 > | |
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 > | |
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 QObjectList & | children () 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< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () 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 | itemChange (ItemChange, const ItemChangeData &) override |
void | reset () override |
bool | lastParticle () const |
void | doSetMaxAmount (int amount) override |
void | componentComplete () override |
Invoked after the root component that caused this instantiation has completed construction. | |
int | nextCurrentIndex (const QQuick3DParticleEmitter *emitter) override |
void | setParticleData (int particleIndex, const QVector3D &position, const QVector3D &rotation, const QVector4D &color, float size, float age) |
QVector3D | particleCenter (int particleIndex) const |
QVector3D | particleEndPosition (int particleIndex) const |
QVector3D | particleEndRotation (int particleIndex) const |
int | randomIndex (int particleIndex) |
void | commitParticles () |
Protected Member Functions inherited from QQuick3DParticle | |
QQuick3DParticle (QQuick3DObjectPrivate &dd, QQuick3DNode *parent=nullptr) | |
void | updateBurstIndex (int amount) |
virtual void | setDepthBias (float bias) |
float | depthBias () const |
Protected Member Functions inherited from QQuick3DObject | |
virtual void | markAllDirty () |
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 | |
QObject * | sender () 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) | |
Properties | |
QQmlComponent * | delegate |
QQuick3DNode * | endNode |
ModelBlendMode | modelBlendMode |
int | endTime |
QQuick3DNode * | activationNode |
ModelBlendEmitMode | emitMode |
Properties inherited from QQuick3DParticle | |
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 | |
QQuick3DObject * | parent |
\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 | |
Private Member Functions | |
QSSGRenderGraphObject * | updateSpatialNode (QSSGRenderGraphObject *node) override |
Friends | |
class | QQuick3DParticleSystem |
class | QQuick3DParticleEmitter |
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) |
Protected Attributes inherited from QQuick3DParticle | |
QList< QQuick3DParticleData > | m_particleData |
QQuick3DParticleSpriteSequence * | m_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< QObjectData > | d_ptr |
Related Symbols inherited from QObject | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 31 of file qquick3dparticlemodelblendparticle_p.h.
Enumerator | |
---|---|
Sequential | |
Random | |
Activation |
Definition at line 55 of file qquick3dparticlemodelblendparticle_p.h.
Enumerator | |
---|---|
Explode | |
Construct | |
Transfer |
Definition at line 47 of file qquick3dparticlemodelblendparticle_p.h.
QT_BEGIN_NAMESPACE QQuick3DParticleModelBlendParticle::QQuick3DParticleModelBlendParticle | ( | QQuick3DNode * | parent = nullptr | ) |
\qmltype ModelBlendParticle3D \inherits Particle3D \inqmlmodule QtQuick3D.Particles3D
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
By default the particles are emitted in the order they are specified in the model unless \l emitMode is set to Random
or \l emitMode is set to Activation
and \l activationNode is set.
Some features defined in base class and emitters are not functional with this type: \list
Particle3D.FadeNone
. Definition at line 57 of file qquick3dparticlemodelblendparticle.cpp.
References QQuick3DParticle::doSetMaxAmount(), QQuick3DParticle::FadeNone, QQuick3DParticle::setFadeInEffect(), and QQuick3DParticle::setFadeOutEffect().
|
override |
Definition at line 65 of file qquick3dparticlemodelblendparticle.cpp.
QQuick3DNode * QQuick3DParticleModelBlendParticle::activationNode | ( | ) | const |
\qmlproperty Node ModelBlendParticle3D::activationNode
This property holds a node that activates particles and overrides the reqular emit routine. The activation node can be used to control how the particles are emitted spatially when the model is exploded/constructed from the particles. The activation node emits a particle if the center of that particle is on the positive half of the z-axis of the activation node. Animating the activation node to move trough the model will cause the particles to be emitted sequentially along the path the activation node moves.
Definition at line 168 of file qquick3dparticlemodelblendparticle.cpp.
|
signal |
|
signal |
|
inlineprotected |
Definition at line 103 of file qquick3dparticlemodelblendparticle_p.h.
|
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 QQuick3DParticle.
Definition at line 591 of file qquick3dparticlemodelblendparticle.cpp.
References QQuick3DObject::componentComplete(), QQuick3DParticle::setSystem(), and QQuick3DParticle::system().
QQmlComponent * QQuick3DParticleModelBlendParticle::delegate | ( | ) | const |
\qmlproperty Component ModelBlendParticle3D::delegate
The delegate provides a template defining the model for the ModelBlendParticle3D.
For example, using the default sphere model with default material
\qml Component { id: modelComponent Model { source: "#Sphere" scale: Qt.vector3d(0.5, 0.5, 0.5) materials: DefaultMaterial { diffuseColor: "red" } } }
ModelBlendParticle3D { id: particleRedSphere delegate: modelComponent } \endqml
Definition at line 94 of file qquick3dparticlemodelblendparticle.cpp.
|
signal |
|
overrideprotectedvirtual |
Reimplemented from QQuick3DParticle.
Definition at line 601 of file qquick3dparticlemodelblendparticle.cpp.
References qWarning.
QQuick3DParticleModelBlendParticle::ModelBlendEmitMode QQuick3DParticleModelBlendParticle::emitMode | ( | ) | const |
\qmlproperty enumeration ModelBlendParticle3D::ModelBlendEmitMode
Defines the emit mode of the particles
\value ModelBlendParticle3D.Sequential The particles are emitted in the order they are defined in the model. \value ModelBlendParticle3D.Random The particles are emitted in random order. \value ModelBlendParticle3D.Activation The particles are emitted when they are activated by the \l activationNode.
\qmlproperty bool ModelBlendParticle3D::emitMode
This property holds the emit mode of the particles.
Definition at line 190 of file qquick3dparticlemodelblendparticle.cpp.
|
signal |
QQuick3DNode * QQuick3DParticleModelBlendParticle::endNode | ( | ) | const |
\qmlproperty Node ModelBlendParticle3D::endNode
This property holds the node that specifies the transformation for the model at the end of particle effect. It defines the size, position and rotation where the model is constructed when using the ModelBlendParticle3D.Construct
and ModelBlendParticle3D.Transfer
blend modes.
Definition at line 117 of file qquick3dparticlemodelblendparticle.cpp.
|
signal |
int QQuick3DParticleModelBlendParticle::endTime | ( | ) | const |
\qmlproperty int ModelBlendParticle3D::endTime
This property holds the end time of the particle in milliseconds. The end time is used during construction and defines duration from particle lifetime at the end where the effect is blended with the model positions. Before the end time the particles positions are defined only by the particle effect, but during end time the particle position is blended linearly with the model end position.
Definition at line 153 of file qquick3dparticlemodelblendparticle.cpp.
|
signal |
|
overrideprotectedvirtual |
Reimplemented from QQuick3DObject.
Definition at line 689 of file qquick3dparticlemodelblendparticle.cpp.
References QQuick3DObject::itemChange().
|
protected |
Definition at line 717 of file qquick3dparticlemodelblendparticle.cpp.
References QQuick3DParticle::m_currentIndex, and QQuick3DParticle::m_maxAmount.
QQuick3DParticleModelBlendParticle::ModelBlendMode QQuick3DParticleModelBlendParticle::modelBlendMode | ( | ) | const |
\qmlproperty enumeration ModelBlendParticle3D::ModelBlendMode
Defines the blending mode for the particle effect.
\value ModelBlendParticle3D.Explode The model gets exploded i.e. the particles are emitted from the position of the model. \value ModelBlendParticle3D.Construct The model gets constructed i.e the particles fly from the emitter and construct the model at the end. \value ModelBlendParticle3D.Transfer Combines Explode and Transfer for the same model.
\qmlproperty ModelBlendMode ModelBlendParticle3D::modelBlendMode
This property holds blending mode for the particle effect.
Definition at line 139 of file qquick3dparticlemodelblendparticle.cpp.
|
signal |
|
overrideprotectedvirtual |
Reimplemented from QQuick3DParticle.
Definition at line 607 of file qquick3dparticlemodelblendparticle.cpp.
References QMap< Key, T >::contains(), QMap< Key, T >::insert(), and QQuick3DParticle::nextCurrentIndex().
|
protected |
Definition at line 712 of file qquick3dparticlemodelblendparticle.cpp.
|
protected |
Definition at line 772 of file qquick3dparticlemodelblendparticle.cpp.
References QMatrix4x4::map().
|
protected |
Definition at line 777 of file qquick3dparticlemodelblendparticle.cpp.
|
protected |
Definition at line 782 of file qquick3dparticlemodelblendparticle.cpp.
References QRandomGenerator::generate(), generator, i, QQuick3DParticle::m_maxAmount, qSwap(), and QQuick3DParticle::system().
|
overrideprotectedvirtual |
Reimplemented from QQuick3DParticle.
Definition at line 697 of file qquick3dparticlemodelblendparticle.cpp.
References Construct, i, and QQuick3DParticle::reset().
Referenced by setDelegate(), and setModelBlendMode().
|
slot |
Definition at line 230 of file qquick3dparticlemodelblendparticle.cpp.
References activationNode, activationNodeChanged(), and Q_EMIT.
|
slot |
Definition at line 99 of file qquick3dparticlemodelblendparticle.cpp.
References delegate, delegateChanged(), Q_EMIT, and reset().
|
slot |
Definition at line 239 of file qquick3dparticlemodelblendparticle.cpp.
References emitMode, emitModeChanged(), and Q_EMIT.
|
slot |
Definition at line 195 of file qquick3dparticlemodelblendparticle.cpp.
References QObject::connect(), QObject::disconnect(), endNodeChanged(), QQuick3DNode::positionChanged(), Q_EMIT, QQuick3DNode::rotationChanged(), and QQuick3DNode::scaleChanged().
|
slot |
Definition at line 222 of file qquick3dparticlemodelblendparticle.cpp.
References endTime, endTimeChanged(), and Q_EMIT.
|
slot |
Definition at line 213 of file qquick3dparticlemodelblendparticle.cpp.
References modelBlendModeChanged(), Q_EMIT, and reset().
|
protected |
Definition at line 627 of file qquick3dparticlemodelblendparticle.cpp.
References QQuick3DParticle::color, and position().
|
overrideprivatevirtual |
Reimplemented from QQuick3DParticle.
Definition at line 560 of file qquick3dparticlemodelblendparticle.cpp.
References QQuick3DParticle::fadeInEffect, QQuick3DParticle::FadeOpacity, QQuick3DParticle::fadeOutEffect, QQuick3DObjectPrivate::get(), QMatrix4x4::inverted(), model, Q_QUICK3D_PROFILE_ASSIGN_ID_SG, QSSGParticleBuffer::resize(), QQuick3DNode::sceneTransform, QQuick3DParticle::system(), and QQuick3DObjectPrivate::updateSpatialNode().
|
friend |
Definition at line 111 of file qquick3dparticlemodelblendparticle_p.h.
|
friend |
Definition at line 110 of file qquick3dparticlemodelblendparticle_p.h.
|
readwrite |
Definition at line 38 of file qquick3dparticlemodelblendparticle_p.h.
Referenced by setActivationNode().
|
readwrite |
Definition at line 34 of file qquick3dparticlemodelblendparticle_p.h.
Referenced by setDelegate().
|
readwrite |
Definition at line 39 of file qquick3dparticlemodelblendparticle_p.h.
Referenced by setEmitMode().
|
readwrite |
Definition at line 35 of file qquick3dparticlemodelblendparticle_p.h.
|
readwrite |
Definition at line 37 of file qquick3dparticlemodelblendparticle_p.h.
Referenced by setEndTime().
|
readwrite |
Definition at line 36 of file qquick3dparticlemodelblendparticle_p.h.