import { Animation } from "@babylonjs/core/Animations/animation";
import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup";
import type { Nullable } from "@babylonjs/core/types";
import type { IMmdModel } from "../../Runtime/IMmdModel";
import type { IMmdAnimation } from "./IMmdAnimation";
import type { IMmdBoneAnimationTrack, IMmdMorphAnimationTrack, IMmdMovableBoneAnimationTrack, IMmdPropertyAnimationTrack } from "./IMmdAnimationTrack";
import type { MmdAnimationBase } from "./mmdAnimationBase";
/**
 * A container type that stores mmd model animations using the `Animation` container in babylon.js
 *
 * It aims to utilize the animation runtime of babylon.js
 */
export declare class MmdModelAnimationGroup implements IMmdAnimation {
    /**
     * Animation name for identification
     */
    readonly name: string;
    /**
     * Bone position animation tracks for one `mesh.skeleton`
     */
    readonly bonePositionAnimations: readonly Animation[];
    /**
     * Bone position animation track bind map for one `mesh.skeleton`
     */
    readonly bonePositionAnimationBindMap: readonly string[];
    /**
     * Bone rotation animation tracks for one `mesh.skeleton`
     */
    readonly boneRotationAnimations: readonly Animation[];
    /**
     * Bone rotation animation track bind map for one `mesh.skeleton`
     */
    readonly boneRotationAnimationBindMap: readonly string[];
    /**
     * Morph animation tracks for one `mmdModel.morph`
     */
    readonly morphAnimations: readonly Animation[];
    /**
     * Morph animation track bind map for one `mmdModel.morph`
     */
    readonly morphAnimationBindMap: readonly string[];
    /**
     * Property animation track(a.k.a. IK toggle animation) for one `mmdModel`
     */
    readonly propertyAnimations: readonly Animation[];
    /**
     * Visibility animation track for one `mesh`
     */
    readonly visibilityAnimation: Nullable<Animation>;
    /**
     * Property animation track bind map(a.k.a. IK toggle animation) for one `mmdModel`
     */
    readonly propertyAnimationBindMap: readonly string[];
    /**
     * The start frame of this animation
     */
    readonly startFrame: number;
    /**
     * The end frame of this animation
     */
    readonly endFrame: number;
    /**
     * Create a unbinded mmd model animation group
     * @param mmdAnimation The mmd animation data
     * @param builder The builder for constructing mmd model animation group
     */
    constructor(mmdAnimation: MmdAnimationBase, builder: IMmdModelAnimationGroupBuilder);
    /**
     * Create a binded mmd model animation group for the given `MmdModel`
     * @param mmdModel The mmd model to bind
     * @returns The binded mmd model animation group
     */
    createAnimationGroup(mmdModel: IMmdModel): AnimationGroup;
}
/**
 * Mmd model animation builder for constructing mmd model animation group
 */
export interface IMmdModelAnimationGroupBuilder {
    /**
     * Create mmd model bone position animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd bone animation track
     * @returns babylon.js animation
     */
    createBonePositionAnimation(rootName: string, mmdAnimationTrack: IMmdMovableBoneAnimationTrack): Animation;
    /**
     * Create mmd model bone rotation animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd bone animation track
     * @returns babylon.js animation
     */
    createBoneRotationAnimation(rootName: string, mmdAnimationTrack: IMmdBoneAnimationTrack | IMmdMovableBoneAnimationTrack): Animation;
    /**
     * Create mmd model morph animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd morph animation track
     * @returns babylon.js animation
     */
    createMorphAnimation(rootName: string, mmdAnimationTrack: IMmdMorphAnimationTrack): Animation;
    /**
     * Create mmd model visibility animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd property animation track
     * @returns babylon.js animation
     */
    createVisibilityAnimation(rootName: string, mmdAnimationTrack: IMmdPropertyAnimationTrack): Nullable<Animation>;
    /**
     * Create mmd model property animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd property animation track
     * @returns babylon.js animations
     */
    createPropertyAnimation(rootName: string, mmdAnimationTrack: IMmdPropertyAnimationTrack): Animation[];
}
/**
 * @internal
 *
 * Contains linear interpolated track builder for mmd model animation group
 *
 * For reduce duplication of code
 */
