Skip to main content

Module app

Module app 

Source
Expand description

BrepApp — the THIN shell of the engine-native UI.

One eframe [App] that hosts the EXISTING brep-render engine and lays out the panels. The heavy lifting lives in focused modules; this file only owns the shell:

  • Documents (crate::document) holds the OPEN MODELS — one EngineState per document plus its identity, exactly one active. Panels borrow the active engine through self.docs.engine_mut(), which borrows only that FIELD and so still composes with the disjoint panel borrows beside it. EngineState (brep-render) is still the single windowing-agnostic BRAIN per document (scene / camera / controls / settings / widgets + pointer/wheel/viewcube/pick); we do NOT fork it.
  • crate::viewport::Viewport draws + drives the central 3D viewport (the offscreen texture, the egui_wgpu blit callback, input routing).
  • crate::panels — one module per left-panel section, each a small state struct + a show(&mut self, ui, state, …) method. Adding a panel = add panels/<name>.rs, one field here, one self.<name>.show(…) call in eframe::App::ui below (see README.md → “Adding a panel”).

Native (run_native) and wasm (WebRunner) run this SAME code.

Structs§

BrepApp