pub struct SceneRunner { /* private fields */ }Expand description
Executes history without accessing the render scene and emits display deltas.
Tracks resident handles so unchanged solids retain their meshes and GPU
buffers when the main thread applies the resulting RunOutput.
Implementations§
Source§impl SceneRunner
impl SceneRunner
pub fn new() -> Self
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Reset the delta baseline (call on a wholesale document switch so the next run is a full rebuild — no stale reuse across unrelated models).
Sourcepub fn run(&mut self, request: &HistoryRequest) -> RunOutput
pub fn run(&mut self, request: &HistoryRequest) -> RunOutput
Execute request and fold it into an ordered delta snapshot (does NOT
touch any scene). For each displayed kernel solid in order: if the handle
is unchanged since the last emit, emit (name, handle, None) (the applier
keeps its existing display); otherwise (re-)tessellate the resident handle
and emit (name, handle, Some(display)). A display-payload error is
recorded in report.display_errors and the entry is SKIPPED — and NOT
recorded in the new baseline, so a later successful run re-tessellates it.
Colours are NOT applied here. A display arrives colourless and the main
side paints it from the metadata store
(EngineState::sync_colors_from_metadata),
which is the only colour authority — a runner may be a background thread
or worker with no view of that store.
Sourcepub fn run_observed(
&mut self,
request: &HistoryRequest,
observe: &mut dyn FnMut(HistoryProgress<'_>) -> bool,
) -> RunOutput
pub fn run_observed( &mut self, request: &HistoryRequest, observe: &mut dyn FnMut(HistoryProgress<'_>) -> bool, ) -> RunOutput
Self::run with a progress observer: observe is called before every
feature the kernel actually executes (see
brep_kernel::execute_history_observed); returning false stops the
run at that boundary, and the partial result is folded like any other.
Sourcepub fn handle_of(&self, name: &str) -> Option<u32>
pub fn handle_of(&self, name: &str) -> Option<u32>
The resident handle last EMITTED for name (the delta baseline), or None
if the runner has not emitted a solid of that name. The measurement-query
path resolves an object’s owning-solid handle through this so the query runs
against the SAME resident geometry the last run displayed (on the runner’s
own thread, whose registry is warm from that run).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SceneRunner
impl RefUnwindSafe for SceneRunner
impl Send for SceneRunner
impl Sync for SceneRunner
impl Unpin for SceneRunner
impl UnsafeUnpin for SceneRunner
impl UnwindSafe for SceneRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more