-
Notifications
You must be signed in to change notification settings - Fork 9
/
settings.rs
96 lines (86 loc) · 1.64 KB
/
settings.rs
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
use bevy::prelude::*;
use bevy_args::{
Deserialize,
Serialize,
ValueEnum,
};
use crate::sort::SortMode;
#[derive(
Clone,
Copy,
Debug,
Default,
Eq,
Hash,
PartialEq,
Reflect,
)]
pub enum GaussianCloudDrawMode {
#[default]
All,
Selected,
HighlightSelected,
}
#[derive(
Clone,
Copy,
Debug,
Default,
Eq,
Hash,
PartialEq,
Reflect,
Serialize,
Deserialize,
ValueEnum,
)]
pub enum GaussianMode {
#[default]
Gaussian3d,
GaussianSurfel,
}
#[derive(
Clone,
Copy,
Debug,
Default,
Eq,
Hash,
PartialEq,
Reflect,
)]
pub enum GaussianCloudRasterize {
#[default]
Color,
Depth,
Normal,
}
// TODO: breakdown into components
#[derive(Component, Reflect, Clone)]
#[reflect(Component)]
pub struct GaussianCloudSettings {
pub aabb: bool,
pub global_opacity: f32,
pub global_scale: f32,
pub opacity_adaptive_radius: bool,
pub visualize_bounding_box: bool,
pub sort_mode: SortMode,
pub draw_mode: GaussianCloudDrawMode,
pub gaussian_mode: GaussianMode,
pub rasterize_mode: GaussianCloudRasterize,
}
impl Default for GaussianCloudSettings {
fn default() -> Self {
Self {
aabb: false,
global_opacity: 1.0,
global_scale: 1.0,
opacity_adaptive_radius: true,
visualize_bounding_box: false,
sort_mode: SortMode::default(),
draw_mode: GaussianCloudDrawMode::default(),
gaussian_mode: GaussianMode::default(),
rasterize_mode: GaussianCloudRasterize::default(),
}
}
}