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)]
8#[serde(default)]
9pub struct LBFConfig {
10 pub cde_config: CDEConfig,
12 pub poly_simpl_tolerance: Option<f32>,
14 pub min_item_separation: Option<f32>,
17 pub prng_seed: Option<u64>,
19 pub n_samples: usize,
21 pub ls_frac: f32,
23 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 cd_threshold: 16,
33 item_surrogate_config: SPSurrogateConfig {
34 n_pole_limits: [(100, 0.0), (20, 0.75), (10, 0.90)],
35 n_ff_poles: 2,
36 n_ff_piers: 0,
37 },
38 },
39 poly_simpl_tolerance: Some(0.001),
40 min_item_separation: None,
41 prng_seed: None,
42 n_samples: 5000,
43 ls_frac: 0.2,
44 svg_draw_options: SvgDrawOptions::default(),
45 }
46 }
47}