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 SCATTEROBJECTBUFFERHELPER_P_H
15#define SCATTEROBJECTBUFFERHELPER_P_H
16
17#include "datavisualizationglobal_p.h"
18#include "abstractobjecthelper_p.h"
19#include "scatterseriesrendercache_p.h"
20
21QT_BEGIN_NAMESPACE
22
23class ScatterObjectBufferHelper : public AbstractObjectHelper
24{
25public:
26 ScatterObjectBufferHelper();
27 virtual ~ScatterObjectBufferHelper();
28
29 void fullLoad(ScatterSeriesRenderCache *cache, qreal dotScale);
30 void update(ScatterSeriesRenderCache *cache, qreal dotScale);
31 void updateUVs(ScatterSeriesRenderCache *cache);
32 void setScaleY(float scale) { m_scaleY = scale; }
33
34private:
35 uint createRangeGradientUVs(ScatterSeriesRenderCache *cache, QList<QVector2D> &buffered_uvs);
36 uint createObjectGradientUVs(ScatterSeriesRenderCache *cache, QList<QVector2D> &buffered_uvs,
37 const QList<QVector3D> &indexed_vertices);
38
39 float m_scaleY;
40 static const GLfloat itemScaler;
41};
42
43QT_END_NAMESPACE
44
45#endif
46

source code of qtdatavis3d/src/datavisualization/utils/scatterobjectbufferhelper_p.h