Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquick3dshadergeometry_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 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 Q_QUICK3D_SHADERGEOMETRY_P_H
6#define Q_QUICK3D_SHADERGEOMETRY_P_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 <QtQuick3D/private/qquick3dgeometry_p.h>
20
21#include <QtGui/qvector3d.h>
22
24
25class Q_QUICK3D_EXPORT QQuick3DShaderGeometryBasePrivate : public QQuick3DGeometryPrivate
26{
27public:
28 QQuick3DShaderGeometryBasePrivate() = default;
29 explicit QQuick3DShaderGeometryBasePrivate(Flags flags);
30
31 QQuick3DGeometry::PrimitiveType m_primitive = QQuick3DGeometry::PrimitiveType::Triangles;
32 QVector3D m_boundsMinimum;
33 QVector3D m_boundsMaximum;
34 bool m_boundsSet = false;
35};
36
37class Q_QUICK3D_EXPORT QQuick3DShaderGeometryBase : public QQuick3DGeometry
38{
39 Q_OBJECT
40 QML_ANONYMOUS
41 QML_ADDED_IN_VERSION(6, 13)
42 Q_PROPERTY(PrimitiveType primitiveType READ primitive WRITE setPrimitive NOTIFY primitiveChanged FINAL)
43 Q_PROPERTY(QVector3D boundsMinimum READ boundsMinimum WRITE setBoundsMinimum NOTIFY boundsMinimumChanged FINAL)
44 Q_PROPERTY(QVector3D boundsMaximum READ boundsMaximum WRITE setBoundsMaximum NOTIFY boundsMaximumChanged FINAL)
45
46public:
47 ~QQuick3DShaderGeometryBase() override;
48
49 PrimitiveType primitive() const;
50 void setPrimitive(PrimitiveType primitive);
51
52 QVector3D boundsMinimum() const;
53 void setBoundsMinimum(const QVector3D &boundsMinimum);
54
55 QVector3D boundsMaximum() const;
56 void setBoundsMaximum(const QVector3D &boundsMaximum);
57
58Q_SIGNALS:
59 void primitiveChanged();
60 void boundsMinimumChanged();
61 void boundsMaximumChanged();
62
63protected:
64 explicit QQuick3DShaderGeometryBase(QQuick3DShaderGeometryBasePrivate &dd, QQuick3DObject *parent = nullptr);
65 virtual quint32 subsetCount() const = 0;
66 void updateData();
67
68private:
69 Q_DECLARE_PRIVATE(QQuick3DShaderGeometryBase)
70};
71
77
78class Q_QUICK3D_EXPORT QQuick3DShaderGeometry : public QQuick3DShaderGeometryBase
79{
80 Q_OBJECT
81 QML_NAMED_ELEMENT(ShaderGeometry)
82 QML_ADDED_IN_VERSION(6, 13)
83 Q_PROPERTY(int vertexCount READ vertexCount WRITE setVertexCount NOTIFY vertexCountChanged FINAL)
84
85public:
86 explicit QQuick3DShaderGeometry(QQuick3DObject *parent = nullptr);
87 ~QQuick3DShaderGeometry() override;
88
89 int vertexCount() const;
90 void setVertexCount(int vertexCount);
91
92Q_SIGNALS:
93 void vertexCountChanged();
94
95protected:
96 quint32 subsetCount() const override;
97
98private:
99 Q_DECLARE_PRIVATE(QQuick3DShaderGeometry)
100};
101
102QT_END_NAMESPACE
103
104#endif // Q_QUICK3D_SHADERGEOMETRY_P_H