Skip to main content

SceneRunner

Struct SceneRunner 

Source
pub struct SceneRunner { /* private fields */ }
Expand description

A stateful, SCENE-FREE history run that emits a DELTA snapshot instead of mutating a scene — the M1 seam of the off-thread history runner. It remembers, in Self::last_sent, the resident handle it last EMITTED per solid name, so a rerun can tell the applier which displays are UNCHANGED (skip re-tessellating

  • keep their GPU buffers) vs. which are new/rebound (freshly tessellated).

Being scene-free is the point: a later milestone runs this on a background thread / worker with no access to the render scene, then ships the RunOutput delta back to the main thread to apply. In M1 the run is immediately applied on the same thread (see EngineState::apply_run_output), so behavior is byte-identical to the pre-seam in-place reconcile.

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, color_overrides: Option<&HashMap<String, [f32; 3]>>, ) -> 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.

color_overrides is an optional name → sRGB [0..1;3] map (the metadata color layer); applied to freshly built solids only (reused ones keep it).

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,