diff options
author | Keränen Pasi <pasi.keranen@digia.com> | 2013-08-19 12:06:37 +0300 |
---|---|---|
committer | Pasi Keränen <pasi.keranen@digia.com> | 2013-08-19 12:40:18 +0300 |
commit | 085a978a78af76a43d107d13a8b119423d37742b (patch) | |
tree | 8c8e8fa20370f307a1597005c70fe169a7cb8e10 /src/datavis3d/engine | |
parent | d39a1d885a170385074ace7617371e2b851cd3a6 (diff) |
Small renderer and controller cleanups.
Change-Id: Idf6a39feb1cc19e6d4e36db57ce3c5bef00a904e
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavis3d/engine')
-rw-r--r-- | src/datavis3d/engine/abstract3drenderer.cpp | 1 | ||||
-rw-r--r-- | src/datavis3d/engine/abstract3drenderer_p.h | 2 | ||||
-rw-r--r-- | src/datavis3d/engine/bars3dcontroller.cpp | 40 |
3 files changed, 14 insertions, 29 deletions
diff --git a/src/datavis3d/engine/abstract3drenderer.cpp b/src/datavis3d/engine/abstract3drenderer.cpp index bb3ea40d..14b5ef8c 100644 --- a/src/datavis3d/engine/abstract3drenderer.cpp +++ b/src/datavis3d/engine/abstract3drenderer.cpp @@ -26,7 +26,6 @@ QT_DATAVIS3D_BEGIN_NAMESPACE Abstract3DRenderer::Abstract3DRenderer(Abstract3DController *controller) : QObject(controller), m_controller(controller), - m_isInitialized(false), m_hasNegativeValues(false), m_cachedTheme(), m_cachedFont(QFont(QStringLiteral("Arial"))), diff --git a/src/datavis3d/engine/abstract3drenderer_p.h b/src/datavis3d/engine/abstract3drenderer_p.h index e1a46a3e..b881bcdd 100644 --- a/src/datavis3d/engine/abstract3drenderer_p.h +++ b/src/datavis3d/engine/abstract3drenderer_p.h @@ -49,7 +49,6 @@ class Abstract3DRenderer : public QObject, protected QOpenGLFunctions private: Abstract3DController *m_controller; - bool m_isInitialized; protected: bool m_hasNegativeValues; @@ -77,7 +76,6 @@ protected: public: ~Abstract3DRenderer(); - inline bool isInitialized() { return m_isInitialized; } void updateDataModel(QAbstractDataProxy *dataProxy); virtual void render(CameraHelper *camera, const GLuint defaultFboHandle); diff --git a/src/datavis3d/engine/bars3dcontroller.cpp b/src/datavis3d/engine/bars3dcontroller.cpp index 86ceff72..aca9a344 100644 --- a/src/datavis3d/engine/bars3dcontroller.cpp +++ b/src/datavis3d/engine/bars3dcontroller.cpp @@ -371,32 +371,20 @@ bool Bars3dController::isBarSpecRelative() void Bars3dController::setBarType(QDataVis::MeshStyle style, bool smooth) { QString objFile; - if (style == QDataVis::Bars) { - if (smooth) - objFile = QStringLiteral(":/defaultMeshes/barSmooth"); - else - objFile = QStringLiteral(":/defaultMeshes/bar"); - } else if (style == QDataVis::Pyramids) { - if (smooth) - objFile = QStringLiteral(":/defaultMeshes/pyramidSmooth"); - else - objFile = QStringLiteral(":/defaultMeshes/pyramid"); - } else if (style == QDataVis::Cones) { - if (smooth) - objFile = QStringLiteral(":/defaultMeshes/coneSmooth"); - else - objFile = QStringLiteral(":/defaultMeshes/cone"); - } else if (style == QDataVis::Cylinders) { - if (smooth) - objFile = QStringLiteral(":/defaultMeshes/cylinderSmooth"); - else - objFile = QStringLiteral(":/defaultMeshes/cylinder"); - } else if (style == QDataVis::BevelBars) { - if (smooth) - objFile = QStringLiteral(":/defaultMeshes/bevelbarSmooth"); - else - objFile = QStringLiteral(":/defaultMeshes/bevelbar"); - } + if (style == QDataVis::Bars) + objFile = QStringLiteral(":/defaultMeshes/bar"); + else if (style == QDataVis::Pyramids) + objFile = QStringLiteral(":/defaultMeshes/pyramid"); + else if (style == QDataVis::Cones) + objFile = QStringLiteral(":/defaultMeshes/cone"); + else if (style == QDataVis::Cylinders) + objFile = QStringLiteral(":/defaultMeshes/cylinder"); + else if (style == QDataVis::BevelBars) + objFile = QStringLiteral(":/defaultMeshes/bevelbar"); + + if (smooth) + objFile += QStringLiteral("Smooth"); + Abstract3DController::setMeshFileName(objFile); } |