1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QSURFACEDATAITEM_H
5#define QSURFACEDATAITEM_H
6
7#include <QtDataVisualization/qdatavisualizationglobal.h>
8#include <QtGui/QVector3D>
9
10QT_BEGIN_NAMESPACE
11
12class QSurfaceDataItemPrivate;
13
14class Q_DATAVISUALIZATION_EXPORT QSurfaceDataItem
15{
16public:
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
33protected:
34 void createExtraData();
35
36 QSurfaceDataItemPrivate *d_ptr;
37
38private:
39 QVector3D m_position;
40};
41
42QT_END_NAMESPACE
43
44#endif
45

source code of qtdatavis3d/src/datavisualization/data/qsurfacedataitem.h