Chris@1071: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@1071: Chris@1071: /* Chris@1071: Sonic Visualiser Chris@1071: An audio file viewer and annotation editor. Chris@1071: Centre for Digital Music, Queen Mary, University of London. Chris@1071: This file copyright 2006-2016 Chris Cannam and QMUL. Chris@1071: Chris@1071: This program is free software; you can redistribute it and/or Chris@1071: modify it under the terms of the GNU General Public License as Chris@1071: published by the Free Software Foundation; either version 2 of the Chris@1071: License, or (at your option) any later version. See the file Chris@1071: COPYING included with this distribution for more information. Chris@1071: */ Chris@1071: Chris@1071: #include "Colour3DPlotRenderer.h" Chris@1074: #include "RenderTimer.h" Chris@1071: Chris@1075: #include "data/model/DenseThreeDimensionalModel.h" Chris@1075: #include "data/model/Dense3DModelPeakCache.h" Chris@1075: #include "data/model/FFTModel.h" Chris@1075: Chris@1075: #include "view/LayerGeometryProvider.h" Chris@1075: Chris@1073: Colour3DPlotRenderer::RenderResult Chris@1076: Colour3DPlotRenderer::render(QPainter &paint, QRect rect) Chris@1076: { Chris@1076: return render(paint, rect, false); Chris@1076: } Chris@1076: Chris@1076: Colour3DPlotRenderer::RenderResult Chris@1076: Colour3DPlotRenderer::renderTimeConstrained(QPainter &paint, QRect rect) Chris@1076: { Chris@1076: return render(paint, rect, true); Chris@1076: } Chris@1076: Chris@1076: Colour3DPlotRenderer::RenderResult Chris@1076: Colour3DPlotRenderer::render(QPainter &paint, QRect rect, bool timeConstrained) Chris@1073: { Chris@1075: LayerGeometryProvider *v = m_sources.geometryProvider; Chris@1075: if (!v) { Chris@1075: throw std::logic_error("no LayerGeometryProvider provided"); Chris@1075: } Chris@1075: Chris@1075: DenseThreeDimensionalModel *model = m_sources.source; Chris@1075: if (!model || !model->isOK() || !model->isReady()) { Chris@1075: throw std::logic_error("no source model provided, or model not ready"); Chris@1075: } Chris@1075: Chris@1075: sv_frame_t startFrame = v->getStartFrame(); Chris@1075: Chris@1075: Chris@1073: //!!! todo: timing/incomplete paint Chris@1073: Chris@1073: //!!! todo: peak frequency style Chris@1073: Chris@1073: //!!! todo: transparent style from Colour3DPlot Chris@1074: Chris@1074: //!!! todo: bin boundary alignment when in BinResolution Chris@1074: Chris@1074: return { rect, {} }; Chris@1073: } Chris@1073: