1 | // Copyright (C) 2014 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_CUBOIDMESH_H |
5 | #define |
6 | |
7 | #include <Qt3DExtras/qt3dextras_global.h> |
8 | #include <Qt3DRender/qgeometryrenderer.h> |
9 | #include <QtCore/QSize> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | namespace Qt3DExtras { |
14 | |
15 | class Q_3DEXTRASSHARED_EXPORT : public Qt3DRender::QGeometryRenderer |
16 | { |
17 | Q_OBJECT |
18 | |
19 | Q_PROPERTY(float xExtent READ xExtent WRITE setXExtent NOTIFY xExtentChanged) |
20 | Q_PROPERTY(float yExtent READ yExtent WRITE setYExtent NOTIFY yExtentChanged) |
21 | Q_PROPERTY(float zExtent READ zExtent WRITE setZExtent NOTIFY zExtentChanged) |
22 | Q_PROPERTY(QSize yzMeshResolution READ yzMeshResolution WRITE setYZMeshResolution NOTIFY yzMeshResolutionChanged) |
23 | Q_PROPERTY(QSize xzMeshResolution READ xzMeshResolution WRITE setXZMeshResolution NOTIFY xzMeshResolutionChanged) |
24 | Q_PROPERTY(QSize xyMeshResolution READ xyMeshResolution WRITE setXYMeshResolution NOTIFY xyMeshResolutionChanged) |
25 | |
26 | public: |
27 | explicit (Qt3DCore::QNode *parent = nullptr); |
28 | (); |
29 | |
30 | float () const; |
31 | float () const; |
32 | float () const; |
33 | QSize () const; |
34 | QSize () const; |
35 | QSize () const; |
36 | |
37 | public Q_SLOTS: |
38 | void (float xExtent); |
39 | void (float yExtent); |
40 | void (float zExtent); |
41 | void (const QSize &resolution); |
42 | void (const QSize &resolution); |
43 | void (const QSize &resolution); |
44 | |
45 | Q_SIGNALS: |
46 | void (float xExtent); |
47 | void (float yExtent); |
48 | void (float zExtent); |
49 | |
50 | void (const QSize &yzMeshResolution); |
51 | void (const QSize &xzMeshResolution); |
52 | void (const QSize &xyMeshResolution); |
53 | |
54 | private: |
55 | // As this is a default provided geometry renderer, no one should be able |
56 | // to modify the QGeometryRenderer's properties |
57 | |
58 | void (int instanceCount); |
59 | void (int vertexCount); |
60 | void (int indexOffset); |
61 | void (int firstInstance); |
62 | void (int index); |
63 | void (bool enabled); |
64 | void (Qt3DCore::QGeometry *geometry); |
65 | void (PrimitiveType primitiveType); |
66 | }; |
67 | |
68 | } // namespace Qt3DExtras |
69 | |
70 | QT_END_NAMESPACE |
71 | |
72 | #endif // QT3DEXTRAS_CUBOIDMESH_H |
73 | |