Documentation
    Preparing search index...

    Interface DebugCenterOfMassAccess<THandle, TColliderHandle>

    DebugBodyAccess plus the centre-of-mass read — SolverBodyAccess.getBodyCenterOfMass, transcribed 2026-08-04 (the member whose absence staged §113's centre-of-mass display from 2026-08-02, see the module header). Kept as an extension rather than a sixth member on DebugBodyAccess so every existing five-member source keeps satisfying the base seam unchanged; only collectCentersOfMass requires this one.

    interface DebugCenterOfMassAccess<THandle = unknown, TColliderHandle = unknown> {
        countContacts?(): number;
        forEachBody(visit: (handle: THandle, id: number) => void): void;
        forEachCollider(visit: (handle: TColliderHandle, id: number) => void): void;
        getBodyCenterOfMass(handle: THandle, out: Vector3): void;
        getBodyTransform(
            handle: THandle,
            outPosition: Vector3,
            outRotation: Quaternion,
        ): void;
        getBodyVelocities(
            handle: THandle,
            outLinear: Vector3,
            outAngular: Vector3,
        ): void;
        isBodySleeping(handle: THandle): boolean;
    }

    Type Parameters

    • THandle = unknown
    • TColliderHandle = unknown

    Hierarchy (View Summary)

    Index
    • Live contact points in the narrow phase after the last step (§84). Optional: adapters that cannot walk manifolds omit this and SolverStatistics.contactCount stays NaN.

      Returns number

    • Visits every live body in creation order (§33).

      Parameters

      • visit: (handle: THandle, id: number) => void

      Returns void

    • Visits every live collider in creation order (§33).

      Parameters

      Returns void

    • World-space centre of mass (§25), as the solver resolved it.

      Parameters

      Returns void

    • §32 sleep state as the solver holds it after the step.

      Parameters

      Returns boolean