pub struct PhysicsFlow;Expand description
Read-only physics presentation Flow.
Deliberately uncached (no cache_key override): while the
simulation runs, the per-frame provider sync and transform writeback
mutate the Physics/Spatial domains anyway, so a cache would never hit —
it would only add key computation and a clone to every tick.
Trait Implementations§
Source§impl Default for PhysicsFlow
impl Default for PhysicsFlow
Source§fn default() -> PhysicsFlow
fn default() -> PhysicsFlow
Returns the “default value” for a type. Read more
Source§impl Flow for PhysicsFlow
impl Flow for PhysicsFlow
Source§const DOMAIN: SemanticDomain = SemanticDomain::Physics
const DOMAIN: SemanticDomain = SemanticDomain::Physics
Domain identifier — matches the agent’s domain.
Source§type View = PhysicsView
type View = PhysicsView
The typed view this Flow publishes into the LaneBus.
Clone so the
registration trampoline can republish a cached view without
re-running select/project (views hold Arcs and plain data, so
cloning is cheap relative to a full re-projection).Source§fn project(
&self,
world: &World,
_sel: &Selection,
_runtime: &Runtime,
) -> Self::View
fn project( &self, world: &World, _sel: &Selection, _runtime: &Runtime, ) -> Self::View
Stage 2 — read-only projection of the world into a View.
Source§fn select(&mut self, world: &World, runtime: &Runtime) -> Selection
fn select(&mut self, world: &World, runtime: &Runtime) -> Selection
Stage 1 — read-only selection of relevant entities.
Source§fn cache_key(&self, world: &World, runtime: &Runtime) -> Option<u64>
fn cache_key(&self, world: &World, runtime: &Runtime) -> Option<u64>
Cache key for view reuse. When
Some(k) matches the key of the
previously published view, the registration trampoline republishes
the cached view without re-running select/project. None (default)
disables caching — correct for flows whose projection depends on
inputs without a change signal. Read moreAuto Trait Implementations§
impl Freeze for PhysicsFlow
impl RefUnwindSafe for PhysicsFlow
impl Send for PhysicsFlow
impl Sync for PhysicsFlow
impl Unpin for PhysicsFlow
impl UnsafeUnpin for PhysicsFlow
impl UnwindSafe for PhysicsFlow
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
Mutably borrows from an owned value. Read more