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
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
4#ifndef CAPSULEGEOMETRY_H
5#define CAPSULEGEOMETRY_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 <QQuick3DGeometry>
19
21
23{
29
35
36public:
38
39 bool enableNormals() const { return m_enableNormals; }
40 void setEnableNormals(bool enable);
41
42 bool enableUV() const { return m_enableUV; }
43 void setEnableUV(bool enable);
44
45 int longitudes() const { return m_longitudes; }
46 void setLongitudes(int longitudes);
47
48 int latitudes() const { return m_latitudes; }
49 void setLatitudes(int latitudes);
50
51 int rings() const { return m_rings; }
52 void setRings(int rings);
53
54 float height() const { return m_height; }
55 void setHeight(float height);
56
57 float diameter() const { return m_diameter; }
58 void setDiameter(float diameter);
59
68
69private:
70 enum class UvProfile { Fixed, Aspect, Uniform };
71
72 void updateData();
73
74 bool m_enableNormals = true;
75 bool m_enableUV = false;
76
77 // Number of longitudes, or meridians, distributed by azimuth
78 int m_longitudes = 32;
79 // Number of latitudes, distributed by inclination. Must be even
80 int m_latitudes = 16;
81 // Number of sections in cylinder between hemispheres
82 int m_rings = 1;
83 // Height of the middle cylinder on the y axis, excluding the hemispheres
84 float m_height = 100.f;
85 // Diameter on the xz plane
86 float m_diameter = 100.f;
87 UvProfile m_uvProfile = UvProfile::Fixed;
88};
89
91
92#endif
void setLongitudes(int longitudes)
void setEnableNormals(bool enable)
void latitudesChanged()
void longitudesChanged()
void setHeight(float height)
void setRings(int rings)
void diameterChanged()
bool enableUV() const
void enableUVChanged()
void setLatitudes(int latitudes)
float diameter() const
void setEnableUV(bool enable)
void enableNormalsChanged()
float height() const
void heightChanged()
void setDiameter(float diameter)
\qmltype Geometry \inherits Object3D \inqmlmodule QtQuick3D \instantiates QQuick3DGeometry
Combined button and popup list for selecting options.
GLint GLsizei GLsizei height
GLboolean enable
#define QML_NAMED_ELEMENT(NAME)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define signals