#pragma once #include #include #include "model/Field.hpp" #include "model/ColorScale.hpp" #include "model/Anomaly.hpp" namespace geopro::render { struct BandPolygon { geopro::core::Rgba color; std::vector ring; // 单环多边形(局部坐标,y=高程向上为正) }; struct ContourLine { double level = std::numeric_limits::quiet_NaN(); // NaN=未解析(与真实 level 0 区分) std::vector pts; }; struct ContourBandsResult { std::vector bands; std::vector lines; }; struct ContourOptions { int upsample = 2; // 双线性上采样倍数(1=不采样) double smooth = 0.3; // 平滑强度 0..1(0=不平滑) bool makeLines = true; }; // core::Grid(NaN=无效)+ ColorScale 分段 → 色带多边形 + 等值线几何。 // VTK 仅作算法(vtkBandedPolyDataContourFilter),无 render window。 ContourBandsResult buildContourBands(const geopro::core::Grid& g, const geopro::core::ColorScale& cs, const ContourOptions& opt = {}); } // namespace geopro::render