Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
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:
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
43 void sourceChanged();
44 void randomizeDataChanged();
45
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:75
\inmodule QtCore
Definition qobject.h:103
\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)
static QVector3D getPosition(const quint8 *srcVertices, quint32 idx, quint32 vertexStride, quint32 posOffset)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
#define explicit