deuxfleurs/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2#![doc = include_str!("../README.md")]
3mod aabb;
4pub mod attachment;
5mod camera;
6pub mod data;
7mod deferred;
8mod geometry;
9mod obj_load;
10mod picker;
11pub mod point_cloud;
12mod resources;
13mod screenshot;
14pub mod segment;
15mod settings;
16mod shader;
17pub mod surface;
18mod texture;
19/// General types for genericity in functions parameters.
20pub mod types;
21///  Custom Ui components for mesh loading
22pub mod ui;
23mod util;
24mod window;
25use crate::point_cloud::DisplayPointCloud;
26use crate::segment::DisplaySegment;
27use crate::surface::geometry::DisplaySurface;
28pub use egui;
29use indexmap::IndexMap;
30pub use resources::{load_mesh, load_mesh_blocking};
31pub use settings::Settings;
32pub use wgpu::Color;
33pub use window::{InitialState, RunningState};
34use window::{InnerBareState, State};
35
36/// Re exported types for visibility
37pub mod internal {
38    pub use crate::geometry::{Element, ElementMut};
39    pub use crate::window::State;
40}
41
42/// First initialization of the app. The resulting [`InitialState`]
43/// can then be used to register geometries and data. It the has to
44/// be ran.
45///
46/// Arguments:
47/// * `settings`: global app [`Settings`]
48#[must_use]
49pub fn init(settings: Settings) -> InitialState {
50    State::new_inner(InnerBareState {
51        surfaces: IndexMap::new(),
52        clouds: IndexMap::new(),
53        segments: IndexMap::new(),
54        settings,
55    })
56}