import { type Ring, type Vec2 } from '../../source'; import { type PolygonWithHoles } from './poly'; export interface FootprintOptions { /** Raster cell, metres. Default adapts to the mesh: 0.25 m, coarser only when the mesh is huge. */ cellM?: number; /** An enclosed gap smaller than this is a gap in the roof, not a courtyard, and is filled. */ minHoleM2?: number; /** A separate roof island smaller than this is a prop, not a building volume, and is dropped. */ minPartM2?: number; /** Most disjoint volumes kept besides the main one. */ maxParts?: number; /** Up-facing means the triangle normal's y component is above this. */ upFacing?: number; } export interface FootprintPart extends PolygonWithHoles { /** Highest vertex of the roof triangles that make this volume, relative to the prefab origin. */ heightM: number; areaM2: number; } export interface MeshFootprint { /** The largest volume. */ main: FootprintPart; /** Other disjoint volumes, largest first. */ parts: FootprintPart[]; /** Highest vertex of the whole mesh, relative to the prefab origin. */ heightM: number; /** Lowest vertex of the whole mesh. */ minYM: number; /** `raster` is the normal path. `hull` and `box` are fallbacks and say so in the report. */ method: 'raster' | 'hull' | 'box'; /** Specks (roof islands under `minPartM2`) and parts beyond `maxParts` that were dropped. */ dropped: number; /** Cells added to repair diagonal-only contacts. */ repairedCells: number; } /** `positions` is xyz triplets in prefab-local metres (y up); `indices` lists triangles. */ export declare function meshFootprint(positions: ArrayLike, indices: ArrayLike, options?: FootprintOptions): MeshFootprint | null; export interface PlacedFootprint { ring: Ring; holes: Ring[]; } /** Rotate a prefab-local polygon by `yawRad` about +Y (three.js `rotation.y`) and move it to `position` (x, z). */ export declare function placeFootprint(polygon: PolygonWithHoles, yawRad: number, position: Vec2): PlacedFootprint;