/** Column-major 4x4 multiply (glTF convention): out = a * b. */ export declare function mul4(a: readonly number[], b: readonly number[]): number[]; /** Full 4x4 inverse (column-major), via cofactor expansion (gl-matrix). Throws on a singular matrix. */ export declare function invert4(m: readonly number[]): number[]; /** Transform a point (w=1) by a column-major 4x4; returns [x,y,z] (affine, no perspective divide). */ export declare function transformPoint(m: readonly number[], p: readonly [number, number, number]): [number, number, number]; /** Transform a direction (w=0) by the upper 3x3 of a column-major 4x4 (no translation). */ export declare function transformDir(m: readonly number[], d: readonly [number, number, number]): [number, number, number]; /** * Strips scale from a column-major TRS matrix: normalizes the three basis columns (leaving pure * rotation) and keeps the translation. Used to build scale-free world frames for retargeting, so a * rig authored at a non-unit armature scale (e.g. Meshy's 0.01) doesn't leak its scale into the * rest-to-rest delta. */ export declare function rigidize(m: readonly number[]): number[]; export type Vec3 = readonly [number, number, number]; export declare const sub3: (a: Vec3, b: Vec3) => [number, number, number]; export declare const dot3: (a: Vec3, b: Vec3) => number; export declare const cross3: (a: Vec3, b: Vec3) => [number, number, number]; export declare function normalize3(a: Vec3): [number, number, number]; /** * Builds an orthonormal world frame (column-major 4x4) from a bone's geometric DIRECTION and position, * NOT its stored local axes — the key to convention-free retargeting. The primary column X = `axis` * (the bone's world direction); a roll reference (world-up, or world-forward when the axis is * near-vertical) is Gram-Schmidt'd against X for Y; Z = X×Y. Building this identically for the source * and target rigs makes frameDst·frameSrc⁻¹ cancel the bone-axis convention, leaving only the real * direction/pose/position difference. */ export declare function frameFromAxis(axis: Vec3, pos: Vec3): number[]; /** * Minimal (shortest-arc) rotation taking direction `from` onto direction `to`, as a column-major 4x4 * with zero translation. Unlike frameFromAxis pairs, it adds NO roll about the target axis — the roll * DOF a bone direction can't express stays untouched. Antiparallel inputs get a π turn about an * arbitrary perpendicular axis. */ export declare function shortestArc4(from: Vec3, to: Vec3): number[];