1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use crate::clone;
use arctk_attr::load;
#[load]
pub struct TreeSettings {
tar_tris: usize,
max_depth: u32,
padding: f64,
}
impl TreeSettings {
clone!(tar_tris, usize);
clone!(max_depth, u32);
clone!(padding, f64);
#[inline]
#[must_use]
pub fn new(tar_tris: usize, max_depth: u32, padding: f64) -> Self {
debug_assert!(tar_tris > 0);
debug_assert!(max_depth >= 1);
debug_assert!(padding >= 0.0);
Self {
tar_tris,
max_depth,
padding,
}
}
}