1 | // Copyright (C) 2023 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | // |
5 | // W A R N I N G |
6 | // ------------- |
7 | // |
8 | // This file is not part of the QtGraphs API. It exists purely as an |
9 | // implementation detail. This header file may change from version to |
10 | // version without notice, or even be removed. |
11 | // |
12 | // We mean it. |
13 | |
14 | #ifndef QCUSTOM3DITEM_P_H |
15 | #define QCUSTOM3DITEM_P_H |
16 | |
17 | #include "qcustom3ditem.h" |
18 | |
19 | QT_BEGIN_NAMESPACE |
20 | |
21 | struct QCustomItemDirtyBitField { |
22 | bool textureDirty : 1; |
23 | bool meshDirty : 1; |
24 | bool positionDirty : 1; |
25 | bool scalingDirty : 1; |
26 | bool rotationDirty : 1; |
27 | bool visibleDirty : 1; |
28 | bool shadowCastingDirty : 1; |
29 | |
30 | QCustomItemDirtyBitField() |
31 | : textureDirty(false), |
32 | meshDirty(false), |
33 | positionDirty(false), |
34 | scalingDirty(false), |
35 | rotationDirty(false), |
36 | visibleDirty(false), |
37 | shadowCastingDirty(false) |
38 | { |
39 | } |
40 | }; |
41 | |
42 | class QCustom3DItemPrivate |
43 | { |
44 | Q_DECLARE_PUBLIC(QCustom3DItem) |
45 | |
46 | public: |
47 | QCustom3DItemPrivate(QCustom3DItem *q); |
48 | QCustom3DItemPrivate(QCustom3DItem *q, const QString &meshFile, const QVector3D &position, |
49 | const QVector3D &scaling, const QQuaternion &rotation); |
50 | virtual ~QCustom3DItemPrivate(); |
51 | |
52 | QImage textureImage(); |
53 | void clearTextureImage(); |
54 | void resetDirtyBits(); |
55 | |
56 | public: |
57 | QImage m_textureImage; |
58 | QString m_textureFile; |
59 | QString m_meshFile; |
60 | QVector3D m_position; |
61 | bool m_positionAbsolute; |
62 | QVector3D m_scaling; |
63 | bool m_scalingAbsolute; |
64 | QQuaternion m_rotation; |
65 | bool m_visible; |
66 | bool m_shadowCasting; |
67 | |
68 | bool m_isLabelItem; |
69 | bool m_isVolumeItem; |
70 | |
71 | QCustomItemDirtyBitField m_dirtyBits; |
72 | |
73 | protected: |
74 | QCustom3DItem *q_ptr; |
75 | |
76 | private: |
77 | QCustom3DItemPrivate(QCustom3DItemPrivate *d); |
78 | }; |
79 | |
80 | QT_END_NAMESPACE |
81 | |
82 | #endif |
83 | |