§26 body.applyAngularImpulse(angularImpulse) about +Z.
§26 body.applyForce(force) — newtons, at the centre of mass.
§26 body.applyForceAtPoint(force, worldPoint).
§26 body.applyImpulse(impulse) — newton-seconds at the centre of mass.
§26 body.applyImpulseAtPoint(impulse, worldPoint).
§26 body.applyTorque(torque) — newton-metres about +Z.
Visits every live body in creation order, which is ascending RapierBodyAccess.getBodyId because ids are monotonic and never reused. This is the iteration §33 requires: destroying a body removes it from the sequence and creating one appends, so no destruction can permute the order a checksum is taken in.
Visits every live collider in creation order.
The §31 CCD mode the solver is actually running for this body — read back from Rapier rather than remembered, so it reports what the solver does and not what the descriptor asked for.
World-space centre of mass into out (§25); out.z is 0 in this planar
build. Served by Rapier's RigidBody.worldCom().
The body's mass in kilograms, as the solver computed it (§23, §25).
Reads a body's world transform (§42's "physics" authority reads this).
outRotation receives the pure Z quaternion for Rapier's scalar angle.
Reads linear (m/s) and angular (rad/s) velocity into out parameters.
The body a collider belongs to (§24, §37).
The collider's monotonic id, ordered like RapierBodyAccess.getBodyId.
§32 sleep state. The transitions are also reported as drainEvents events.
Clears the accumulated forces and torques (not impulses, which are applied immediately). Rapier keeps user forces across steps until reset.
Teleports a body (§37 "teleports"). Use RapierBodyAccess.setNextKinematicTransform for a kinematic body that should push dynamic bodies on the way.
Optionalwake: booleanRe-types a live body in place (§22, plan P7-3) — Rapier's own
RigidBody.setBodyType, which keeps the body's handle, its colliders, its
pose, and its mass properties.
wake defaults to true, like RapierBodyAccess.setBodyTransform's.
Optionalwake: booleanWrites both velocities (§23).
Optionalwake: booleanSets a "kinematic-position" body's target pose for the next step (§22).
Rapier derives an artificial velocity from it so dynamic bodies react.
Optionalrotation: RotationInput
Per-handle access to a Rapier body — the seam §37's two
sync*methods leave open (see the module header).PhysicsSolverAdapterdeliberately says nothing about reading or writing an individual body: §37's contract is about the step, and the transform exchange with the scene is@fourjs/physics's business. That leaves the physics package needing an interface it can call per body per step, which is this one. It is declared here, in the adapter package, rather than added to@fourjs/physics— the plan reserves that as an allowed extension point, and a WP-5.1 amendment can promote it later once the 3D adapter (WP-5.5) has confirmed the shape is dimension-independent.Every method takes handles minted by the same adapter and throws a
FourErrorfor a foreign or destroyed handle. Reading methods takeoutparameters and write into them (§7b, D7); the only allocations left are the{ x, y }objects Rapier's own bindings return, which no caller can avoid at 0.19.3.Angles, torques, and angular velocities are the §21 planar scalars: a
numberis about +Z, and aVector3must lie on the Z axis.