summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/surface3drenderer_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/datavisualization/engine/surface3drenderer_p.h')
-rw-r--r--src/datavisualization/engine/surface3drenderer_p.h44
1 files changed, 15 insertions, 29 deletions
diff --git a/src/datavisualization/engine/surface3drenderer_p.h b/src/datavisualization/engine/surface3drenderer_p.h
index 2c55d902..efa8ff7e 100644
--- a/src/datavisualization/engine/surface3drenderer_p.h
+++ b/src/datavisualization/engine/surface3drenderer_p.h
@@ -32,17 +32,12 @@
#include "datavisualizationglobal_p.h"
#include "surface3dcontroller_p.h"
#include "abstract3drenderer_p.h"
-#include "scatterrenderitem_p.h"
-#include "qsurfacedataproxy.h"
#include "surfaceseriesrendercache_p.h"
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
class ShaderHelper;
-class ObjectHelper;
-class SurfaceObject;
class Q3DScene;
-class SelectionPointer;
class QT_DATAVISUALIZATION_EXPORT Surface3DRenderer : public Abstract3DRenderer
{
@@ -67,15 +62,6 @@ private:
GLfloat m_scaleZ;
GLfloat m_scaleXWithBackground;
GLfloat m_scaleZWithBackground;
- GLfloat m_minVisibleColumnValue;
- GLfloat m_maxVisibleColumnValue;
- GLfloat m_minVisibleRowValue;
- GLfloat m_maxVisibleRowValue;
- GLfloat m_visibleColumnRange;
- GLfloat m_visibleRowRange;
- ObjectHelper *m_backgroundObj;
- ObjectHelper *m_gridLineObj;
- ObjectHelper *m_labelObj;
GLuint m_depthTexture;
GLuint m_depthModelTexture;
GLuint m_depthFrameBuffer;
@@ -85,17 +71,13 @@ private:
GLfloat m_shadowQualityToShader;
bool m_flatSupported;
bool m_selectionActive;
- bool m_xFlipped;
- bool m_zFlipped;
- bool m_yFlipped;
AbstractRenderItem m_dummyRenderItem;
GLint m_shadowQualityMultiplier;
QSizeF m_areaSize;
bool m_hasHeightAdjustmentChanged;
QPoint m_selectedPoint;
- const QSurface3DSeries *m_selectedSeries;
+ QSurface3DSeries *m_selectedSeries;
QPoint m_clickedPosition;
- QHash<QSurface3DSeries *, SurfaceSeriesRenderCache *> m_renderCacheList;
bool m_selectionTexturesDirty;
GLuint m_noShadowTexture;
@@ -104,19 +86,19 @@ public:
~Surface3DRenderer();
void updateData();
- void updateSeries(const QList<QAbstract3DSeries *> &seriesList, bool updateVisibility);
+ void updateSeries(const QList<QAbstract3DSeries *> &seriesList);
+ SeriesRenderCache *createNewCache(QAbstract3DSeries *series);
+ void cleanCache(SeriesRenderCache *cache);
void updateSelectionMode(QAbstract3DGraph::SelectionFlags mode);
- void modifiedSeriesList(const QVector<QSurface3DSeries *> &seriesList);
void updateRows(const QVector<Surface3DController::ChangeRow> &rows);
- void updateItem(const QVector<Surface3DController::ChangeItem> &points);
- void updateAxisRange(QAbstract3DAxis::AxisOrientation orientation, float min, float max);
+ void updateItems(const QVector<Surface3DController::ChangeItem> &points);
void updateScene(Q3DScene *scene);
void updateSlicingActive(bool isSlicing);
- void updateSelectedPoint(const QPoint &position, const QSurface3DSeries *series);
+ void updateSelectedPoint(const QPoint &position, QSurface3DSeries *series);
inline QPoint clickedPosition() const { return m_clickedPosition; }
void resetClickedStatus();
+ QVector3D convertPositionToTranslation(const QVector3D &position, bool isAbsolute);
- void drawSlicedScene();
void render(GLuint defaultFboHandle = 0);
protected:
@@ -136,11 +118,14 @@ private:
void updateShadowQuality(QAbstract3DGraph::ShadowQuality quality);
void updateTextures();
void initShaders(const QString &vertexShader, const QString &fragmentShader);
- QRect calculateSampleRect(SurfaceSeriesRenderCache *cache, const QSurfaceDataArray &array);
+ QRect calculateSampleRect(const QSurfaceDataArray &array);
void loadBackgroundMesh();
- void loadGridLineMesh();
- void loadLabelMesh();
+
+ void drawSlicedScene();
void drawScene(GLuint defaultFboHandle);
+ void drawLabels(bool drawSelection, const Q3DCamera *activeCamera,
+ const QMatrix4x4 &viewMatrix, const QMatrix4x4 &projectionMatrix);
+
void calculateSceneScalingFactors();
void initBackgroundShaders(const QString &vertexShader, const QString &fragmentShader);
void initLabelShaders(const QString &vertexShader, const QString &fragmentShader);
@@ -155,13 +140,14 @@ private:
void surfacePointSelected(const QPoint &point);
void updateSelectionPoint(SurfaceSeriesRenderCache *cache, const QPoint &point, bool label);
QPoint selectionIdToSurfacePoint(uint id);
- QString createSelectionLabel(SurfaceSeriesRenderCache *cache, float value, int column, int row);
#if !defined(QT_OPENGL_ES_2)
void updateDepthBuffer();
#endif
void emitSelectedPointChanged(QPoint position);
Q_DISABLE_COPY(Surface3DRenderer)
+
+ friend class SurfaceObject;
};
QT_END_NAMESPACE_DATAVISUALIZATION