Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qquick3dparticlecustomshape_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 QQUICK3DPARTICLECUSTOMSHAPE_H
5#define QQUICK3DPARTICLECUSTOMSHAPE_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
19
21
22class Q_QUICK3DPARTICLES_EXPORT QQuick3DParticleCustomShape : public QQuick3DParticleAbstractShape
23{
25 Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
26 Q_PROPERTY(bool randomizeData READ randomizeData WRITE setRandomizeData NOTIFY randomizeDataChanged)
27 QML_NAMED_ELEMENT(ParticleCustomShape3D)
29public:
30 explicit QQuick3DParticleCustomShape(QObject *parent = nullptr);
31
32 QUrl source() const;
33 bool randomizeData() const;
34
35 // Returns point inside this shape
36 QVector3D getPosition(int particleIndex) override;
37
38public Q_SLOTS:
39 void setSource(const QUrl &source);
40 void setRandomizeData(bool random);
41
45
46private:
47 void loadFromSource();
48 void doRandomizeData();
49
50 QUrl m_source;
51 bool m_random = false;
52 bool m_randomizeDirty = false;
53 QList<QVector3D> m_positions;
54};
55
57
58#endif // QQUICK3DPARTICLECUSTOMSHAPE_H
Definition qlist.h:74
\inmodule QtCore
Definition qobject.h:90
virtual QVector3D getPosition(int particleIndex)=0
\inmodule QtCore
Definition qurl.h:94
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
Combined button and popup list for selecting options.
GLsizei GLsizei GLchar * source
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent