import { MutableRefObject } from "react";
import { BufferGeometry, Mesh, Object3D, Quaternion, Vector3 } from "three";
import { BodyConfig, CommonConstraintConfig, DynamicConstraintConfig, RaycastHit, RaycastOptions, ShapeConfig, SharedBuffers, SingleBodyConstraintConfig, SoftBodyConfig, TwoBodyConstraintConfig, UpdateBodyOptions, UUID } from "../three-ammo/lib/types";
import { WorkerHelpers } from "../three-ammo/lib/worker-helper";
export interface PhysicsState {
    workerHelpers: ReturnType<typeof WorkerHelpers>;
    debugGeometry: BufferGeometry;
    debugBuffer: SharedArrayBuffer | ArrayBuffer;
    bodyOptions: Record<UUID, BodyConfig>;
    uuids: UUID[];
    object3Ds: Record<UUID, Object3D>;
    softBodies: Record<UUID, Mesh>;
    sharedBuffersRef: MutableRefObject<SharedBuffers>;
    uuidToIndex: Record<UUID, number>;
    debugIndex: Uint32Array;
    addRigidBody(uuid: UUID, mesh: Object3D, options?: BodyConfig): any;
    removeRigidBody(uuid: UUID): any;
    addSoftBody(uuid: UUID, mesh: Object3D, options?: SoftBodyConfig): any;
    removeSoftBody(uuid: UUID): any;
    rayTest(options: RaycastOptions): Promise<RaycastHit[]>;
}
export interface PhysicsPerformanceInfo {
    lastTickMs: number;
    lastTickTime: number;
}
export interface AmmoPhysicsContext {
    addRigidBody(uuid: UUID, mesh: Object3D, options?: BodyConfig): any;
    removeRigidBody(uuid: UUID): any;
    addShapes(bodyUuid: UUID, shapesUuid: UUID, mesh: Object3D, options?: ShapeConfig): any;
    removeShapes(bodyUuid: UUID, shapesUuid: UUID): any;
    addSoftBody(uuid: UUID, mesh: Object3D, options?: SoftBodyConfig): any;
    removeSoftBody(uuid: string): any;
    addConstraint(constraintId: UUID, bodyUuid: UUID, targetUuid: undefined, options: SingleBodyConstraintConfig & CommonConstraintConfig): any;
    addConstraint(constraintId: UUID, bodyUuid: UUID, targetUuid: UUID, options: TwoBodyConstraintConfig & CommonConstraintConfig): any;
    updateConstraint(constraintId: UUID, options?: DynamicConstraintConfig): any;
    removeConstraint(constraintId: UUID): any;
    updateRigidBody(uuid: UUID, options: UpdateBodyOptions): any;
    enableDebug(enable: boolean, debugSharedArrayBuffer: SharedArrayBuffer): any;
    resetDynamicBody(uuid: UUID): any;
    activateBody(uuid: UUID): any;
    bodySetMotionState(uuid: UUID, position?: Vector3, rotation?: Quaternion): any;
    bodySetLinearVelocity(uuid: UUID, velocity: Vector3): any;
    bodyApplyImpulse(uuid: UUID, impulse: Vector3, relativeOffset?: Vector3): any;
    bodyApplyForce(uuid: UUID, force: Vector3, relativeOffset?: Vector3): any;
    bodySetShapesOffset(uuid: string, offset: Vector3): any;
    object3Ds: Record<string, Object3D>;
    rayTest(options: RaycastOptions): Promise<RaycastHit[]>;
    physicsPerformanceInfoRef: MutableRefObject<PhysicsPerformanceInfo>;
}
export declare const AmmoPhysicsContext: import("react").Context<AmmoPhysicsContext | null>;
export declare function useAmmoPhysicsContext(): AmmoPhysicsContext;
