summaryrefslogtreecommitdiffstats
path: root/src/render/geometry/qcuboidgeometry_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire350@gmail.com>2015-08-30 19:18:24 +0200
committerPaul Lemire <paul.lemire@kdab.com>2015-10-15 06:32:14 +0000
commit2ae331ec73718558f2544c87d80b5560a8ec5c8e (patch)
tree30a8e9c47d2c8c32915eaa22a77387e26bb78ea4 /src/render/geometry/qcuboidgeometry_p.h
parentccf83e32dd251cdebc2300e8416925fd75eb36a7 (diff)
QCuboidGeometry refactored into a public class
Change-Id: I25e1647ecf45e2d4e5133b9c1f080e11605cc1ba Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/geometry/qcuboidgeometry_p.h')
-rw-r--r--src/render/geometry/qcuboidgeometry_p.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/src/render/geometry/qcuboidgeometry_p.h b/src/render/geometry/qcuboidgeometry_p.h
new file mode 100644
index 000000000..80fed6780
--- /dev/null
+++ b/src/render/geometry/qcuboidgeometry_p.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3DRENDER_QCUBOIDGEOMETRY_P_H
+#define QT3DRENDER_QCUBOIDGEOMETRY_P_H
+
+#include <Qt3DRenderer/private/qgeometry_p.h>
+#include <QSize>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DRender {
+
+class QAttribute;
+class QBuffer;
+
+class QCuboidGeometryPrivate : public QGeometryPrivate
+{
+public:
+ QCuboidGeometryPrivate();
+ void init();
+
+ // Dimensions
+ float m_xExtent;
+ float m_yExtent;
+ float m_zExtent;
+
+ // Resolutions of faces with normal x, y, and z
+ QSize m_yzFaceResolution;
+ QSize m_xzFaceResolution;
+ QSize m_xyFaceResolution;
+
+ QAttribute *m_positionAttribute;
+ QAttribute *m_normalAttribute;
+ QAttribute *m_texCoordAttribute;
+ QAttribute *m_tangentAttribute;
+ QAttribute *m_indexAttribute;
+ QBuffer *m_vertexBuffer;
+ QBuffer *m_indexBuffer;
+
+ Q_DECLARE_PUBLIC(QCuboidGeometry)
+};
+
+} // Qt3DRender
+
+QT_END_NAMESPACE
+
+#endif // QT3DRENDER_QCUBOIDGEOMETRY_P_H
+