import type { Vec2 } from '../core/types';
import { EventBus } from '../core/EventBus';
import type { EntityId } from '../core/types';
import { World, System } from '../ecs/World';
export interface CollisionInfo {
    entityA: EntityId;
    entityB: EntityId;
    normal: Vec2;
    depth: number;
    point: Vec2;
}
export interface RaycastHit {
    entityId: EntityId;
    point: Vec2;
    normal: Vec2;
    distance: number;
}
export declare class PhysicsEngine2D {
    readonly events: EventBus;
    gravity: Vec2;
    private hash;
    private activeCollisions;
    private activeTriggers;
    step(world: World, dt: number): void;
    private integrateForces;
    private detectCollisions;
    private narrowPhase;
    private resolveCollisions;
    private emitEvents;
    raycast(world: World, origin: Vec2, direction: Vec2, maxDistance?: number, layerMask?: number): RaycastHit | null;
    static testAABBvsAABB(a: {
        x: number;
        y: number;
        width: number;
        height: number;
    }, b: {
        x: number;
        y: number;
        width: number;
        height: number;
    }): boolean;
    static testCircleVsCircle(a: {
        x: number;
        y: number;
        radius: number;
    }, b: {
        x: number;
        y: number;
        radius: number;
    }): boolean;
    static testAABBvsCircle(aabb: {
        x: number;
        y: number;
        width: number;
        height: number;
    }, circle: {
        x: number;
        y: number;
        radius: number;
    }): boolean;
}
export declare class PhysicsSystem extends System {
    private engine;
    constructor(engine: PhysicsEngine2D, priority?: number);
    fixedUpdate(world: World, dt: number): void;
}
