import { Matrix, Quaternion, Vector3 } from "@babylonjs/core/Maths/math.vector";
import type { Nullable } from "@babylonjs/core/types";
import type { MmdModelMetadata } from "../Loader/mmdModelMetadata";
import type { AppendTransformSolver } from "./appendTransformSolver";
import type { IkSolver } from "./ikSolver";
import type { IMmdRuntimeBone } from "./IMmdRuntimeBone";
import type { IMmdRuntimeLinkedBone } from "./IMmdRuntimeLinkedBone";
/**
 * Bone for MMD runtime
 *
 * For mmd runtime, it is necessary to override the bone system because it has a different implementation than the usual matrix update method
 *
 * Which requires the mmd runtime bone, which is the wrapper of the babylon.js bone
 */
export declare class MmdRuntimeBone implements IMmdRuntimeBone {
    /**
     * The Babylon.js bone
     */
    readonly linkedBone: IMmdRuntimeLinkedBone;
    /**
     * Name of the bone
     */
    readonly name: string;
    /**
     * Parent bone
     */
    parentBone: Nullable<MmdRuntimeBone>;
    /**
     * Child bones
     */
    readonly childBones: MmdRuntimeBone[];
    /**
     * Transform order
     */
    readonly transformOrder: number;
    /**
     * Bone flag
     *
     * @see PmxObject.Bone.Flag
     */
    readonly flag: number;
    /**
     * Whether the bone transform is applied after physics
     */
    readonly transformAfterPhysics: boolean;
    /**
     * Append transform solver
     *
     * If the bone does not have an append transform solver, it will be null
     */
    appendTransformSolver: Nullable<AppendTransformSolver>;
    /**
     * IK solver
     *
     * If the bone does not have an ik solver, it will be null
     */
    ikSolver: Nullable<IkSolver>;
    /**
     * The position offset value to be moved by the bone morph
     *
     * This is a field that is primarily updated by the append transform solver
     */
    readonly morphPositionOffset: Vector3;
    /**
     * The rotation offset value to be moved by the bone morph
     *
     * This is a field that is primarily updated by the append transform solver
     */
    readonly morphRotationOffset: Quaternion;
    /**
     * The rotation offset value to be moved by the IK solver
     *
     * If this bone is an Ik chain, this value is non-null
     */
    ikRotation: Nullable<Quaternion>;
    /**
     * Local matrix of this bone
     */
    readonly localMatrix: Matrix;
    /**
     * World matrix of this bone
     *
     * Slice of `MmdModel.worldTransformMatrices` that corresponds to this bone
     */
    readonly worldMatrix: Float32Array;
    /**
     * Gets the position of a local transform with animations and bone morphs applied
     */
    getAnimatedPositionToRef: (target: Vector3) => Vector3;
    /**
     * Gets the rotation of a local transform with animations and bone morphs applied
     */
    getAnimatedRotationToRef: (target: Quaternion) => Quaternion;
    /**
     * Get the position offset of the local transform with animation and bone morph applied
     *
     * Refers to the change from the rest position
     */
    getAnimationPositionOffsetToRef: (target: Vector3) => Vector3;
    /**
     * Create MMD runtime bone
     * @param linkedBone Linked Babylon.js bone
     * @param boneMetadata Bone metadata
     * @param worldTransformMatrices World transform matrices
     * @param boneIndex Bone index
     */
    constructor(linkedBone: IMmdRuntimeLinkedBone, boneMetadata: MmdModelMetadata.Bone, worldTransformMatrices: Float32Array, boneIndex: number);
    private _getAnimatedPositionWithMorphToRef;
    private _getAnimatedPositionToRef;
    private _getAnimatedRotationToRef;
    private _getAnimatedRotationWithMorphToRef;
    private static readonly _TempVector3;
    private _getAnimationPositionOffsetToRef;
    private _getAnimationPositionOffsetWithMorphToRef;
    /**
     * Allows the animation of this bone to be affected by the `morphPositionOffset` and `morphRotationOffset` fields
     */
    enableMorph(): void;
    /**
     * Disables the animation of this bone to be affected by the `morphPositionOffset` and `morphRotationOffset` fields
     */
    disableMorph(): void;
    private static readonly _TempRotation;
    private static readonly _TempPosition;
    /**
     * Update the local matrix of this bone
     */
    updateLocalMatrix(): void;
    private static readonly _Stack;
    private static readonly _ParentWorldMatrix;
    /**
     * Update the world matrix of this bone and its children bones recursively
     */
    updateWorldMatrix(): void;
    /**
     * Get the world matrix of this bone
     *
     * The result of this method is not same as `linkedBone.getFinalMatrix()`
     *
     * `linkedBone.getFinalMatrix()` updated at the end of the mmd runtime update, so it may not be the latest value
     * @param target target matrix
     * @returns target matrix
     */
    getWorldMatrixToRef(target: Matrix): Matrix;
    /**
     * Get the world translation of this bone
     * @param target target vector
     * @returns target vector
     */
    getWorldTranslationToRef(target: Vector3): Vector3;
    /**
     * Set the world translation of this bone
     * @param source source vector
     */
    setWorldTranslationFromRef(source: Vector3): void;
    /**
     * Get ik solver index
     *
     * If the bone does not have an ik solver, it will return -1
     */
    get ikSolverIndex(): number;
}
