import { MatN } from './matn.js'; import { Rotor4 } from './rotor4.js'; import { VecN } from './vecn.js'; /** * Pluggable rotation representations. The dense matrix is the * dimension-generic baseline; Rotor4 is the optimized 4D fast path. */ export type RotationBackend = MatN | Rotor4; /** * A rigid (or affine, if the rotation matrix is not orthonormal) transform * in ℝⁿ: `p ↦ R · p + t`. * * Stored as an explicit rotation/position pair rather than an (n+1)×(n+1) * homogeneous matrix; the pair form is easier to keep numerically clean * (each backend has its own cheap drift repair) and homogeneous coordinates * only become necessary at the projective camera stage. */ export declare class TransformN { readonly dim: number; rotation: RotationBackend; position: VecN; /** * Composes a rotation and a translation into a rigid motion of Rⁿ. * * @param dim - Ambient dimension. Every other argument is checked against * it, so a transform cannot be built from parts of differing dimension. * @param rotation - Rotation, as a dense `MatN` or — at n = 4 — a `Rotor4`. * The rotor is the faster path and does not drift off the rotation manifold * under repeated composition. Defaults to the identity. * @param position - Translation applied after the rotation. Defaults to the * origin. * * @example * ```ts * const spin = new TransformN(4, rotationFromPlanes(4, [{ i: 0, j: 3, angle: 0.4 }])); * const placed = new TransformN(4, Rotor4.identity(), new VecN([0, 0, 0, 2])); * ``` */ constructor(dim: number, rotation?: RotationBackend, position?: VecN); static identity(dim: number): TransformN; clone(): TransformN; applyToPoint(p: VecN, out?: VecN): VecN; /** * Transforms `count` packed n-points from `src` into `dst` * (`src` and `dst` must not alias when the rotation is a matrix). */ applyToPositions(src: Float64Array, dst: Float64Array, count: number): void; /** * The inverse rigid transform: `p ↦ R⁻¹ · (p − t)`. Assumes the rotation * is orthonormal (matrix backend inverts by transpose). */ inverse(): TransformN; /** Returns `this ∘ child` (child applied first): parent-child composition. */ compose(child: TransformN): TransformN; } /** Dense matrix form of any rotation backend. */ export declare function rotationMatrix(rotation: RotationBackend): MatN; //# sourceMappingURL=transform.d.ts.map