Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qquick3dparticleshape_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 QQUICK3DPARTICLESHAPE_H
5
#define QQUICK3DPARTICLESHAPE_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
QQuick3DParticleSystem
;
24
class
QQuick3DModel
;
25
26
class
Q_QUICK3DPARTICLES_EXPORT
QQuick3DParticleShape
:
public
QQuick3DParticleAbstractShape
27
{
28
Q_OBJECT
29
Q_PROPERTY
(
bool
fill
READ
fill
WRITE setFill NOTIFY fillChanged)
30
Q_PROPERTY
(
ShapeType
type
READ
type
WRITE
setType
NOTIFY typeChanged)
31
Q_PROPERTY
(
QVector3D
extents READ extents WRITE setExtents NOTIFY extentsChanged)
32
33
QML_NAMED_ELEMENT
(ParticleShape3D)
34
QML_ADDED_IN_VERSION
(6, 2)
35
36
public
:
37
enum
ShapeType
38
{
39
Cube = 0,
40
Sphere
,
41
Cylinder
42
};
43
Q_ENUM
(ShapeType)
44
45
QQuick3DParticleShape
(
QObject
*
parent
=
nullptr
);
46
47
bool
fill
()
const
;
48
ShapeType
type
()
const
;
49
QVector3D
extents()
const
;
50
51
// Returns point inside this shape
52
QVector3D
getPosition
(
int
particleIndex)
override
;
53
54
public
Q_SLOTS
:
55
void
setFill(
bool
fill
);
56
void
setType
(
QQuick3DParticleShape::ShapeType
type
);
57
void
setExtents(
QVector3D
extends);
58
59
Q_SIGNALS
:
60
void
fillChanged
();
61
void
typeChanged
();
62
void
extentsChanged
();
63
64
private
:
65
QVector3D
randomPositionCube(
int
particleIndex)
const
;
66
QVector3D
randomPositionSphere(
int
particleIndex)
const
;
67
QVector3D
randomPositionCylinder(
int
particleIndex)
const
;
68
69
bool
m_fill =
true
;
70
ShapeType
m_type = ShapeType::Cube;
71
QVector3D
m_extents =
QVector3D
(50, 50, 50);
72
};
73
74
QT_END_NAMESPACE
75
76
#endif
// QQUICK3DPARTICLESHAPE_H
QObject
\inmodule QtCore
Definition
qobject.h:90
QQuick3DModel
Definition
qquick3dmodel_p.h:61
QQuick3DParticleAbstractShape
Definition
qquick3dparticleabstractshape_p.h:30
QQuick3DParticleAbstractShape::getPosition
virtual QVector3D getPosition(int particleIndex)=0
QQuick3DParticleShape
Definition
qquick3dparticleshape_p.h:27
QQuick3DParticleShape::ShapeType
ShapeType
Definition
qquick3dparticleshape_p.h:38
QQuick3DParticleShape::Sphere
@ Sphere
Definition
qquick3dparticleshape_p.h:40
QQuick3DParticleShape::extentsChanged
void extentsChanged()
QQuick3DParticleShape::typeChanged
void typeChanged()
QQuick3DParticleShape::fillChanged
void fillChanged()
QQuick3DParticleSystem
Definition
qquick3dparticlesystem_p.h:52
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
type
GLenum type
Definition
qopengles2ext.h:150
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_ENUM
#define Q_ENUM(x)
Definition
qtmetamacros.h:68
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)
setType
proxy setType(QNetworkProxy::Socks5Proxy)
parent
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
Definition
uiaclientinterfaces_p.h:209
qtquick3d
src
quick3dparticles
qquick3dparticleshape_p.h
Generated by
1.9.7