1 | // Copyright (C) 2016 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 QtDataVisualization 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 SCATTERPOINTBUFFERHELPER_P_H |
15 | #define SCATTERPOINTBUFFERHELPER_P_H |
16 | |
17 | #include "datavisualizationglobal_p.h" |
18 | #include "abstractobjecthelper_p.h" |
19 | #include "scatterseriesrendercache_p.h" |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class ScatterPointBufferHelper : public AbstractObjectHelper |
24 | { |
25 | public: |
26 | ScatterPointBufferHelper(); |
27 | virtual ~ScatterPointBufferHelper(); |
28 | |
29 | GLuint pointBuf(); |
30 | |
31 | void pushPoint(uint pointIndex); |
32 | void popPoint(); |
33 | void load(ScatterSeriesRenderCache *cache); |
34 | void update(ScatterSeriesRenderCache *cache); |
35 | void setScaleY(float scale) { m_scaleY = scale; } |
36 | void updateUVs(ScatterSeriesRenderCache *cache); |
37 | |
38 | public: |
39 | GLuint m_pointbuffer; |
40 | |
41 | private: |
42 | void createRangeGradientUVs(ScatterSeriesRenderCache *cache, QList<QVector2D> &buffered_uvs); |
43 | |
44 | private: |
45 | QList<QVector3D> m_bufferedPoints; |
46 | int m_oldRemoveIndex; |
47 | float m_scaleY; |
48 | }; |
49 | |
50 | QT_END_NAMESPACE |
51 | |
52 | #endif |
53 |