pub struct TransformInterpolation { /* private fields */ }Expand description
Per-entity snapshots of the world-space transform before the latest simulation step, consumed by the render path for motion interpolation.
Engine-internal: populated by the data layer’s capture pass for simulated bodies and read by the render projection. Not an ECS component (see the module docs) — it is neither inspectable nor serialized.
Implementations§
Source§impl TransformInterpolation
impl TransformInterpolation
Sourcepub fn previous(&self, entity: EntityId) -> Option<AffineTransform>
pub fn previous(&self, entity: EntityId) -> Option<AffineTransform>
The pre-step world-space transform recorded for entity, if the entity
is currently simulated. None means “render at the current transform”
(static entity, or first frame before any snapshot).
Sourcepub fn record(&mut self, entity: EntityId, transform: AffineTransform)
pub fn record(&mut self, entity: EntityId, transform: AffineTransform)
Records entity’s current world-space transform as the pose to
interpolate from on the next render.
Sourcepub fn retain_live(&mut self, live: &HashSet<EntityId>)
pub fn retain_live(&mut self, live: &HashSet<EntityId>)
Drops snapshots for entities absent from live — despawned bodies, or
entities the simulation no longer moves. Bounds memory and prevents a
recycled EntityId from reading a stale generation’s pose.