1// Copyright (C) 2023 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 <QtGraphs/qgraphsglobal.h>
8#include <QtGui/QVector3D>
9
10QT_BEGIN_NAMESPACE
11
12class QSurfaceDataItemPrivate;
13
14class Q_GRAPHS_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 constexpr inline void setPosition(const QVector3D &pos) noexcept { m_position = pos; }
25 constexpr inline QVector3D position() const noexcept { return m_position; }
26 constexpr inline void setX(float value) noexcept { m_position.setX(value); }
27 constexpr inline void setY(float value) noexcept { m_position.setY(value); }
28 constexpr inline void setZ(float value) noexcept { m_position.setZ(value); }
29 constexpr inline float x() const noexcept { return m_position.x(); }
30 constexpr inline float y() const noexcept { return m_position.y(); }
31 constexpr inline float z() const noexcept { 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 qtgraphs/src/graphs/data/qsurfacedataitem.h