1// Copyright (C) 2015 Paul Lemire paul.lemire350@gmail.com
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QT3DEXTRAS_QSPHEREGEOMETRY_P_H
5#define QT3DEXTRAS_QSPHEREGEOMETRY_P_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 <Qt3DCore/private/qgeometry_p.h>
19#include <Qt3DExtras/qspheregeometry.h>
20
21QT_BEGIN_NAMESPACE
22
23namespace Qt3DCore {
24
25class QAttribute;
26class QBuffer;
27
28} // Qt3DCore
29
30namespace Qt3DExtras {
31
32class QSphereGeometryPrivate : public Qt3DCore::QGeometryPrivate
33{
34public:
35 QSphereGeometryPrivate();
36 void init();
37
38 bool m_generateTangents;
39 int m_rings;
40 int m_slices;
41 float m_radius;
42 Qt3DCore::QAttribute *m_positionAttribute;
43 Qt3DCore::QAttribute *m_normalAttribute;
44 Qt3DCore::QAttribute *m_texCoordAttribute;
45 Qt3DCore::QAttribute *m_tangentAttribute;
46 Qt3DCore::QAttribute *m_indexAttribute;
47 Qt3DCore::QBuffer *m_vertexBuffer;
48 Qt3DCore::QBuffer *m_indexBuffer;
49
50 Q_DECLARE_PUBLIC(QSphereGeometry)
51
52 QByteArray generateVertexData() const;
53 QByteArray generateIndexData() const;
54};
55
56} // Qt3DExtras
57
58QT_END_NAMESPACE
59
60#endif //QT3DEXTRAS_QSPHEREGEOMETRY_P_H
61
62

source code of qt3d/src/extras/geometries/qspheregeometry_p.h