Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qquick3dparticlescaleaffector_p.h
Go to the documentation of this file.
1
// Copyright (C) 2022 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
6
#
ifndef
QQUICK3DPARTICLESCALEAFFECTOR_H
7
#
define
QQUICK3DPARTICLESCALEAFFECTOR_H
8
9
//
10
// W A R N I N G
11
// -------------
12
//
13
// This file is not part of the Qt API. It exists purely as an
14
// implementation detail. This header file may change from version to
15
// version without notice, or even be removed.
16
//
17
// We mean it.
18
//
19
20
#
include
<
QtQuick3DParticles
/
private
/
qquick3dparticleaffector_p
.
h
>
21
#
include
<
qeasingcurve
.
h
>
22
23
QT_BEGIN_NAMESPACE
24
25
class
Q_QUICK3DPARTICLES_EXPORT
QQuick3DParticleScaleAffector
:
public
QQuick3DParticleAffector
26
{
27
Q_OBJECT
28
Q_PROPERTY(
float
minSize READ minSize WRITE setMinSize NOTIFY minSizeChanged)
29
Q_PROPERTY(
float
maxSize READ maxSize WRITE setMaxSize NOTIFY maxSizeChanged)
30
Q_PROPERTY(
int
duration READ duration WRITE setDuration NOTIFY durationChanged)
31
Q_PROPERTY(ScalingType type READ type WRITE setType NOTIFY typeChanged)
32
Q_PROPERTY(QEasingCurve easingCurve READ easingCurve WRITE setEasingCurve NOTIFY easingCurveChanged)
33
QML_NAMED_ELEMENT(ScaleAffector3D)
34
QML_ADDED_IN_VERSION(6, 4)
35
public
:
36
QQuick3DParticleScaleAffector(QQuick3DNode *parent =
nullptr
);
37
38
enum
ScalingType
39
{
40
Linear,
41
SewSaw,
42
SineWave,
43
AbsSineWave,
44
Step,
45
SmoothStep,
46
};
47
Q_ENUM(ScalingType)
48
49
float
minSize()
const
;
50
float
maxSize()
const
;
51
int
duration()
const
;
52
ScalingType type()
const
;
53
QEasingCurve easingCurve()
const
;
54
55
public
Q_SLOTS:
56
void
setMinSize(
float
size);
57
void
setMaxSize(
float
size);
58
void
setDuration(
int
duration);
59
void
setType(ScalingType type);
60
void
setEasingCurve(
const
QEasingCurve &curve);
61
62
Q_SIGNALS:
63
void
minSizeChanged();
64
void
maxSizeChanged();
65
void
durationChanged();
66
void
typeChanged();
67
void
easingCurveChanged();
68
69
protected
:
70
void
prepareToAffect() override;
71
void
affectParticle(
const
QQuick3DParticleData &, QQuick3DParticleDataCurrent *d,
float
time) override;
72
73
private
:
74
float
m_minSize = 1.0f;
75
float
m_maxSize = 1.0f;
76
int
m_duration = 1000;
77
ScalingType m_type = Linear;
78
QEasingCurve m_easing;
79
};
80
81
QT_END_NAMESPACE
82
83
#
endif
QQuick3DParticleScaleAffector
Definition
qquick3dparticlescaleaffector_p.h:26
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
M_PI
#define M_PI
Definition
qmath.h:201
qtquick3d
src
quick3dparticles
qquick3dparticlescaleaffector_p.h
Generated on
for Qt by
1.18.0