1// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
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_QCYLINDERGEOMETRY_P_H
5#define QT3DEXTRAS_QCYLINDERGEOMETRY_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 for the convenience
12// of other Qt classes. 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/qcylindergeometry.h>
20
21QT_BEGIN_NAMESPACE
22
23namespace Qt3DCore {
24
25class QAttribute;
26class QBuffer;
27
28} // namespace Qt3DCore
29
30namespace Qt3DExtras {
31
32class QCylinderGeometryPrivate : public Qt3DCore::QGeometryPrivate
33{
34public:
35 QCylinderGeometryPrivate();
36
37 void init();
38
39 Q_DECLARE_PUBLIC(QCylinderGeometry)
40
41 int m_rings;
42 int m_slices;
43 float m_radius;
44 float m_length;
45 Qt3DCore::QAttribute *m_positionAttribute;
46 Qt3DCore::QAttribute *m_normalAttribute;
47 Qt3DCore::QAttribute *m_texCoordAttribute;
48 Qt3DCore::QAttribute *m_indexAttribute;
49 Qt3DCore::QBuffer *m_vertexBuffer;
50 Qt3DCore::QBuffer *m_indexBuffer;
51
52 QByteArray generateVertexData() const;
53 QByteArray generateIndexData() const;
54};
55
56} // Qt3DExtras
57
58QT_END_NAMESPACE
59
60#endif // QT3DEXTRAS_QCYLINDERGEOMETRY_P_H
61
62

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