Physics World Snapshot
@Immutable
Immutable world snapshot used for UI/runtime synchronization.
A snapshot is typically produced by the runtime after stepping the simulation and then consumed by Compose layout/placement code to render the latest transforms.
Conventions:
World-level values (gravity, stepConfig, solverIterations) are expressed in runtime/world units.
Exported body transforms and velocities are expressed in pixel space (see PhysicsBodySnapshot).
Constructors
Link copied to clipboard
constructor(isPaused: Boolean, gravity: PhysicsVector2, stepConfig: StepConfig, solverIterations: SolverIterations, bodies: List<PhysicsBodySnapshot> = emptyList(), bodiesByKey: Map<Any, PhysicsBodySnapshot> = bodies.associateBy { it.key }, stepIndex: Long = 0)
Properties
Link copied to clipboard
Flat list of exported body snapshots.
Link copied to clipboard
Pre-indexed lookup map for fast key-to-body access during layout.
Link copied to clipboard
World gravity vector (runtime/world units).
Link copied to clipboard
Convenience view over solver iteration counts.
Link copied to clipboard
Current step configuration (timestep/iteration counts/etc.).