summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/abstract3drenderer_p.h
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-06-19 09:54:03 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-06-26 10:43:30 +0300
commitec195a34594dea6145af5e8f2fedc2f9401d0f14 (patch)
tree407a1553a16461bd495c25a0b75af5289bd44210 /src/datavisualization/engine/abstract3drenderer_p.h
parent03baf7bc0b3bf07625e1111fe50c5262047ee302 (diff)
Polar graph support, phase one
- Polar property for toggling the polar mode - Example added. Example docs will be added in another patch once all of the functionality the example needs has been implemented. - Only surface graph supports polar so far. Scatter to be added later. Change-Id: I54d36f764ac1771ac88f73a5f3a2142f2309f6e8 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'src/datavisualization/engine/abstract3drenderer_p.h')
-rw-r--r--src/datavisualization/engine/abstract3drenderer_p.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/datavisualization/engine/abstract3drenderer_p.h b/src/datavisualization/engine/abstract3drenderer_p.h
index 325ac8e6..33337441 100644
--- a/src/datavisualization/engine/abstract3drenderer_p.h
+++ b/src/datavisualization/engine/abstract3drenderer_p.h
@@ -125,6 +125,7 @@ public:
virtual void updateCustomItem(CustomRenderItem *renderItem);
virtual void updateAspectRatio(float ratio);
+ virtual void updatePolar(bool enable);
virtual QVector3D convertPositionToTranslation(const QVector3D &position,
bool isAbsolute) = 0;
@@ -155,6 +156,7 @@ public:
GLuint depthTexture, GLfloat shadowQuality);
#endif
QVector4D indexToSelectionColor(GLint index);
+ void calculatePolarXZ(const QVector3D &dataPos, float &x, float &z) const;
signals:
void needRender(); // Emit this if something in renderer causes need for another render pass.
@@ -197,6 +199,11 @@ protected:
void loadGridLineMesh();
void loadLabelMesh();
+ void drawRadialGrid(ShaderHelper *shader, float yFloorLinePos,
+ const QMatrix4x4 &projectionViewMatrix, const QMatrix4x4 &depthMatrix);
+ void drawAngularGrid(ShaderHelper *shader, float yFloorLinePos,
+ const QMatrix4x4 &projectionViewMatrix, const QMatrix4x4 &depthMatrix);
+
bool m_hasNegativeValues;
Q3DTheme *m_cachedTheme;
Drawer *m_drawer;
@@ -211,6 +218,7 @@ protected:
AxisRenderCache m_axisCacheY;
AxisRenderCache m_axisCacheZ;
TextureHelper *m_textureHelper;
+ GLuint m_depthTexture;
Q3DScene *m_cachedScene;
bool m_selectionDirty;
@@ -244,6 +252,15 @@ protected:
ObjectHelper *m_labelObj; // Shared reference
float m_graphAspectRatio;
+ bool m_polarGraph;
+
+ QQuaternion m_xRightAngleRotation;
+ QQuaternion m_yRightAngleRotation;
+ QQuaternion m_zRightAngleRotation;
+ QQuaternion m_xRightAngleRotationNeg;
+ QQuaternion m_yRightAngleRotationNeg;
+ QQuaternion m_zRightAngleRotationNeg;
+ QQuaternion m_xFlipRotation;
private:
friend class Abstract3DController;