1use jagua_rs::collision_detection::CDEConfig;
2use jagua_rs::geometry::fail_fast::SPSurrogateConfig;
3use jagua_rs::io::svg::SvgDrawOptions;
4use serde::{Deserialize, Serialize};
5
6#[derive(Debug, Serialize, Deserialize, Clone, Copy)]
8pub struct LBFConfig {
9 pub cde_config: CDEConfig,
11 pub poly_simpl_tolerance: Option<f32>,
13 pub min_item_separation: Option<f32>,
16 pub prng_seed: Option<u64>,
18 pub n_samples: usize,
20 pub ls_frac: f32,
22 #[serde(default)]
24 pub svg_draw_options: SvgDrawOptions,
25}
26
27impl Default for LBFConfig {
28 fn default() -> Self {
29 Self {
30 cde_config: CDEConfig {
31 quadtree_depth: 5,
32 item_surrogate_config: SPSurrogateConfig {
33 n_pole_limits: [(100, 0.0), (20, 0.75), (10, 0.90)],
34 n_ff_poles: 2,
35 n_ff_piers: 0,
36 },
37 },
38 poly_simpl_tolerance: Some(0.001),
39 min_item_separation: None,
40 prng_seed: Some(0),
41 n_samples: 5000,
42 ls_frac: 0.2,
43 svg_draw_options: SvgDrawOptions::default(),
44 }
45 }
46}