comparison layer/Colour3DPlotRenderer.h @ 1103:d84a0033b305 spectrogram-minor-refactor

Turn BinDisplay and BinScale into enum classes
author Chris Cannam
date Thu, 14 Jul 2016 15:13:37 +0100
parents 102f986ec032
children 46cc4644206d
comparison
equal deleted inserted replaced
1102:36a981a0fa31 1103:d84a0033b305
30 class VerticalBinLayer; 30 class VerticalBinLayer;
31 class DenseThreeDimensionalModel; 31 class DenseThreeDimensionalModel;
32 class Dense3DModelPeakCache; 32 class Dense3DModelPeakCache;
33 class FFTModel; 33 class FFTModel;
34 34
35 enum class BinDisplay {
36 AllBins,
37 PeakBins,
38 PeakFrequencies
39 };
40
41 enum class BinScale {
42 Linear,
43 Log
44 };
45
35 class Colour3DPlotRenderer 46 class Colour3DPlotRenderer
36 { 47 {
37 public: 48 public:
38 enum BinDisplay {
39 AllBins,
40 PeakBins,
41 PeakFrequencies
42 };
43
44 enum BinScale {
45 LinearBinScale,
46 LogBinScale
47 };
48
49 struct Sources { 49 struct Sources {
50 Sources() : verticalBinLayer(0), source(0), peaks(0), fft(0) { } 50 Sources() : verticalBinLayer(0), source(0), peaks(0), fft(0) { }
51 51
52 // These must all outlive this class 52 // These must all outlive this class
53 const VerticalBinLayer *verticalBinLayer; // always 53 const VerticalBinLayer *verticalBinLayer; // always
58 58
59 struct Parameters { 59 struct Parameters {
60 Parameters() : 60 Parameters() :
61 colourScale(ColourScale::Parameters()), 61 colourScale(ColourScale::Parameters()),
62 normalization(ColumnOp::NoNormalization), 62 normalization(ColumnOp::NoNormalization),
63 binDisplay(AllBins), 63 binDisplay(BinDisplay::AllBins),
64 binScale(LinearBinScale), 64 binScale(BinScale::Linear),
65 alwaysOpaque(false), 65 alwaysOpaque(false),
66 interpolate(false), //!!! separate out x-interpolate and y-interpolate? the spectrogram actually does (or used to) 66 interpolate(false), //!!! separate out x-interpolate and y-interpolate? the spectrogram actually does (or used to)
67 invertVertical(false) { } 67 invertVertical(false) { }
68 68
69 ColourScale colourScale; // complete ColourScale object by value 69 ColourScale colourScale; // complete ColourScale object by value