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 IRigidBodyImpl { readonly shouldSync: boolean; readonly needToCommit?: boolean; commitToWasm?(wasmInstance: IBulletWasmInstance, bodyPtr: number, motionStatePtr: IWasmTypedArray, kinematicStatePtr: IWasmTypedArray, worldTransformPtr: Nullable>): void; setTransformMatrixFromArray(motionStatePtr: IWasmTypedArray, kinematicStatePtr: IWasmTypedArray, array: DeepImmutable>, offset: number): void; setDynamicTransformMatrixFromArray(worldTransformPtr: IWasmTypedArray, array: DeepImmutable>, offset: number): void; /** * this method shoud not be called from non-dynamic bodies * @param kinematicStatePtr */ getEffectiveKinematicState(kinematicStatePtr: IWasmTypedArray): boolean; setEffectiveKinematicState(kinematicStatePtr: IWasmTypedArray, value: boolean): void; setDamping(wasmInstance: IBulletWasmInstance, bodyPtr: number, linearDamping: number, angularDamping: number): void; getLinearDamping(wasmInstance: IBulletWasmInstance, bodyPtr: number): number; getAngularDamping(wasmInstance: IBulletWasmInstance, bodyPtr: number): number; setMassProps(wasmInstance: IBulletWasmInstance, bodyPtr: number, mass: number, localInertia: DeepImmutable): void; getMass(wasmInstance: IBulletWasmInstance, bodyPtr: number): number; getLocalInertia(wasmInstance: IBulletWasmInstance, bodyPtr: number): Vector3; translate(wasmInstance: IBulletWasmInstance, bodyPtr: number, translation: DeepImmutable): void; setLinearVelocity?(linearVelocity: DeepImmutable): void; setAngularVelocity?(angularVelocity: DeepImmutable): void; }