Skip to main content

SceneRunner

Struct SceneRunner 

Source
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

Source

pub fn new() -> Self

Source

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).

Source

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.

Source

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.

Source

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§

Source§

impl Default for SceneRunner

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,