Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qquick3dparticlemodelparticle_p.h
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4
#ifndef QQUICK3DPARTICLEMODELPARTICLE_H
5
#define QQUICK3DPARTICLEMODELPARTICLE_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#include <QColor>
19
#include <QVector4D>
20
#include <QtQuick3D/private/qquick3dnode_p.h>
21
#include <QtQuick3D/private/qquick3dmodel_p.h>
22
#include <QtQuick3D/qquick3dinstancing.h>
23
24
#include <QtQuick3DParticles/private/qquick3dparticle_p.h>
25
#include <QtQuick3DParticles/private/qquick3dparticlesystem_p.h>
26
#include <QtQuick3DParticles/private/qquick3dparticledata_p.h>
27
28
QT_BEGIN_NAMESPACE
29
30
class
QQmlInstanceModel
;
31
class
QQmlChangeSet
;
32
class
QQuick3DParticleInstanceTable
;
33
34
class
Q_QUICK3DPARTICLES_EXPORT
QQuick3DParticleModelParticle
:
public
QQuick3DParticle
35
{
36
Q_OBJECT
37
Q_PROPERTY
(
QQmlComponent
*delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
38
Q_PROPERTY
(
QQuick3DInstancing
*instanceTable READ instanceTable NOTIFY instanceTableChanged)
39
40
QML_NAMED_ELEMENT
(ModelParticle3D)
41
Q_CLASSINFO
(
"DefaultProperty"
,
"delegate"
)
42
QML_ADDED_IN_VERSION
(6, 2)
43
44
public
:
45
QQuick3DParticleModelParticle
(
QQuick3DNode
*
parent
=
nullptr
);
46
47
QQmlComponent
*delegate()
const
;
48
QQuick3DInstancing
*instanceTable()
const
;
49
50
public
Q_SLOTS
:
51
void
setDelegate(
QQmlComponent
*delegate);
52
53
Q_SIGNALS
:
54
void
delegateChanged
();
55
void
instanceTableChanged
();
56
57
protected
:
58
void
componentComplete
()
override
;
59
void
itemChange
(ItemChange change,
const
ItemChangeData &
value
)
override
;
60
61
void
setDepthBias
(
float
bias
)
override
62
{
63
QQuick3DParticle::setDepthBias
(
bias
);
64
if
(m_node)
65
updateDepthBias(
bias
);
66
}
67
private
:
68
void
regenerate();
69
void
handleMaxAmountChanged(
int
amount);
70
void
handleSortModeChanged(
QQuick3DParticle::SortMode
mode
);
71
72
friend
class
QQuick3DParticleSystem
;
73
friend
class
QQuick3DParticleEmitter
;
74
75
void
clearInstanceTable();
76
void
addInstance(
const
QVector3D
&
position
,
const
QVector3D
&
scale
,
77
const
QVector3D
&eulerRotation,
const
QColor
&
color
,
78
float
age);
79
void
commitInstance();
80
void
updateDepthBias(
float
bias
);
81
82
QPointer<QQmlComponent>
m_delegate
;
83
QPointer<QQuick3DNode>
m_node;
84
QQuick3DParticleInstanceTable
*m_instanceTable =
nullptr
;
85
86
QVector3D
m_initialScale;
87
float
m_initialOpacity = 1.0f;
88
bool
m_explicitColor;
89
};
90
91
QT_END_NAMESPACE
92
93
#endif
// QQUICK3DPARTICLEMODELPARTICLE_H
m_delegate
DarwinBluetooth::DeviceInquiryDelegate * m_delegate
Definition
btdeviceinquiry.mm:21
QColor
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition
qcolor.h:31
QPointer
\inmodule QtCore
Definition
qpointer.h:18
QQmlChangeSet
The QQmlChangeSet class stores an ordered list of notifications about changes to a linear data set.
Definition
qqmlchangeset_p.h:25
QQmlComponent
The QQmlComponent class encapsulates a QML component definition.
Definition
qqmlcomponent.h:33
QQmlInstanceModel
Definition
qqmlobjectmodel_p.h:32
QQuick3DInstancing
\inmodule QtQuick3D \inherits QQuick3DObject
Definition
qquick3dinstancing.h:17
QQuick3DNode
Definition
qquick3dnode_p.h:30
QQuick3DObject::itemChange
virtual void itemChange(ItemChange, const ItemChangeData &)
Definition
qquick3dobject.cpp:221
QQuick3DParticleEmitter
Definition
qquick3dparticleemitter_p.h:29
QQuick3DParticleInstanceTable
Definition
qquick3dparticlemodelparticle.cpp:81
QQuick3DParticleModelParticle
Definition
qquick3dparticlemodelparticle_p.h:35
QQuick3DParticleModelParticle::delegateChanged
void delegateChanged()
QQuick3DParticleModelParticle::instanceTableChanged
void instanceTableChanged()
QQuick3DParticleModelParticle::setDepthBias
void setDepthBias(float bias) override
Definition
qquick3dparticlemodelparticle_p.h:61
QQuick3DParticleSystem
Definition
qquick3dparticlesystem_p.h:52
QQuick3DParticle
Definition
qquick3dparticle_p.h:29
QQuick3DParticle::setDepthBias
virtual void setDepthBias(float bias)
Definition
qquick3dparticle_p.h:148
QQuick3DParticle::componentComplete
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
Definition
qquick3dparticle.cpp:455
QQuick3DParticle::SortMode
SortMode
Definition
qquick3dparticle_p.h:69
QVector3D
The QVector3D class represents a vector or vertex in 3D space.
Definition
qvectornd.h:171
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
color
Definition
qssgutils_p.h:103
value
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Definition
qeglstreamconvenience_p.h:46
mode
GLenum mode
Definition
qopengles2ext.h:333
bias
GLfloat bias
Definition
qopenglext.h:7943
scale
GLenum GLenum GLenum GLenum GLenum scale
Definition
qopenglext.h:10817
QML_NAMED_ELEMENT
#define QML_NAMED_ELEMENT(NAME)
Definition
qqmlintegration.h:52
QML_ADDED_IN_VERSION
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
Definition
qqmlintegration.h:86
position
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
Definition
qquickanchors.cpp:66
Q_PROPERTY
#define Q_PROPERTY(...)
Definition
qtmetamacros.h:56
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:117
Q_CLASSINFO
#define Q_CLASSINFO(name, value)
Definition
qtmetamacros.h:52
Q_SLOTS
#define Q_SLOTS
Definition
qtmetamacros.h:44
Q_SIGNALS
#define Q_SIGNALS
Definition
qtmetamacros.h:45
parent
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
Definition
uiaclientinterfaces_p.h:209
qtquick3d
src
quick3dparticles
qquick3dparticlemodelparticle_p.h
Generated by
1.9.7