Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquick3dparticleabstractshape_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 QQUICK3DPARTICLEABSTRACTSHAPE_H
7#define QQUICK3DPARTICLEABSTRACTSHAPE_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 <QtQml/qqmlparserstatus.h>
22#include <QtQml/qqml.h>
23#include <QtQuick3DParticles/qtquick3dparticlesglobal.h>
24#include <private/qglobal_p.h>
25
26QT_BEGIN_NAMESPACE
27
28class QQuick3DParticleSystem;
29class QQuick3DNode;
30
31class Q_QUICK3DPARTICLES_EXPORT QQuick3DParticleAbstractShape : public QObject, public QQmlParserStatus
32{
33 Q_OBJECT
34 QML_ANONYMOUS
35 Q_INTERFACES(QQmlParserStatus)
36 QML_ADDED_IN_VERSION(6, 2)
37
38public:
39 explicit QQuick3DParticleAbstractShape(QObject *parent = nullptr);
40 // Returns position inside the shape
41 virtual QVector3D getPosition(int particleIndex) = 0;
42 Q_REVISION(6, 10) virtual QVector3D getSurfaceNormal(int particleIndex) = 0;
43
44protected:
45 // These need access to m_system
46 friend class QQuick3DParticleEmitter;
47 friend class QQuick3DParticleAttractor;
48
49 // From QQmlParserStatus
50 void componentComplete() override;
51 void classBegin() override {}
52 QQuick3DNode *parentNode();
53
54 QQuick3DNode *m_parentNode = nullptr;
55 QQuick3DParticleSystem *m_system = nullptr;
56};
57
58QT_END_NAMESPACE
59
60#endif // QQUICK3DPARTICLEABSTRACTSHAPE_H
Combined button and popup list for selecting options.