/**
 * Sentinel value for {@link RigidBody#_bodyId} prior to allocation by a
 * {@link PhysicsSystem}. After {@link PhysicsSystem#link}, the id is a packed
 * `(index << 8) | generation` integer.
 *
 * @type {number}
 */
export const RIGID_BODY_UNALLOCATED: number;
/**
 * Rigid-body component.
 *
 * Pose lives on {@link Transform}; this component owns the dynamic state that is not
 * part of TRS: velocity, mass, inertia, damping, gravity scale, layer / mask
 * filtering and a small set of bit-flags ({@link RigidBodyFlags}).
 *
 * Defaults are conservative: the body translates under forces but cannot rotate
 * unless the user explicitly sets {@link inverseInertiaLocal} — forgetting to
 * configure inertia results in a locked-rotation body, never a NaN tumble.
 *
 * @author Alex Goldring
 * @copyright Company Named Limited (c) 2026
 */
export class RigidBody {
    /**
     * @type {BodyKind|number}
     */
    kind: BodyKind | number;
    /**
     * Linear velocity in world space, m/s.
     * @readonly
     * @type {Vector3}
     */
    readonly linearVelocity: Vector3;
    /**
     * Angular velocity in world space, rad/s.
     * @readonly
     * @type {Vector3}
     */
    readonly angularVelocity: Vector3;
    /**
     * Accumulator for forces applied between fixed-update steps. Consumed and
     * zeroed by the integrator. User code applies via
     * {@link PhysicsSystem#applyForce}; do not write directly.
     * @readonly
     * @type {Vector3}
     */
    readonly accumulatedForce: Vector3;
    /**
     * Accumulator for torques applied between fixed-update steps. Consumed and
     * zeroed by the integrator.
     * @readonly
     * @type {Vector3}
     */
    readonly accumulatedTorque: Vector3;
    /**
     * Total mass, kg. Must be positive for Dynamic bodies; Static / Kinematic
     * bodies behave as if mass were infinite regardless of this value.
     * @type {number}
     */
    mass: number;
    /**
     * Inverse principal-frame inertia, diagonal. Components of zero lock the
     * corresponding rotational degree of freedom. The default of (0,0,0) means
     * rotation is locked until the user sets a value.
     * @readonly
     * @type {Vector3}
     */
    readonly inverseInertiaLocal: Vector3;
    /**
     * @type {number}
     */
    linearDamping: number;
    /**
     * @type {number}
     */
    angularDamping: number;
    /**
     * Multiplier for the world gravity on this body. 1 = normal gravity,
     * 0 = floating, negative values invert.
     * @type {number}
     */
    gravityScale: number;
    /**
     * Layer bitmask identifying this body's category.
     * @type {number}
     */
    layer: number;
    /**
     * Mask of layers this body collides with.
     * @type {number}
     */
    mask: number;
    /**
     * @type {RigidBodyFlags|number}
     */
    flags: RigidBodyFlags | number;
    /**
     * Owned by the {@link PhysicsSystem}; user code must not write.
     * @type {SleepState|number}
     */
    sleepState: SleepState | number;
    /**
     * Seconds spent below the sleep-threshold velocity. The system increments
     * this each step the body is essentially at rest; once it crosses
     * {@link PhysicsSystem}'s sleep threshold, the body is moved out of the
     * active set. Reset to 0 whenever the body moves above threshold.
     *
     * Transient runtime state — not serialised, not user-writable.
     * @type {number}
     */
    sleep_timer: number;
    /**
     * Next body in this body's atomic-sleep group, expressed as a body
     * **index** (NOT a packed id). Sleep groups are circular doubly-linked
     * lists threaded through every member when an island goes to sleep
     * atomically; on wake, the physics system walks the chain to wake every
     * member in the same step.
     *
     * `-1` when the body is awake or asleep as a singleton.
     *
     * Transient runtime state — not serialised, not user-writable.
     * @type {number}
     */
    sleep_group_next: number;
    /**
     * Previous body in this body's atomic-sleep group. See {@link sleep_group_next}.
     * @type {number}
     */
    sleep_group_prev: number;
    /**
     * Packed `(index << 8) | generation` body handle. {@link RIGID_BODY_UNALLOCATED}
     * before the body is linked into a {@link PhysicsSystem}. System-private.
     * @type {number}
     */
    _bodyId: number;
    /**
     *
     * @param {number|RigidBodyFlags} flag
     */
    setFlag(flag: number | RigidBodyFlags): void;
    /**
     *
     * @param {number|RigidBodyFlags} flag
     */
    clearFlag(flag: number | RigidBodyFlags): void;
    /**
     *
     * @param {number|RigidBodyFlags} flag
     * @returns {boolean}
     */
    getFlag(flag: number | RigidBodyFlags): boolean;
    /**
     *
     * @param {number|RigidBodyFlags} flag
     * @param {boolean} value
     */
    writeFlag(flag: number | RigidBodyFlags, value: boolean): void;
    toJSON(): {
        kind: number;
        linearVelocity: {
            x: number;
            y: number;
            z: number;
        };
        angularVelocity: {
            x: number;
            y: number;
            z: number;
        };
        mass: number;
        inverseInertiaLocal: {
            x: number;
            y: number;
            z: number;
        };
        linearDamping: number;
        angularDamping: number;
        gravityScale: number;
        layer: number;
        mask: number;
        flags: number;
    };
    fromJSON(json: any): void;
    /**
     * Value equality over the configurable / persistent state — the same field
     * set that is serialized. Transient runtime state (`_bodyId`, `sleepState`,
     * sleep timers, accumulated force/torque) is system-owned and excluded.
     *
     * @param {RigidBody} other
     * @returns {boolean}
     */
    equals(other: RigidBody): boolean;
    /**
     * Hash over the same persistent state as {@link equals}. Equal bodies hash
     * equal.
     * @returns {number}
     */
    hash(): number;
    /**
     * @readonly
     * @type {boolean}
     */
    readonly isRigidBody: boolean;
}
export namespace RigidBody {
    let typeName: string;
}
import { BodyKind } from "./BodyKind.js";
import Vector3 from "../../../core/geom/Vector3.js";
import { RigidBodyFlags } from "./RigidBodyFlags.js";
import { SleepState } from "./SleepState.js";
//# sourceMappingURL=RigidBody.d.ts.map