Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qquick3dparticlemodelshape_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 QQUICK3DPARTICLEMODELSHAPE_H
5
#define QQUICK3DPARTICLEMODELSHAPE_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 "
qquick3dparticleabstractshape_p.h
"
19
#include <QVector3D>
20
21
QT_BEGIN_NAMESPACE
22
23
class
QQuick3DModel
;
24
class
QQmlComponent
;
25
26
class
Q_QUICK3DPARTICLES_EXPORT
QQuick3DParticleModelShape
:
public
QQuick3DParticleAbstractShape
27
{
28
Q_OBJECT
29
Q_PROPERTY
(
bool
fill
READ
fill
WRITE setFill NOTIFY fillChanged)
30
Q_PROPERTY
(
QQmlComponent
*delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
31
QML_NAMED_ELEMENT
(ParticleModelShape3D)
32
QML_ADDED_IN_VERSION
(6, 2)
33
34
public
:
35
QQuick3DParticleModelShape
(
QObject
*
parent
=
nullptr
);
36
~QQuick3DParticleModelShape
()
override
;
37
38
bool
fill
()
const
;
39
QQmlComponent
*delegate()
const
;
40
41
public
Q_SLOTS
:
42
void
setFill(
bool
fill
);
43
void
setDelegate(
QQmlComponent
*delegate);
44
45
// Returns point inside this shape
46
QVector3D
getPosition
(
int
particleIndex)
override
;
47
48
Q_SIGNALS
:
49
void
fillChanged
();
50
void
delegateChanged
();
51
52
private
:
53
QVector3D
randomPositionModel(
int
particleIndex);
54
void
createModel();
55
void
clearModelVertexPositions();
56
void
calculateModelVertexPositions();
57
58
QQmlComponent
*
m_delegate
=
nullptr
;
59
QQuick3DModel
*m_model =
nullptr
;
60
QVector<QVector3D>
m_vertexPositions;
61
float
m_modelTriangleAreasSum = 0;
62
QVector<float>
m_modelTriangleAreas;
63
QVector3D
m_modelTriangleCenter;
64
bool
m_fill =
true
;
65
};
66
67
QT_END_NAMESPACE
68
69
#endif
// QQUICK3DPARTICLEMODELSHAPE_H
m_delegate
DarwinBluetooth::DeviceInquiryDelegate * m_delegate
Definition
btdeviceinquiry.mm:21
QList
Definition
qlist.h:74
QObject
\inmodule QtCore
Definition
qobject.h:90
QQmlComponent
The QQmlComponent class encapsulates a QML component definition.
Definition
qqmlcomponent.h:33
QQuick3DModel
Definition
qquick3dmodel_p.h:61
QQuick3DParticleAbstractShape
Definition
qquick3dparticleabstractshape_p.h:30
QQuick3DParticleAbstractShape::getPosition
virtual QVector3D getPosition(int particleIndex)=0
QQuick3DParticleModelShape
Definition
qquick3dparticlemodelshape_p.h:27
QQuick3DParticleModelShape::fillChanged
void fillChanged()
QQuick3DParticleModelShape::delegateChanged
void delegateChanged()
QVector3D
The QVector3D class represents a vector or vertex in 3D space.
Definition
qvectornd.h:171
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
QML_NAMED_ELEMENT
#define QML_NAMED_ELEMENT(NAME)
Definition
qqmlintegration.h:52
QML_ADDED_IN_VERSION
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
Definition
qqmlintegration.h:86
qquick3dparticleabstractshape_p.h
Q_PROPERTY
#define Q_PROPERTY(...)
Definition
qtmetamacros.h:56
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:117
Q_SLOTS
#define Q_SLOTS
Definition
qtmetamacros.h:44
Q_SIGNALS
#define Q_SIGNALS
Definition
qtmetamacros.h:45
fill
ba fill(true)
parent
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
Definition
uiaclientinterfaces_p.h:209
qtquick3d
src
quick3dparticles
qquick3dparticlemodelshape_p.h
Generated by
1.9.7