Mercurial > hg > svgui
comparison layer/Colour3DPlotRenderer.h @ 1266:a34a2a25907c
Untabify
| author | Chris Cannam |
|---|---|
| date | Thu, 01 Mar 2018 18:02:22 +0000 |
| parents | fc40742bb911 |
| children | 7d28e7522dbd |
comparison
equal
deleted
inserted
replaced
| 1265:6e724c81f18f | 1266:a34a2a25907c |
|---|---|
| 51 struct Sources { | 51 struct Sources { |
| 52 Sources() : verticalBinLayer(0), source(0), fft(0) { } | 52 Sources() : verticalBinLayer(0), source(0), fft(0) { } |
| 53 | 53 |
| 54 // These must all outlive this class | 54 // These must all outlive this class |
| 55 const VerticalBinLayer *verticalBinLayer; // always | 55 const VerticalBinLayer *verticalBinLayer; // always |
| 56 const DenseThreeDimensionalModel *source; // always | 56 const DenseThreeDimensionalModel *source; // always |
| 57 const FFTModel *fft; // optionally | 57 const FFTModel *fft; // optionally |
| 58 std::vector<Dense3DModelPeakCache *> peakCaches; // zero or more | 58 std::vector<Dense3DModelPeakCache *> peakCaches; // zero or more |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 struct Parameters { | 61 struct Parameters { |
| 62 Parameters() : | 62 Parameters() : |
| 63 colourScale(ColourScale::Parameters()), | 63 colourScale(ColourScale::Parameters()), |
| 64 normalization(ColumnNormalization::None), | 64 normalization(ColumnNormalization::None), |
| 65 binDisplay(BinDisplay::AllBins), | 65 binDisplay(BinDisplay::AllBins), |
| 66 binScale(BinScale::Linear), | 66 binScale(BinScale::Linear), |
| 67 alwaysOpaque(false), | 67 alwaysOpaque(false), |
| 68 interpolate(false), | 68 interpolate(false), |
| 69 invertVertical(false), | 69 invertVertical(false), |
| 70 scaleFactor(1.0), | 70 scaleFactor(1.0), |
| 71 colourRotation(0) { } | 71 colourRotation(0) { } |
| 72 | 72 |
| 73 /** A complete ColourScale object by value, used for colour | 73 /** A complete ColourScale object by value, used for colour |
| 74 * map conversion. Note that the final display gain setting is | 74 * map conversion. Note that the final display gain setting is |
| 75 * also encapsulated here. */ | 75 * also encapsulated here. */ |
| 76 ColourScale colourScale; | 76 ColourScale colourScale; |
| 77 | 77 |
| 78 /** Type of column normalization. */ | 78 /** Type of column normalization. */ |
| 79 ColumnNormalization normalization; | 79 ColumnNormalization normalization; |
| 80 | 80 |
| 81 /** Selection of bins to display. */ | 81 /** Selection of bins to display. */ |
| 82 BinDisplay binDisplay; | 82 BinDisplay binDisplay; |
| 83 | 83 |
| 84 /** Scale for vertical bin spacing (linear or logarithmic). */ | 84 /** Scale for vertical bin spacing (linear or logarithmic). */ |
| 85 BinScale binScale; | 85 BinScale binScale; |
| 86 | 86 |
| 87 /** Whether cells should always be opaque. If false, then | 87 /** Whether cells should always be opaque. If false, then |
| 88 * large cells (when zoomed in a long way) will be rendered | 88 * large cells (when zoomed in a long way) will be rendered |
| 89 * translucent in order not to obscure anything in a layer | 89 * translucent in order not to obscure anything in a layer |
| 90 * beneath. */ | 90 * beneath. */ |
| 91 bool alwaysOpaque; | 91 bool alwaysOpaque; |
| 92 | 92 |
| 93 /** Whether to apply smoothing when rendering cells at more | 93 /** Whether to apply smoothing when rendering cells at more |
| 94 * than one pixel per cell. !!! todo: decide about separating | 94 * than one pixel per cell. !!! todo: decide about separating |
| 95 * out x-interpolate and y-interpolate as the spectrogram | 95 * out x-interpolate and y-interpolate as the spectrogram |
| 96 * actually does (or used to) | 96 * actually does (or used to) |
| 97 */ | 97 */ |
| 98 bool interpolate; | 98 bool interpolate; |
| 99 | 99 |
| 100 /** Whether to render the whole caboodle upside-down. */ | 100 /** Whether to render the whole caboodle upside-down. */ |
| 101 bool invertVertical; | 101 bool invertVertical; |
| 102 | 102 |
| 103 /** Initial scale factor (e.g. for FFT scaling). This factor | 103 /** Initial scale factor (e.g. for FFT scaling). This factor |
| 104 * is applied to all values read from the underlying model | 104 * is applied to all values read from the underlying model |
| 105 * *before* magnitude ranges are calculated, in contrast to | 105 * *before* magnitude ranges are calculated, in contrast to |
| 106 * the display gain found in the ColourScale parameter. */ | 106 * the display gain found in the ColourScale parameter. */ |
| 110 int colourRotation; | 110 int colourRotation; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 Colour3DPlotRenderer(Sources sources, Parameters parameters) : | 113 Colour3DPlotRenderer(Sources sources, Parameters parameters) : |
| 114 m_sources(sources), | 114 m_sources(sources), |
| 115 m_params(parameters), | 115 m_params(parameters), |
| 116 m_secondsPerXPixel(0.0), | 116 m_secondsPerXPixel(0.0), |
| 117 m_secondsPerXPixelValid(false) | 117 m_secondsPerXPixelValid(false) |
| 118 { } | 118 { } |
| 119 | 119 |
| 120 struct RenderResult { | 120 struct RenderResult { |
