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
qquick3dparticlepointrotator_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
QQUICK3DPARTICLEPOINTROTATOR_H
7
#
define
QQUICK3DPARTICLEPOINTROTATOR_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
<
QObject
>
21
#
include
<
QtQuick3DParticles
/
private
/
qquick3dparticleaffector_p
.
h
>
22
23
QT_BEGIN_NAMESPACE
24
25
class
Q_QUICK3DPARTICLES_EXPORT
QQuick3DParticlePointRotator
:
public
QQuick3DParticleAffector
26
{
27
Q_OBJECT
28
Q_PROPERTY(
float
magnitude READ magnitude WRITE setMagnitude NOTIFY magnitudeChanged)
29
Q_PROPERTY(QVector3D direction READ direction WRITE setDirection NOTIFY directionChanged)
30
Q_PROPERTY(QVector3D pivotPoint READ pivotPoint WRITE setPivotPoint NOTIFY pivotPointChanged)
31
QML_NAMED_ELEMENT(PointRotator3D)
32
QML_ADDED_IN_VERSION(6, 2)
33
34
public
:
35
QQuick3DParticlePointRotator(QQuick3DNode *parent =
nullptr
);
36
37
float
magnitude()
const
;
38
QVector3D direction()
const
;
39
QVector3D pivotPoint()
const
;
40
41
public
Q_SLOTS:
42
void
setMagnitude(
float
magnitude);
43
void
setDirection(
const
QVector3D &direction);
44
void
setPivotPoint(
const
QVector3D &point);
45
46
Q_SIGNALS:
47
void
magnitudeChanged();
48
void
directionChanged();
49
void
pivotPointChanged();
50
51
protected
:
52
void
prepareToAffect() override;
53
void
affectParticle(
const
QQuick3DParticleData &sd, QQuick3DParticleDataCurrent *d,
float
time) override;
54
55
private
:
56
float
m_magnitude = 10.0f;
57
QVector3D m_direction = {0.0f, 1.0f, 0.0f};
58
QVector3D m_directionNormalized = {0.0f, 1.0f, 0.0f};
59
QVector3D m_pivotPoint;
60
QMatrix4x4 m_rotationMatrix;
61
};
62
63
QT_END_NAMESPACE
64
65
#
endif
// QQUICK3DPARTICLEPOINTROTATOR_H
QQuick3DParticlePointRotator
Definition
qquick3dparticlepointrotator_p.h:26
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtquick3d
src
quick3dparticles
qquick3dparticlepointrotator_p.h
Generated on
for Qt by
1.18.0