export declare abstract class MmdModelAnimationGroupBuilderBase implements IMmdModelAnimationGroupBuilder {
    /**
     * Create mmd model bone position animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd bone animation track
     * @returns babylon.js animation
     */
    abstract createBonePositionAnimation(rootName: string, mmdAnimationTrack: IMmdMovableBoneAnimationTrack): Animation;
    /**
     * Create mmd model bone rotation animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd bone animation track
     * @returns babylon.js animation
     */
    abstract createBoneRotationAnimation(rootName: string, mmdAnimationTrack: IMmdBoneAnimationTrack | IMmdMovableBoneAnimationTrack): Animation;
    /**
     * Create mmd model morph animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd morph animation track
     * @returns babylon.js animation
     */
    createMorphAnimation(rootName: string, mmdAnimationTrack: IMmdMorphAnimationTrack): Animation;
    /**
     * Create mmd model visibility animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd property animation track
     * @returns babylon.js animation
     */
    createVisibilityAnimation(rootName: string, mmdAnimationTrack: IMmdPropertyAnimationTrack): Nullable<Animation>;
    /**
     * Create mmd model property animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd property animation track
     * @returns babylon.js animations
     */
    createPropertyAnimation(rootName: string, mmdAnimationTrack: IMmdPropertyAnimationTrack): Animation[];
}
/**
 * Use hermite interpolation for import animation bezier curve parameter
 *
 * This has some loss of curve shape, but it converts animations reliably while maintaining a small amount of keyframes
 */
export declare class MmdModelAnimationGroupHermiteBuilder extends MmdModelAnimationGroupBuilderBase {
    /**
     * Create mmd model bone position animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd bone animation track
     * @returns babylon.js animation
     */
    createBonePositionAnimation(rootName: string, mmdAnimationTrack: IMmdMovableBoneAnimationTrack): Animation;
    private _minimizeRotationDifference;
    /**
     * Create mmd model bone rotation animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd bone animation track
     * @returns babylon.js animation
     */
    createBoneRotationAnimation(rootName: string, mmdAnimationTrack: IMmdBoneAnimationTrack | IMmdMovableBoneAnimationTrack): Animation;
}
/**
 * Samples the bezier curve for every frame for import animation bezier curve parameter
 *
 * This method samples the bezier curve with 30 frames to preserve the shape of the curve as much as possible. However, it will use a lot of memory
 */
export declare class MmdModelAnimationGroupSampleBuilder extends MmdModelAnimationGroupBuilderBase {
    /**
     * Create mmd model bone position animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd bone animation track
     * @returns babylon.js animation
     */
    createBonePositionAnimation(rootName: string, mmdAnimationTrack: IMmdMovableBoneAnimationTrack): Animation;
    /**
     * Create mmd model bone rotation animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd bone animation track
     * @returns babylon.js animation
     */
    createBoneRotationAnimation(rootName: string, mmdAnimationTrack: IMmdBoneAnimationTrack | IMmdMovableBoneAnimationTrack): Animation;
}
/**
 * Use bezier interpolation for import animation bezier curve parameter
 *
 * This method uses the bezier curve as it is, But since babylon.js doesn't support bazier curves, we inject a bazier curve implementation to make it possible
 *
 * This method is not compatible with the Animation Curve Editor, but it allows you to import animation data completely lossless
 */
export declare class MmdModelAnimationGroupBezierBuilder extends MmdModelAnimationGroupBuilderBase {
    /**
     * Create mmd model bone position animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd bone animation track
     * @returns babylon.js animation
     */
    createBonePositionAnimation(rootName: string, mmdAnimationTrack: IMmdMovableBoneAnimationTrack): Animation;
    /**
     * Create mmd model bone rotation animation
     * @param rootName root animation name
     * @param mmdAnimationTrack mmd bone animation track
     * @returns babylon.js animation
     */
    createBoneRotationAnimation(rootName: string, mmdAnimationTrack: IMmdBoneAnimationTrack | IMmdMovableBoneAnimationTrack): Animation;
}
