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
qquick3dparticletargetdirection_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
// Qt-Security score:significant reason:default
4
5
6
#
ifndef
QQUICK3DPARTICLETARGETDIRECTION_H
7
#
define
QQUICK3DPARTICLETARGETDIRECTION_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
<
QVector3D
>
21
#
include
<
QQmlEngine
>
22
23
#
include
<
QtQuick3DParticles
/
private
/
qquick3dparticledirection_p
.
h
>
24
25
QT_BEGIN_NAMESPACE
26
27
class
Q_QUICK3DPARTICLES_EXPORT
QQuick3DParticleTargetDirection
:
public
QQuick3DParticleDirection
28
{
29
Q_OBJECT
30
Q_PROPERTY(QVector3D position READ position WRITE setPosition NOTIFY positionChanged)
31
Q_PROPERTY(QVector3D positionVariation READ positionVariation WRITE setPositionVariation NOTIFY positionVariationChanged)
32
Q_PROPERTY(
bool
normalized READ normalized WRITE setNormalized NOTIFY normalizedChanged)
33
Q_PROPERTY(
float
magnitude READ magnitude WRITE setMagnitude NOTIFY magnitudeChanged)
34
Q_PROPERTY(
float
magnitudeVariation READ magnitudeVariation WRITE setMagnitudeVariation NOTIFY magnitudeChangedVariation)
35
QML_NAMED_ELEMENT(TargetDirection3D)
36
QML_ADDED_IN_VERSION(6, 2)
37
38
public
:
39
QQuick3DParticleTargetDirection(QObject *parent =
nullptr
);
40
41
QVector3D position()
const
;
42
void
setPosition(
const
QVector3D &position);
43
bool
normalized()
const
;
44
float
magnitude()
const
;
45
float
magnitudeVariation()
const
;
46
QVector3D positionVariation()
const
;
47
48
public
Q_SLOTS:
49
void
setPositionVariation(
const
QVector3D &positionVariation);
50
void
setNormalized(
bool
normalized);
51
void
setMagnitude(
float
magnitude);
52
void
setMagnitudeVariation(
float
magnitudeVariation);
53
54
Q_SIGNALS:
55
void
positionChanged();
56
void
positionVariationChanged();
57
void
normalizedChanged();
58
void
magnitudeChanged();
59
void
magnitudeChangedVariation();
60
61
private
:
62
QVector3D sample(
const
QQuick3DParticleData &d) override;
63
QVector3D m_position;
64
QVector3D m_positionVariation;
65
bool
m_normalized =
false
;
66
float
m_magnitude = 1.0f;
67
float
m_magnitudeVariation = 0.0f;
68
69
};
70
71
QT_END_NAMESPACE
72
73
#
endif
// QQUICK3DPARTICLETARGETDIRECTION_H
QQuick3DParticleTargetDirection
Definition
qquick3dparticletargetdirection_p.h:28
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtquick3d
src
quick3dparticles
qquick3dparticletargetdirection_p.h
Generated on
for Qt by
1.18.0