实时分块控制

This commit is contained in:
2026-08-26 21:32:17 +08:00
parent ef9e36c4b9
commit c50afae9c5
24 changed files with 621 additions and 203 deletions
+7 -9
View File
@@ -60,10 +60,8 @@ TEST(plottable_migration, curve_plots_share_partitioned_rendering) {
frequency->set<&Numeric_Axis::Prop::coordinate_range>(Axis_Range{0.0, 100.0});
power->set<&Numeric_Axis::Prop::coordinate_range>(Axis_Range{-100.0, 0.0});
value->set<&Numeric_Axis::Prop::coordinate_range>(Axis_Range{0.0, 100.0});
auto trace = build_object<Trace>(time.get(), value.get());
auto sweep = build_object<Sweep>(frequency.get(), power.get());
trace->set<&Frequency_Trace::Prop::partition_mode>(Plot_Partition_Mode::fixed);
trace->set<&Frequency_Trace::Prop::partition_count>(2u);
auto trace = build_object<Trace>(time.get(), value.get(), 2u);
auto sweep = build_object<Sweep>(frequency.get(), power.get(), 2u);
trace->submit_stream<Frequency_Trace_Stream_Tag>(
Frequency_Trace_Sample{time->append_time({1'000}), 10.0});
trace->submit_stream<Frequency_Trace_Stream_Tag>(
@@ -73,8 +71,6 @@ TEST(plottable_migration, curve_plots_share_partitioned_rendering) {
trace->mark_dirty<Prepare_Data_Tag>();
sweep->set<&Sweep_Spectrum::Prop::frequency_range>(Axis_Range{0.0, 100.0});
sweep->set<&Sweep_Spectrum::Prop::block_count>(2u);
sweep->set<&Sweep_Spectrum::Prop::partition_mode>(Plot_Partition_Mode::fixed);
sweep->set<&Sweep_Spectrum::Prop::partition_count>(2u);
const std::array<Plot_Value, 4> first_block{-90.0, -60.0, -30.0, -10.0};
const std::array<Plot_Value, 4> second_block{-80.0, -50.0, -20.0, -5.0};
const std::array<Plot_Value, 4> replacement_block{-70.0, -40.0, -15.0, -2.0};
@@ -124,8 +120,10 @@ TEST(plottable_migration, raster_plots_share_partitioned_color_blocks) {
configure_axis(time.get(), Axis_Orientation::vertical, {20.0, 100.0}, -80.0, canvas);
frequency->set<&Numeric_Axis::Prop::coordinate_range>(Axis_Range{0.0, 100.0});
power->set<&Numeric_Axis::Prop::coordinate_range>(Axis_Range{-100.0, 0.0});
auto glow = build_object<Glow>(frequency.get(), power.get());
auto waterfall = build_object<Fall>(frequency.get(), time.get());
auto glow = build_object<Glow>(frequency.get(), power.get(),
Plot_Partition_Grid{2, 2});
auto waterfall = build_object<Fall>(frequency.get(), time.get(),
Plot_Partition_Grid{2, 2});
glow->set<&Afterglow::Prop::frequency_range>(Axis_Range{0.0, 100.0});
glow->set<&Afterglow::Prop::power_range>(Axis_Range{-100.0, 0.0});
glow->set<&Afterglow::Prop::power_point_size>(16u);
@@ -174,7 +172,7 @@ TEST(plottable_migration, direct_overlay_and_constellation_build_and_render) {
configure_axis(vertical.get(), Axis_Orientation::vertical, {20.0, 100.0}, -80.0, canvas);
horizontal->set<&Numeric_Axis::Prop::coordinate_range>(Axis_Range{-1.0, 1.0});
vertical->set<&Numeric_Axis::Prop::coordinate_range>(Axis_Range{-1.0, 1.0});
auto diagram = build_object<Diagram>(horizontal.get(), vertical.get());
auto diagram = build_object<Diagram>(horizontal.get(), vertical.get(), 2u);
auto overlay = build_object<Overlay>(horizontal.get(), vertical.get());
diagram->set<&Constellation_Diagram::Prop::i_range>(Axis_Range{-1.0, 1.0});
diagram->set<&Constellation_Diagram::Prop::q_range>(Axis_Range{-1.0, 1.0});