import "@babylonjs/core/Physics/joinedPhysicsEngineComponent";
import "@babylonjs/core/Physics/v1/physicsEngineComponent";
import { BoundingInfo } from "@babylonjs/core/Culling/boundingInfo";
import { Matrix } from "@babylonjs/core/Maths/math.vector";
import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh";
import type { Mesh } from "@babylonjs/core/Meshes/mesh";
import { PhysicsImpostor } from "@babylonjs/core/Physics/v1/physicsImpostor";
import type { Scene } from "@babylonjs/core/scene";
import type { Nullable } from "@babylonjs/core/types";
import { PmxObject } from "../../Loader/Parser/pmxObject";
import type { ILogger } from "../ILogger";
import type { IMmdRuntimeBone } from "../IMmdRuntimeBone";
import type { IMmdPhysics, IMmdPhysicsModel } from "./IMmdPhysics";
declare class MmdPhysicsMesh extends AbstractMesh {
    readonly linkedBone: IMmdRuntimeBone;
    physicsMode: PmxObject.RigidBody.PhysicsMode;
    readonly bodyOffsetMatrix: Matrix;
    readonly bodyOffsetInverseMatrix: Matrix;
    private readonly _customBoundingInfo;
    constructor(name: string, scene: Scene, linkedBone: IMmdRuntimeBone, physicsMode: PmxObject.RigidBody.PhysicsMode, customBoundingInfo: Nullable<BoundingInfo>);
    private static readonly _ParentWorldMatrixInverse;
    private static readonly _WorldMatrix;
    computeBodyOffsetMatrix(): void;
    getBoundingInfo(): BoundingInfo;
}
/**
 * MMD ammo physics model is container of the ammo.js physics resources of the MMD model
 */
export declare class MmdAmmoPhysicsModel implements IMmdPhysicsModel {
    private readonly _mmdPhysics;
    private readonly _nodes;
    private readonly _impostors;
    /**
     * Create a new MMD ammo.js physics model
     * @param mmdPhysics MMD ammo physics
     * @param nodes MMD physics transform nodes
     * @param impostors Physics impostors
     */
    constructor(mmdPhysics: MmdAmmoPhysics, nodes: readonly Nullable<MmdPhysicsMesh>[], impostors: readonly Nullable<PhysicsImpostor>[]);
    /**
     * Dispose the physics resources
     */
    dispose(): void;
    private static readonly _NodeWorldMatrix;
    private static readonly _ZeroVector;
    /**
     * Reset the rigid body positions and velocities
     */
    initialize(): void;
    /**
     * Set the rigid bodies transform to the bones transform
     */
    syncBodies(): void;
    private static readonly _BoneWorldPosition;
    /**
     * Set the bones transform to the rigid bodies transform
     */
    syncBones(): void;
}
/**
 * Use the v1 physics engine to build the physics model of the MMD model
 *
 * If you do not want to use a physics engine, you can reduce the bundling size by not import this class
 */
export declare class MmdAmmoPhysics implements IMmdPhysics {
    private readonly _scene;
    private readonly _enablePreStepOnces;
    /**
     * Create a new MMD ammo.js physics engine
     *
     * Scene must have a physics engine enabled
     * @param scene The scene to build the physics model
     */
    constructor(scene: Scene);
    /**
     * Build the physics model of the MMD model
     * @param rootMesh Root mesh of the MMD model
     * @param bones MMD runtime bones
     * @param rigidBodies rigid bodies information
     * @param joints joints information
     * @param logger Logger
     * @returns MMD physics model
     * @throws If the ammo physics engine is not enabled
     */
    buildPhysics(rootMesh: Mesh, bones: readonly IMmdRuntimeBone[], rigidBodies: PmxObject["rigidBodies"], joints: PmxObject["joints"], logger: ILogger): IMmdPhysicsModel;
    private readonly _onAfterPhysics;
    /** @internal */
    _enablePreStepOnce(impostor: PhysicsImpostor): void;
}
export {};
