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_QTORUSGEOMETRY_P_H |
5 | #define QT3DEXTRAS_QTORUSGEOMETRY_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/qtorusgeometry.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | namespace Qt3DCore { |
24 | |
25 | class QAttribute; |
26 | class QBuffer; |
27 | |
28 | } // Qt3DCore |
29 | |
30 | namespace Qt3DExtras { |
31 | |
32 | class QTorusGeometryPrivate : public Qt3DCore::QGeometryPrivate |
33 | { |
34 | public: |
35 | QTorusGeometryPrivate(); |
36 | void init(); |
37 | |
38 | int m_rings; |
39 | int m_slices; |
40 | float m_radius; |
41 | float m_minorRadius; |
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(QTorusGeometry) |
51 | |
52 | QByteArray generateVertexData() const; |
53 | QByteArray generateIndexData() const; |
54 | }; |
55 | |
56 | } // Qt3DExtras |
57 | |
58 | |
59 | QT_END_NAMESPACE |
60 | |
61 | #endif // QT3DEXTRAS_QTORUSGEOMETRY_P_H |
62 | |
63 |
Definitions
Learn Advanced QML with KDAB
Find out more