| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QTDATAVIS3D_QSURFACEDATAITEM_H |
| 5 | #define QTDATAVIS3D_QSURFACEDATAITEM_H |
| 6 | |
| 7 | #include <QtDataVisualization/qdatavisualizationglobal.h> |
| 8 | #include <QtGui/QVector3D> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | class QSurfaceDataItemPrivate; |
| 13 | |
| 14 | class Q_DATAVISUALIZATION_EXPORT QSurfaceDataItem |
| 15 | { |
| 16 | public: |
| 17 | QSurfaceDataItem(); |
| 18 | QSurfaceDataItem(const QVector3D &position); |
| 19 | QSurfaceDataItem(const QSurfaceDataItem &other); |
| 20 | ~QSurfaceDataItem(); |
| 21 | |
| 22 | QSurfaceDataItem &operator=(const QSurfaceDataItem &other); |
| 23 | |
| 24 | inline void setPosition(const QVector3D &pos) { m_position = pos; } |
| 25 | inline QVector3D position() const { return m_position; } |
| 26 | inline void setX(float value) { m_position.setX(value); } |
| 27 | inline void setY(float value) { m_position.setY(value); } |
| 28 | inline void setZ(float value) { m_position.setZ(value); } |
| 29 | inline float x() const { return m_position.x(); } |
| 30 | inline float y() const { return m_position.y(); } |
| 31 | inline float z() const { return m_position.z(); } |
| 32 | |
| 33 | protected: |
| 34 | void createExtraData(); |
| 35 | |
| 36 | QSurfaceDataItemPrivate *d_ptr; |
| 37 | |
| 38 | private: |
| 39 | QVector3D m_position; |
| 40 | }; |
| 41 | |
| 42 | QT_END_NAMESPACE |
| 43 | |
| 44 | #endif |
| 45 |
