import type { XYPoint } from "../utils/types.ts"; import type { Vector2d } from "./vector2d.ts"; /** * Normalize a vertex array to fit within a unit cube centered at the origin. * Vertices are scaled uniformly so that the largest axis spans [-0.5, 0.5]. * Modifies the array in place. * @param vertices - vertex positions as x,y,z triplets */ export declare function normalizeVertices(vertices: Float32Array): void; /** * Project 3D vertices through a 4x4 matrix with perspective divide, * mapping the result to a 2D display area. * @param src - source vertex positions (x,y,z triplets) * @param dst - destination array (x,y,z triplets, written in place) * @param count - number of vertices to project * @param matrix - 4x4 matrix values (column-major, 16 elements) * @param width - display width to map projected x to * @param height - display height to map projected y to * @param offsetX - x offset added to each projected vertex * @param offsetY - y offset added to each projected vertex * @param zScale - scale factor for Z output (0 = don't compute Z) */ export declare function projectVertices(src: Float32Array, dst: Float32Array, count: number, matrix: Float32Array, width: number, height: number, offsetX?: number, offsetY?: number, zScale?: number): void; /** * Compute the averaged perpendicular normal at a vertex in a 2D polyline. * At interior vertices, normals from both adjacent edges are averaged * to produce a smooth miter direction. * @param points - the polyline vertices * @param index - the vertex index * @param out - output object to write into (avoids allocation) * @returns unit normal */ export declare function computeVertexNormal(points: XYPoint[], index: number, out?: XYPoint): XYPoint; /** * Compute the convex hull of a set of 2D points using the Graham scan algorithm. * The input array is sorted in place. Returns a subset of the input points * forming the convex hull in counter-clockwise order. * @param points - array of 2D points (modified in place by sorting) * @returns convex hull vertices in CCW order */ export declare function convexHull(points: Vector2d[]): Vector2d[]; //# sourceMappingURL=vertex.d.ts.map