import { Bounds, Cap, Frame, HeadOptions, Lobe, Mat3, Projection, RingOptions, RingPoint, Silhouette, Vec3, Wobble } from "./types.js"; //#region src/head.d.ts declare class Head { rx: number; ry: number; rz: number; lobes: Lobe[]; wobble: Wobble[]; cx: number; cy: number; scale: number; focal: number; yaw: number; pitch: number; roll: number; R: Mat3; private _cache; constructor(opts?: HeadOptions); orient(yaw?: number, pitch?: number, roll?: number): this; /** Unit sphere direction for a longitude/latitude pair. */ dir(u: number, v: number): Vec3; /** Radial multiplier from the lobes: this is what makes skulls pear-shaped. */ bulge(d: Vec3): number; /** Smooth low-frequency drift, keyed to the *skull* so it rotates with it. */ drift(d: Vec3): number; /** * Surface point in head-local space. `lift` pushes out along the normal. * The drift is folded in here, not painted on the outline afterwards -- * otherwise the ears end up floating half an inch off the head. */ local(d: Vec3, lift?: number, grow?: number): Vec3; normal(d: Vec3): Vec3; /** Local point -> screen, with a gentle perspective divide. */ project(p: Vec3): Projection; /** * A local drawing frame glued to the skull at (u, v). * * `map(a, b, c)` takes feature-space coordinates -- a across the face, * b down the face, c out of the face -- and returns screen pixels. Draw a * feature once in that space and it behaves correctly from every angle. */ frame(u: number, v: number, lift?: number): Frame; /** * The occluding contour. * * The screen shadow of an ellipsoid is the image of the unit circle lying in * the plane perpendicular to the view-null direction, so the outline is exact * rather than sampled -- and because every contour point remembers which * skull direction produced it, the hand-drawn wobble stays welded to the * skull instead of swimming across the screen as the head turns. */ silhouette(segments?: number, grow?: number): Silhouette; /** Screen-space bounding box of the outline. */ bounds(grow?: number): Bounds; /** * A latitude ring around the skull -- a hairline, a hatband, an eyepatch * strap. Only the forward-facing part is real; the rest is behind the head. * `vAt(theta)` lets a hairline dip and peak instead of running dead level. */ ring({ v, axis, grow, lift, segments, vAt }: RingOptions): RingPoint[]; /** * A cap region: everything above (or below) a line drawn around the skull, * closed off by the skull's own outline. This is how hair, hats, beards and * masks get built -- front edge from the visible arc of the ring, back edge * from the silhouette -- so they wrap the head correctly at any angle. */ cap(opts?: RingOptions): Cap; /** Convenience: is a feature at (u,v) worth drawing at all? */ visibleAt(u: number, v: number, threshold?: number): boolean; } //#endregion export { Head, Head as default };