import { BivectorN, Rotor4, VecN } from '@holotope/core'; import type { MassProperties4 } from './mass-properties4.js'; export interface RigidBody4Options { mass: number; /** Principal-frame inertia in planes 01,02,03,12,13,23. */ inertiaDiagonal: ArrayLike; position?: VecN | ArrayLike; rotation?: Rotor4; linearVelocity?: VecN | ArrayLike; angularMomentumWorld?: BivectorN | ArrayLike; gravityScale?: number; } export type RigidBody4StateOptions = Omit; /** * A dynamic 4D rigid body whose authoritative angular state is world-frame * bivector momentum. Contact/static/kinematic policies are intentionally not * part of this ballistic-stage type yet. */ export declare class RigidBody4 { #private; readonly position: VecN; rotation: Rotor4; readonly linearVelocity: VecN; readonly angularMomentumWorld: BivectorN; readonly force: VecN; readonly torque: BivectorN; gravityScale: number; constructor(options: RigidBody4Options); /** Immutable physical mass. Construct another body to change mass properties. */ get mass(): number; /** Reciprocal of `mass`, kept consistent with it for the body's lifetime. */ get invMass(): number; /** * Detached snapshot of principal-frame inertia in `[xy,xz,xw,yz,yw,zw]` * order. Mutating the returned array cannot alter the body's dynamics. */ get inertiaDiagonal(): Float64Array; /** Detached snapshot of the reciprocal principal inertias. */ get invInertiaDiagonal(): Float64Array; /** Creates a body whose principal frame initially reproduces the source pose. */ static fromMassProperties(properties: MassProperties4, options?: RigidBody4StateOptions): RigidBody4; applyForce(force: VecN | ArrayLike): this; applyTorque(torque: BivectorN | ArrayLike): this; clearAccumulators(): void; angularMomentumBody(rotation?: Rotor4): BivectorN; angularVelocityBody(rotation?: Rotor4): BivectorN; angularVelocityWorld(rotation?: Rotor4): BivectorN; /** Instantaneous world velocity at a world-space point on the body. */ velocityAtWorldPoint(point: VecN | ArrayLike): VecN; /** Applies the world-space inverse inertia operator to an angular impulse. */ inverseInertiaWorld(angularImpulseWorld: BivectorN, rotation?: Rotor4): BivectorN; /** * Applies a world-space R4 linear impulse at a world-space R4 point. * Both arrays are `[x, y, z, w]`; an impulse at `position` adds no angular * momentum, while an offset point contributes the wedge `r ∧ impulse`. */ applyImpulseAtWorldPoint(impulse: VecN | ArrayLike, point: VecN | ArrayLike): this; /** * Sets world-space R4 angular velocity. The bivector must have six plane * coefficients in `[xy, xz, xw, yz, yw, zw]` order; it is converted to the * authoritative world-frame angular momentum using this body's inertia. */ setAngularVelocityWorld(velocityWorld: BivectorN): this; translationalKineticEnergy(): number; rotationalKineticEnergy(): number; kineticEnergy(): number; } //# sourceMappingURL=rigid-body4.d.ts.map