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
qcapsulegeometry_p.h
Go to the documentation of this file.
1
// Copyright (C) 2022 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
#
ifndef
CAPSULEGEOMETRY_H
6
#
define
CAPSULEGEOMETRY_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QQuick3DGeometry
>
20
21
QT_BEGIN_NAMESPACE
22
23
class
CapsuleGeometryPhysics :
public
QQuick3DGeometry
24
{
25
Q_OBJECT
26
QML_NAMED_ELEMENT(CapsuleGeometry)
27
Q_PROPERTY(
bool
enableNormals READ enableNormals WRITE setEnableNormals NOTIFY
28
enableNormalsChanged)
29
Q_PROPERTY(
bool
enableUV READ enableUV WRITE setEnableUV NOTIFY enableUVChanged)
30
31
Q_PROPERTY(
int
longitudes READ longitudes WRITE setLongitudes NOTIFY longitudesChanged)
32
Q_PROPERTY(
int
latitudes READ latitudes WRITE setLatitudes NOTIFY latitudesChanged)
33
Q_PROPERTY(
int
rings READ rings WRITE setRings NOTIFY ringsChanged)
34
Q_PROPERTY(
float
height READ height WRITE setHeight NOTIFY heightChanged)
35
Q_PROPERTY(
float
diameter READ diameter WRITE setDiameter NOTIFY diameterChanged)
36
37
public
:
38
CapsuleGeometryPhysics();
39
40
bool
enableNormals()
const
{
return
m_enableNormals; }
41
void
setEnableNormals(
bool
enable);
42
43
bool
enableUV()
const
{
return
m_enableUV; }
44
void
setEnableUV(
bool
enable);
45
46
int
longitudes()
const
{
return
m_longitudes; }
47
void
setLongitudes(
int
longitudes);
48
49
int
latitudes()
const
{
return
m_latitudes; }
50
void
setLatitudes(
int
latitudes);
51
52
int
rings()
const
{
return
m_rings; }
53
void
setRings(
int
rings);
54
55
float
height()
const
{
return
m_height; }
56
void
setHeight(
float
height);
57
58
float
diameter()
const
{
return
m_diameter; }
59
void
setDiameter(
float
diameter);
60
61
signals:
62
void
enableNormalsChanged();
63
void
enableUVChanged();
64
void
longitudesChanged();
65
void
latitudesChanged();
66
void
ringsChanged();
67
void
heightChanged();
68
void
diameterChanged();
69
70
private
:
71
enum
class
UvProfile { Fixed, Aspect, Uniform };
72
73
void
updateData();
74
75
bool
m_enableNormals =
true
;
76
bool
m_enableUV =
false
;
77
78
// Number of longitudes, or meridians, distributed by azimuth
79
int
m_longitudes = 32;
80
// Number of latitudes, distributed by inclination. Must be even
81
int
m_latitudes = 16;
82
// Number of sections in cylinder between hemispheres
83
int
m_rings = 1;
84
// Height of the middle cylinder on the y axis, excluding the hemispheres
85
float
m_height = 100.f;
86
// Diameter on the xz plane
87
float
m_diameter = 100.f;
88
UvProfile m_uvProfile = UvProfile::Fixed;
89
};
90
91
QT_END_NAMESPACE
92
93
#
endif
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
Face
Definition
qcapsulegeometry.cpp:160
Face::normalIdx
uint32_t normalIdx
Definition
qcapsulegeometry.cpp:166
Face::vertexIdx
uint32_t vertexIdx
Definition
qcapsulegeometry.cpp:162
Face::textureIdx
uint32_t textureIdx
Definition
qcapsulegeometry.cpp:164
qtquick3dphysics
src
helpers
qcapsulegeometry_p.h
Generated on
for Qt by
1.18.0