import { Ray, Vector3, Quaternion } from "@galacean/engine-math";
import { Layer } from "../Layer";
import { Scene } from "../Scene";
import { HitResult } from "./HitResult";
import { ColliderShape } from "./shape";
/**
 * A physics scene is a collection of colliders and constraints which can interact.
 */
export declare class PhysicsScene {
    private static _collision;
    private static _identityQuaternion;
    private static _scriptIndexSetter;
    private _scene;
    private _restTime;
    private _fixedTimeStep;
    private _colliders;
    private _gravity;
    private _nativePhysicsScene;
    /**
     * The gravity of physics scene.
     */
    get gravity(): Vector3;
    set gravity(value: Vector3);
    /**
     * The fixed time step in seconds at which physics are performed.
     */
    get fixedTimeStep(): number;
    set fixedTimeStep(value: number);
    constructor(scene: Scene);
    /**
     * Get whether two colliders can collide with each other.
     * @param layer1 - The first collision layer
     * @param layer2 - The second collision layer
     * @returns Whether the colliders should collide
     */
    getColliderLayerCollision(layer1: Layer, layer2: Layer): boolean;
    /**
     * Set whether two colliders can collide with each other.
     * @param layer1 - The first collision layer
     * @param layer2 - The second collision layer
     * @param isCollide - Whether the colliders should collide
     */
    setColliderLayerCollision(layer1: Layer, layer2: Layer, isCollide: boolean): void;
    /**
     * Casts a ray through the Scene and returns the first hit.
     * @param ray - The ray
     * @returns Returns True if the ray intersects with a collider, otherwise false
     */
    raycast(ray: Ray): boolean;
    /**
     * Casts a ray through the Scene and returns the first hit.
     * @param ray - The ray
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns True if the ray intersects with a collider, otherwise false
     */
    raycast(ray: Ray, outHitResult: HitResult): boolean;
    /**
     * Casts a ray through the Scene and returns the first hit.
     * @param ray - The ray
     * @param distance - The max distance the ray should check
     * @returns Returns True if the ray intersects with a collider, otherwise false
     */
    raycast(ray: Ray, distance: number): boolean;
    /**
     * Casts a ray through the Scene and returns the first hit.
     * @param ray - The ray
     * @param distance - The max distance the ray should check
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns True if the ray intersects with a collider, otherwise false
     */
    raycast(ray: Ray, distance: number, outHitResult: HitResult): boolean;
    /**
     * Casts a ray through the Scene and returns the first hit.
     * @param ray - The ray
     * @param distance - The max distance the ray should check
     * @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
     * @returns Returns True if the ray intersects with a collider, otherwise false
     */
    raycast(ray: Ray, distance: number, layerMask: Layer): boolean;
    /**
     * Casts a ray through the Scene and returns the first hit.
     * @param ray - The ray
     * @param distance - The max distance the ray should check
     * @param layerMask - Layer mask that is used to selectively ignore Colliders when casting
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns True if the ray intersects with a collider, otherwise false.
     */
    raycast(ray: Ray, distance: number, layerMask: Layer, outHitResult: HitResult): boolean;
    /**
     * Casts a box through the Scene and returns true if there is any hit.
     * @param center - The center of the box
     * @param halfExtents - Half the size of the box in each dimension
     * @param direction - The direction to sweep along
     * @returns Returns true if the box intersects with any collider, otherwise false
     */
    boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3): boolean;
    /**
     * Casts a box through the Scene and returns true if there is any hit.
     * @param center - The center of the box
     * @param halfExtents - Half the size of the box in each dimension
     * @param direction - The direction to sweep along
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns true if the box intersects with any collider, otherwise false
     */
    boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, outHitResult: HitResult): boolean;
    /**
     * Casts a box through the Scene and returns true if there is any hit.
     * @param center - The center of the box
     * @param halfExtents - Half the size of the box in each dimension
     * @param direction - The direction to sweep along
     * @param distance - The max distance to sweep
     * @returns Returns true if the box intersects with any collider, otherwise false
     */
    boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, distance: number): boolean;
    /**
     * Casts a box through the Scene and returns true if there is any hit.
     * @param center - The center of the box
     * @param halfExtents - Half the size of the box in each dimension
     * @param direction - The direction to sweep along
     * @param distance - The max distance to sweep
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns true if the box intersects with any collider, otherwise false
     */
    boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, distance: number, outHitResult: HitResult): boolean;
    /**
     * Casts a box through the Scene and returns true if there is any hit.
     * @param center - The center of the box
     * @param halfExtents - Half the size of the box in each dimension
     * @param direction - The direction to sweep along
     * @param orientation - The rotation of the box. @defaultValue `Quaternion(0, 0, 0, 1)`
     * @param distance - The max distance to sweep. @defaultValue `Number.MAX_VALUE`
     * @param layerMask - Layer mask that is used to selectively ignore Colliders when sweeping. @defaultValue `Layer.Everything`
     * @param outHitResult - Optional HitResult object to store detailed hit information
     * @returns Returns true if the box intersects with any collider, otherwise false
     */
    boxCast(center: Vector3, halfExtents: Vector3, direction: Vector3, orientation: Quaternion, distance: number, layerMask: Layer, outHitResult?: HitResult): boolean;
    /**
     * Casts a sphere through the Scene and returns true if there is any hit.
     * @param center - The center of the sphere
     * @param radius - The radius of the sphere
     * @param direction - The direction to sweep along
     * @returns Returns true if the sphere intersects with any collider, otherwise false
     */
    sphereCast(center: Vector3, radius: number, direction: Vector3): boolean;
    /**
     * Casts a sphere through the Scene and returns true if there is any hit.
     * @param center - The center of the sphere
     * @param radius - The radius of the sphere
     * @param direction - The direction to sweep along
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns true if the sphere intersects with any collider, otherwise false
     */
    sphereCast(center: Vector3, radius: number, direction: Vector3, outHitResult: HitResult): boolean;
    /**
     * Casts a sphere through the Scene and returns true if there is any hit.
     * @param center - The center of the sphere
     * @param radius - The radius of the sphere
     * @param direction - The direction to sweep along
     * @param distance - The max distance to sweep
     * @returns Returns true if the sphere intersects with any collider, otherwise false
     */
    sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number): boolean;
    /**
     * Casts a sphere through the Scene and returns true if there is any hit.
     * @param center - The center of the sphere
     * @param radius - The radius of the sphere
     * @param direction - The direction to sweep along
     * @param distance - The max distance to sweep
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns true if the sphere intersects with any collider, otherwise false
     */
    sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number, outHitResult: HitResult): boolean;
    /**
     * Casts a sphere through the Scene and returns true if there is any hit.
     * @param center - The center of the sphere
     * @param radius - The radius of the sphere
     * @param direction - The direction to sweep along
     * @param distance - The max distance to sweep. @defaultValue `Number.MAX_VALUE`
     * @param layerMask - Layer mask that is used to selectively ignore Colliders when sweeping. @defaultValue `Layer.Everything`
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns true if the sphere intersects with any collider, otherwise false
     */
    sphereCast(center: Vector3, radius: number, direction: Vector3, distance: number, layerMask: Layer, outHitResult?: HitResult): boolean;
    /**
     * Casts a capsule through the Scene and returns true if there is any hit.
     * @param center - The center of the capsule
     * @param radius - The radius of the capsule
     * @param height - The height of the capsule
     * @param direction - The direction to sweep along
     * @returns Returns true if the capsule intersects with any collider, otherwise false
     */
    capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3): boolean;
    /**
     * Casts a capsule through the Scene and returns true if there is any hit.
     * @param center - The center of the capsule
     * @param radius - The radius of the capsule
     * @param height - The height of the capsule
     * @param direction - The direction to sweep along
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns true if the capsule intersects with any collider, otherwise false
     */
    capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, outHitResult: HitResult): boolean;
    /**
     * Casts a capsule through the Scene and returns true if there is any hit.
     * @param center - The center of the capsule
     * @param radius - The radius of the capsule
     * @param height - The height of the capsule
     * @param direction - The direction to sweep along
     * @param distance - The max distance to sweep
     * @returns Returns true if the capsule intersects with any collider, otherwise false
     */
    capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, distance: number): boolean;
    /**
     * Casts a capsule through the Scene and returns true if there is any hit.
     * @param center - The center of the capsule
     * @param radius - The radius of the capsule
     * @param height - The height of the capsule
     * @param direction - The direction to sweep along
     * @param distance - The max distance to sweep
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns true if the capsule intersects with any collider, otherwise false
     */
    capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, distance: number, outHitResult: HitResult): boolean;
    /**
     * Casts a capsule through the Scene and returns true if there is any hit.
     * @param center - The center of the capsule
     * @param radius - The radius of the capsule
     * @param height - The height of the capsule
     * @param direction - The direction to sweep along
     * @param orientation - The rotation of the capsule. @defaultValue `Quaternion(0, 0, 0, 1)`
     * @param distance - The max distance to sweep. @defaultValue `Number.MAX_VALUE`
     * @param layerMask - Layer mask that is used to selectively ignore Colliders when sweeping. @defaultValue `Layer.Everything`
     * @param outHitResult - If true is returned, outHitResult will contain more detailed collision information
     * @returns Returns True if the capsule intersects with any collider, otherwise false
     */
    capsuleCast(center: Vector3, radius: number, height: number, direction: Vector3, orientation: Quaternion, distance: number, layerMask: Layer, outHitResult?: HitResult): boolean;
    /**
     * Get all colliders that overlap with a box in the scene.
     * @param center - The center of the box
     * @param halfExtents - Half the size of the box in each dimension
     * @param orientation - The rotation of the box. @defaultValue `Quaternion(0, 0, 0, 1)`
     * @param layerMask - Layer mask that is used to selectively filter colliders. @defaultValue `Layer.Everything`
     * @param shapes - Array to store overlapping collider shapes. @defaultValue `[]`
     * @returns The collider shapes overlapping with the box
     */
    overlapBoxAll(center: Vector3, halfExtents: Vector3, orientation?: Quaternion, layerMask?: Layer, shapes?: ColliderShape[]): ColliderShape[];
    /**
     * Get all colliders that overlap with a sphere in the scene.
     * @param center - The center of the sphere
     * @param radius - The radius of the sphere
     * @param layerMask - Layer mask that is used to selectively filter colliders. @defaultValue `Layer.Everything`
     * @param shapes - Array to store overlapping collider shapes. @defaultValue `[]`
     * @returns The collider shapes overlapping with the sphere
     */
    overlapSphereAll(center: Vector3, radius: number, layerMask?: Layer, shapes?: ColliderShape[]): ColliderShape[];
    /**
     * Get all colliders that overlap with a capsule in the scene.
     * @param center - The center of the capsule
     * @param radius - The radius of the capsule
     * @param height - The height of the capsule
     * @param orientation - The rotation of the capsule. @defaultValue `Quaternion(0, 0, 0, 1)`
     * @param layerMask - Layer mask that is used to selectively filter colliders. @defaultValue `Layer.Everything`
     * @param shapes - Array to store overlapping collider shapes. @defaultValue `[]`
     * @returns The collider shapes overlapping with the capsule
     */
    overlapCapsuleAll(center: Vector3, radius: number, height: number, orientation?: Quaternion, layerMask?: Layer, shapes?: ColliderShape[]): ColliderShape[];
    private _dispatchEvents;
    private _setGravity;
    private _createPreFilter;
    private _createHitCallback;
    private _clearHitResult;
}
