From 085a978a78af76a43d107d13a8b119423d37742b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kera=CC=88nen=20Pasi?= Date: Mon, 19 Aug 2013 12:06:37 +0300 Subject: Small renderer and controller cleanups. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idf6a39feb1cc19e6d4e36db57ce3c5bef00a904e Reviewed-by: Tomi Korpipää --- src/datavis3d/engine/bars3dcontroller.cpp | 40 +++++++++++-------------------- 1 file changed, 14 insertions(+), 26 deletions(-) (limited to 'src/datavis3d/engine/bars3dcontroller.cpp') 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); } -- cgit v1.2.3