import { type Vec2 } from '../source'; import type { FacadeLanes, LinearRgb } from './facade'; export type Vec3 = [number, number, number]; export interface FaceAttr { lanes: FacadeLanes; color: LinearRgb; } export declare class MeshBuilder { readonly origin: Vec2; readonly positions: number[]; readonly normals: number[]; readonly uvs: number[]; readonly facade: number[]; readonly colors: number[]; readonly indices: number[]; constructor(origin?: Vec2); get vertexCount(): number; get triangleCount(): number; vertex(p: Vec3, n: Vec3, uv: Vec2, attr: FaceAttr): number; tri(a: number, b: number, c: number): void; /** * A planar polygon seen from above with a height per point. `up` = true gives the normal +Y side (counter-clockwise from * above); false emits the underside. Triangulated in plan, so it may be concave and have holes. */ planPolygon(outer: readonly Vec2[], holes: readonly (readonly Vec2[])[], yAt: (x: number, z: number) => number, attr: FaceAttr, up?: boolean, uvOrigin?: Vec2): void; /** * One wall face over the ring edge p0 -> p1 (outward normal = (-dz, 0, dx), the right-hand side seen from above): from * `yBottom` up to a top profile of (t along the edge 0..1, y) points, left to right. u is metres along the perimeter * (`uStart` at p0) and v is metres up from `vBase`. */ wall(p0: Vec2, p1: Vec2, yBottom: number, top: ReadonlyArray, vBase: number, uStart: number, attr: FaceAttr): void; } export declare function triangleNormal(a: Vec3, b: Vec3, c: Vec3): Vec3; /** Whether a ring (plan) is wound counter-clockwise from above; re-exported for the emitters. */ export declare const isCcw: (ring: readonly Vec2[]) => boolean;