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 QT3DRENDER_RENDER_GEOMETRY_H |
5 | #define QT3DRENDER_RENDER_GEOMETRY_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 <Qt3DRender/private/backendnode_p.h> |
19 | |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | namespace Qt3DRender { |
24 | |
25 | namespace Render { |
26 | |
27 | class Q_3DRENDERSHARED_PRIVATE_EXPORT Geometry : public BackendNode |
28 | { |
29 | public: |
30 | Geometry(); |
31 | ~Geometry(); |
32 | |
33 | void cleanup(); |
34 | |
35 | void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; |
36 | |
37 | inline QList<Qt3DCore::QNodeId> attributes() const { return m_attributes; } |
38 | inline bool isDirty() const { return m_geometryDirty; } |
39 | inline Qt3DCore::QNodeId boundingPositionAttribute() const { return m_boundingPositionAttribute; } |
40 | void unsetDirty(); |
41 | |
42 | inline QVector3D min() const { return m_min; } |
43 | inline QVector3D max() const { return m_max; } |
44 | |
45 | void updateExtent(const QVector3D &min, const QVector3D &max); |
46 | |
47 | private: |
48 | QList<Qt3DCore::QNodeId> m_attributes; |
49 | bool m_geometryDirty; |
50 | Qt3DCore::QNodeId m_boundingPositionAttribute; |
51 | QVector3D m_min; |
52 | QVector3D m_max; |
53 | }; |
54 | |
55 | } // namespace Render |
56 | |
57 | } // namespace Qt3DRender |
58 | |
59 | QT_END_NAMESPACE |
60 | |
61 | #endif // QT3DRENDER_RENDER_GEOMETRY_H |
62 | |