initial commit

This commit is contained in:
2026-03-25 19:46:15 +01:00
commit a513c66503
26 changed files with 2892 additions and 0 deletions

31
src/ui/ColorMap.h Normal file
View File

@@ -0,0 +1,31 @@
#pragma once
#include "core/Types.h"
#include <vector>
namespace baudline {
class ColorMap {
public:
explicit ColorMap(ColorMapType type = ColorMapType::Magma);
void setType(ColorMapType type);
ColorMapType type() const { return type_; }
// Map a normalized value [0,1] to RGB.
Color3 map(float value) const;
// Map dB value to RGB given current range.
Color3 mapDB(float dB, float minDB, float maxDB) const;
// Get the full 256-entry LUT.
const std::vector<Color3>& lut() const { return lut_; }
private:
void buildLUT();
ColorMapType type_;
std::vector<Color3> lut_; // 256 entries
};
} // namespace baudline