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
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
// Qt-Security score:significant reason:default
4
5
6
#
ifndef
QQUICK3DPARTICLECUSTOMSHAPE_H
7
#
define
QQUICK3DPARTICLECUSTOMSHAPE_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
"qquick3dparticleabstractshape_p.h"
21
#
include
<
QVector3D
>
22
23
QT_BEGIN_NAMESPACE
24
25
class
Q_QUICK3DPARTICLES_EXPORT
QQuick3DParticleCustomShape
:
public
QQuick3DParticleAbstractShape
26
{
27
Q_OBJECT
28
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
29
Q_PROPERTY(
bool
randomizeData READ randomizeData WRITE setRandomizeData NOTIFY randomizeDataChanged)
30
QML_NAMED_ELEMENT(ParticleCustomShape3D)
31
QML_ADDED_IN_VERSION(6, 3)
32
public
:
33
explicit
QQuick3DParticleCustomShape(QObject *parent =
nullptr
);
34
35
QUrl source()
const
;
36
bool
randomizeData()
const
;
37
38
// Returns point inside this shape
39
QVector3D getPosition(
int
particleIndex) override;
40
Q_REVISION(6, 10) QVector3D getSurfaceNormal(
int
particleIndex) override;
41
42
public
Q_SLOTS:
43
void
setSource(
const
QUrl &source);
44
void
setRandomizeData(
bool
random);
45
46
Q_SIGNALS:
47
void
sourceChanged();
48
void
randomizeDataChanged();
49
50
private
:
51
void
loadFromSource();
52
void
doRandomizeData();
53
54
QUrl m_source;
55
bool
m_random =
false
;
56
bool
m_randomizeDirty =
false
;
57
QList<QVector3D> m_positions;
58
QVector3D m_center;
59
};
60
61
QT_END_NAMESPACE
62
63
#
endif
// QQUICK3DPARTICLECUSTOMSHAPE_H
QQuick3DParticleCustomShape
Definition
qquick3dparticlecustomshape_p.h:26
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtquick3d
src
quick3dparticles
qquick3dparticlecustomshape_p.h
Generated on
for Qt by
1.18.0