comparison layer/Colour3DPlotRenderer.h @ 1071:65b183494331 spectrogram-minor-refactor

Start stubbing Colour3DPlotRenderer
author Chris Cannam
date Thu, 23 Jun 2016 17:07:21 +0100
parents
children 76b50b48e1e4
comparison
equal deleted inserted replaced
1070:27163db978d8 1071:65b183494331
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 Sonic Visualiser
5 An audio file viewer and annotation editor.
6 Centre for Digital Music, Queen Mary, University of London.
7 This file copyright 2006-2016 Chris Cannam and QMUL.
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information.
14 */
15
16 #ifndef COLOUR_3D_PLOT_RENDERER_H
17 #define COLOUR_3D_PLOT_RENDERER_H
18
19 #include "ColourScale.h"
20
21 #include "base/ColumnOp.h"
22
23 class DenseThreeDimensionalModel;
24 class Dense3DModelPeakCache;
25 class FFTModel;
26
27 class Colour3DPlotRenderer
28 {
29 public:
30 enum BinDisplay {
31 AllBins,
32 PeakBins,
33 PeakFrequencies
34 };
35
36 enum BinScale {
37 LinearBinScale,
38 LogBinScale
39 };
40
41 struct Parameters {
42
43 Parameters() :
44 source(0), peaks(0), fft(0),
45 colourScale(ColourScale::Parameters()),
46 normalization(ColumnOp::NoNormalization),
47 binDisplay(AllBins), binScale(LinearBinScale),
48 alwaysOpaque(false), interpolate(false), invertVertical(false) { }
49
50 DenseThreeDimensionalModel *source; // always
51 Dense3DModelPeakCache *peaks; // optionally
52 FFTModel *fft; // optionally
53
54 ColourScale colourScale; // complete ColourScale object by value
55 ColumnOp::Normalization normalization;
56 BinDisplay binDisplay;
57 BinScale binScale;
58 bool alwaysOpaque;
59 bool interpolate;
60 bool invertVertical;
61 };
62
63 Colour3DPlotRenderer(Parameters parameters) :
64 m_params(parameters)
65 { }
66
67 private:
68 Parameters m_params;
69 };
70
71 #endif
72