builder 和 运行时修改隔离开

This commit is contained in:
2026-08-13 11:25:38 +08:00
parent 9e598a0318
commit 4a48e62aea
57 changed files with 1512 additions and 2592 deletions
+5 -5
View File
@@ -137,18 +137,18 @@ double spectrum_power_at(const Spectrum_Properties& properties, const Spectrum_F
}
}
struct Spectrum_Control::Impl {
Impl(Spectrum_Control& owner, std::shared_ptr<Frequency_Axis> frequency, std::shared_ptr<Axis> power)
Impl(Spectrum_Control& owner, renderive_Owner<Frequency_Axis> frequency, renderive_Owner<Axis> power)
: frequency_axis(std::move(frequency)), power_axis(std::move(power)), frame(owner) {}
std::shared_ptr<Frequency_Axis> frequency_axis;
std::shared_ptr<Axis> power_axis;
renderive_Owner<Frequency_Axis> frequency_axis;
renderive_Owner<Axis> power_axis;
Plottable_Latest_Real_Time_Data<Spectrum_Frame> frame;
Spectrum_Interaction_State interaction;
std::mutex frame_update_mutex;
Adaptive_Render_Partitioner partitioner;
Spectrum_Prepare_Buffer prepare_buffer;
};
Spectrum_Control::Spectrum_Control(::Scene_Base& scene, const Spectrum_Properties& properties, std::shared_ptr<Frequency_Axis> frequency_axis, std::shared_ptr<Axis> power_axis)
: Plottable_State(scene, properties), impl_(std::make_unique<Impl>(*this, std::move(frequency_axis), std::move(power_axis))) {}
Spectrum_Control::Spectrum_Control(const Spectrum_Properties& properties, renderive_Owner<Frequency_Axis> frequency_axis, renderive_Owner<Axis> power_axis)
: Plottable_State(properties), impl_(std::make_unique<Impl>(*this, std::move(frequency_axis), std::move(power_axis))) {}
Spectrum_Control::~Spectrum_Control() = default;
void Spectrum_Control::update_samples(std::span<const double> values) {
if(get<&Spectrum_Properties::frequency_point_size>() <= 0)