import type { Vec3 } from './vehicleMath'; export interface Overlay { polys: Array<{ pts: Vec3[]; fill: string; opacity: number; stroke?: string; }>; lines: Array<{ pts: Vec3[]; stroke: string; width: number; }>; dots: Array<{ p: Vec3; r: number; fill: string; }>; legend: Array<{ colour: string; text: string; }>; } export declare const emptyOverlay: () => Overlay; /** Penetration: the cluster's points red over the clashing mesh's triangles within `reach` of the clash, translucent cyan. */ export declare function penetrationOverlay(points: Vec3[], centroid: Vec3, cabin: { tris: ArrayLike; mesh: ArrayLike; names: string[]; } | null, meshName: string | null, legend: { body: string; mesh: string; }, reach?: number, maxTris?: number): Overlay; /** * Wheel cross-section: the tyre circle at its centre plane, the body's section in the plane across the tread where it * reaches deepest into the tyre, and, per 2 degree sector, the part of the tyre the body reaches into in ANY of five * planes across the tread (the arch lip intrudes at the outer shoulder, not at the centre plane), filled red: from the * body's innermost point (outside the rim barrel) out to the tyre's radius. Returns the overlay and the deepest intrusion. */ export declare function wheelSectionOverlay(centre: Vec3, axle: Vec3, radius: number, bodyTris: ArrayLike, hubZoneFraction?: number, legend?: { tyre: string; body: string; overlap: string; }, width?: number): { overlay: Overlay; maxIntrusionM: number; sectors: number; }; /** Every 3D point an overlay needs projected, flat, in a fixed order (see `renderOverlay`). */ export declare function overlayPoints(o: Overlay): number[]; export interface Projection { /** NDC x, y, z per overlay point, in `overlayPoints` order. */ ndc: number[]; /** The canvas rect inside its frame, and the frame's offset in the page (CSS px). */ rect: { left: number; top: number; width: number; height: number; }; frameOffset: { x: number; y: number; }; /** Captured image px per CSS px. */ scale: number; } /** The overlay as an SVG of the captured image's size. Points behind the camera are dropped (and polys touching them). */ export declare function overlaySvg(o: Overlay, pr: Projection, width: number, height: number): string; /** Draw the overlay onto the captured JPEG in place. Returns how many of its points landed in front of the camera. */ export declare function annotateFrame(file: string, o: Overlay, pr: Projection): Promise<{ drawn: number; total: number; }>;