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_QCUBOIDGEOMETRY_P_H
5#define QT3DEXTRAS_QCUBOIDGEOMETRY_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 <QtCore/QSize>
19
20#include <Qt3DCore/private/qgeometry_p.h>
21#include <Qt3DExtras/qcuboidgeometry.h>
22
23QT_BEGIN_NAMESPACE
24
25namespace Qt3DCore {
26
27class QAttribute;
28class QBuffer;
29
30} // Qt3DCore
31
32namespace Qt3DExtras {
33
34class QCuboidGeometryPrivate : public Qt3DCore::QGeometryPrivate
35{
36public:
37 QCuboidGeometryPrivate();
38 void init();
39
40 // Dimensions
41 float m_xExtent;
42 float m_yExtent;
43 float m_zExtent;
44
45 // Resolutions of faces with normal x, y, and z
46 QSize m_yzFaceResolution;
47 QSize m_xzFaceResolution;
48 QSize m_xyFaceResolution;
49
50 Qt3DCore::QAttribute *m_positionAttribute;
51 Qt3DCore::QAttribute *m_normalAttribute;
52 Qt3DCore::QAttribute *m_texCoordAttribute;
53 Qt3DCore::QAttribute *m_tangentAttribute;
54 Qt3DCore::QAttribute *m_indexAttribute;
55 Qt3DCore::QBuffer *m_vertexBuffer;
56 Qt3DCore::QBuffer *m_indexBuffer;
57
58 Q_DECLARE_PUBLIC(QCuboidGeometry)
59
60 QByteArray generateVertexData() const;
61 QByteArray generateIndexData() const;
62};
63
64} // Qt3DExtras
65
66QT_END_NAMESPACE
67
68#endif // QT3DEXTRAS_QCUBOIDGEOMETRY_P_H
69
70

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