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
4#ifndef QQUICK3DPARTICLEABSTRACTSHAPE_H
5#define QQUICK3DPARTICLEABSTRACTSHAPE_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 <QObject>
19#include <QtQml/qqmlparserstatus.h>
20#include <QtQml/qqml.h>
21#include <QtQuick3DParticles/qtquick3dparticlesglobal.h>
22#include <private/qglobal_p.h>
23
24QT_BEGIN_NAMESPACE
25
26class QQuick3DParticleSystem;
27class QQuick3DNode;
28
29class Q_QUICK3DPARTICLES_EXPORT QQuick3DParticleAbstractShape : public QObject, public QQmlParserStatus
30{
31 Q_OBJECT
32 QML_ANONYMOUS
33 Q_INTERFACES(QQmlParserStatus)
34 QML_ADDED_IN_VERSION(6, 2)
35
36public:
37 explicit QQuick3DParticleAbstractShape(QObject *parent = nullptr);
38 // Returns position inside the shape
39 virtual QVector3D getPosition(int particleIndex) = 0;
40 Q_REVISION(6, 10) virtual QVector3D getSurfaceNormal(int particleIndex) = 0;
41
42protected:
43 // These need access to m_system
44 friend class QQuick3DParticleEmitter;
45 friend class QQuick3DParticleAttractor;
46
47 // From QQmlParserStatus
48 void componentComplete() override;
49 void classBegin() override {}
50 QQuick3DNode *parentNode();
51
52 QQuick3DNode *m_parentNode = nullptr;
53 QQuick3DParticleSystem *m_system = nullptr;
54};
55
56QT_END_NAMESPACE
57
58#endif // QQUICK3DPARTICLEABSTRACTSHAPE_H