import type { Vector3 } from "@babylonjs/core/Maths/math.vector"; import type { DeepImmutable, Nullable, Tuple } from "@babylonjs/core/types"; import type { IWasmTypedArray } from "../../../Misc/IWasmTypedArray"; import type { IBulletWasmInstance } from "../bulletWasmInstance"; export interface IRigidBodyBundleImpl { readonly shouldSync: boolean; readonly needToCommit?: boolean; commitToWasm?(wasmInstance: IBulletWasmInstance, bundlePtr: number, motionStatesPtr: IWasmTypedArray, kinematicStatesPtr: IWasmTypedArray, worldTransformPtrArray: Nullable>[]): void; setTransformMatrixFromArray(motionStatesPtr: IWasmTypedArray, kinematicStatesPtr: IWasmTypedArray, index: number, array: DeepImmutable>, offset: number): void; setTransformMatricesFromArray(motionStatesPtr: IWasmTypedArray, kinematicStatesPtr: IWasmTypedArray, array: DeepImmutable>, offset: number): void; setDynamicTransformMatrixFromArray(worldTransformPtrArray: Nullable>[], index: number, array: DeepImmutable>, offset: number): void; /** * this method shoud not be called from non-dynamic bodies * @param kinematicStatesPtr * @param index */ getEffectiveKinematicState(kinematicStatesPtr: IWasmTypedArray, index: number): boolean; setEffectiveKinematicState(kinematicStatesPtr: IWasmTypedArray, index: number, value: boolean): void; setDamping(wasmInstance: IBulletWasmInstance, bundlePtr: number, index: number, linearDamping: number, angularDamping: number): void; getLinearDamping(wasmInstance: IBulletWasmInstance, bundlePtr: number, index: number): number; getAngularDamping(wasmInstance: IBulletWasmInstance, bundlePtr: number, index: number): number; setMassProps(wasmInstance: IBulletWasmInstance, bundlePtr: number, index: number, mass: number, localInertia: DeepImmutable): void; getMass(wasmInstance: IBulletWasmInstance, bundlePtr: number, index: number): number; getLocalInertia(wasmInstance: IBulletWasmInstance, bundlePtr: number, index: number): Vector3; translate(wasmInstance: IBulletWasmInstance, bundlePtr: number, index: number, translation: DeepImmutable): void; setLinearVelocity?(index: number, linearVelocity: DeepImmutable): void; setAngularVelocity?(index: number, angularVelocity: DeepImmutable): void; }