import { Matrix, Vector3 } from "@babylonjs/core/Maths/math.vector";
import type { Nullable } from "@babylonjs/core/types";
import type { MmdModelMetadata } from "../../Loader/mmdModelMetadata";
import type { IMmdRuntimeBone } from "../IMmdRuntimeBone";
import type { IMmdRuntimeLinkedBone } from "../IMmdRuntimeLinkedBone";
import type { MmdWasmInstance } from "./mmdWasmInstance";
import type { MmdWasmRuntime } from "./mmdWasmRuntime";
import { type WasmBufferedArray } from "./wasmBufferedArray";
/**
 * Bone for MMD WASM runtime
 *
 * For mmd wasm 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 wasm runtime bone, which is the wrapper of the babylon.js bone
 */
export declare class MmdWasmRuntimeBone implements IMmdRuntimeBone {
    /**
     * The Babylon.js bone
     */
    readonly linkedBone: IMmdRuntimeLinkedBone;
    /**
     * Name of the bone
     */
    readonly name: string;
    /**
     * Parent bone
     */
    parentBone: Nullable<IMmdRuntimeBone>;
    /**
     * Child bones
     */
    readonly childBones: IMmdRuntimeBone[];
    /**
     * 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;
    private readonly _worldMatrix;
    /**
     * World matrix of this bone
     *
     * Slice of `MmdModel.worldTransformMatrices` that corresponds to this bone
     *
     * This array reference should not be copied elsewhere and must be read and written with minimal scope
     */
    get worldMatrix(): Float32Array;
    /**
     * Get ik solver index
     *
     * If the bone does not have an ik solver, it will return -1
     */
    readonly ikSolverIndex: number;
    /**
     * Create MMD WASM runtime bone
     * @param linkedBone Linked Babylon.js bone
     * @param boneMetadata Bone metadata
     * @param worldTransformMatrices WASM buffered array of world transform matrices
     * @param boneIndex Bone index
     * @param ikSolverIndex IK solver index
     * @param mmdRuntime MMD WASM runtime
     * @param mmdModelPtr MMD WASM side model pointer
     */
    constructor(linkedBone: IMmdRuntimeLinkedBone, boneMetadata: MmdModelMetadata.Bone, worldTransformMatrices: WasmBufferedArray<Float32Array>, boneIndex: number, ikSolverIndex: number, mmdRuntime: MmdWasmRuntime);
    /**
     * @internal
     * @param wasmInstance MMD WASM instance
     */
    updateBackBufferReference(wasmInstance: MmdWasmInstance): 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;
}
