import { VecN } from '@holotope/core'; import { RigidBody4 } from './rigid-body4.js'; export interface PhysicsWorld4Options { /** Default is y-down: [0, -9.81, 0, 0]. */ gravity?: VecN | ArrayLike; } /** Called after force integration and before pose integration in each substep. */ export type PhysicsWorld4VelocityConstraintCallback = (substepDt: number, substepIndex: number) => void; /** Fixed-step world with an explicit velocity-constraint callback seam. */ export declare class PhysicsWorld4 { readonly gravity: VecN; readonly bodies: RigidBody4[]; constructor(options?: PhysicsWorld4Options); addBody(body: RigidBody4): this; removeBody(body: RigidBody4): this; /** * Integrates force/torque into velocities without moving any pose. * * This low-level stage exists so event-driven contact can split pose * integration at a time of impact. Accumulators remain live until * `clearAccumulators()`; ordinary callers should continue to use `step()`. */ integrateVelocities(dt: number): this; /** Advances every body pose using its current post-constraint velocity. */ integratePoses(dt: number): this; /** Clears forces and torques after a complete manually staged step. */ clearAccumulators(): this; /** * Advances force, momentum, velocity, position, and Spin(4) orientation. * Forces and torques are held constant across substeps, then cleared. A * finite `dt` of zero is a complete no-op, including accumulator retention; * this makes the first zero delta from a renderer clock safe to forward. */ step(dt: number, substeps?: number, solveVelocityConstraints?: PhysicsWorld4VelocityConstraintCallback): void; } //# sourceMappingURL=world4.d.ts.map