import type { World, RigidBody, Collider, KinematicCharacterController } from '@dimforge/rapier3d-compat';
import { PhysicsLib } from '../CorePhysics';
import { Object3D, Vector3 } from 'three';
import { PhysicsPlayerType } from './PhysicsPlayer';
import { PolyScene } from '../../../engine/scene/PolyScene';
import { CorePlayerInput } from '../../player/PlayerCommon';
type BooleanGetter = () => boolean;
type UpdateFunc = (computeData: CorePlayerPhysicsComputeInputData, inputData: CorePlayerPhysicsInputData, delta: number) => void;
export type CorePlayerPhysicsInputData = Record<CorePlayerInput, boolean>;
export interface CorePlayerPhysicsComputeInputData {
    speed: number;
    runAllowed: boolean;
    runSpeedMult: number;
    jumpAllowed: boolean;
    jumpStrength: number;
    resetIfBelowThreshold: boolean;
    resetThreshold: number;
}
interface CorePlayerPhysicsOptions {
    scene: PolyScene;
    object: Object3D;
    PhysicsLib: PhysicsLib;
    world: World;
    worldObject: Object3D;
    body: RigidBody;
    collider: Collider;
    type: PhysicsPlayerType;
}
export declare class CorePlayerPhysics {
    protected options: CorePlayerPhysicsOptions;
    private _userTorques;
    private _userImpulses;
    private _correctedMovement;
    protected object: Object3D;
    protected PhysicsLib: PhysicsLib;
    protected world: World;
    protected body: RigidBody;
    protected collider: Collider;
    protected characterController: KinematicCharacterController | undefined;
    protected startPosition: Vector3;
    onGround: BooleanGetter;
    update: UpdateFunc;
    private cameraAndControls;
    constructor(options: CorePlayerPhysicsOptions);
    dispose(): void;
    private _computeForwardDirAndUpdateCamera;
    /**
     *
     * torque
     *
     */
    initWithTorque(worldObject: Object3D, scene: PolyScene): void;
    onGroundWithTorque(): boolean;
    updateWithTorque(computeInputData: CorePlayerPhysicsComputeInputData, inputData: CorePlayerPhysicsInputData, delta: number): void;
    /**
     *
     * character controller
     *
     */
    onGroundWithCharacterController(): boolean;
    setInputDataWithCharacterController(inputData: CorePlayerPhysicsInputData): void;
    updateWithCharacterController(computeData: CorePlayerPhysicsComputeInputData, inputData: CorePlayerPhysicsInputData, delta: number): void;
}
export {};
