import type { Vec3, RenderBounds } from "./bounds.js"; /** 3D perspective camera (the default game camera). */ export interface PerspectiveView { readonly kind: "perspective"; readonly position: Vec3; readonly target: Vec3; readonly up?: Vec3; /** Vertical field of view in degrees. Default 55. */ readonly fovDeg?: number; /** Width / height. Default 16 / 9. */ readonly aspect?: number; readonly near?: number; readonly far?: number; } /** 2D / orthographic camera (top-down, side-scroller, minimap). */ export interface OrthographicView { readonly kind: "orthographic"; readonly position: Vec3; readonly target: Vec3; readonly up?: Vec3; readonly halfWidth: number; readonly halfHeight: number; readonly near?: number; readonly far?: number; } export type CameraView = PerspectiveView | OrthographicView; export interface Frustum { /** 6 inward-facing planes, packed [nx,ny,nz,d] × 6. A point p is inside plane i when nx·px+ny·py+nz·pz+d ≥ 0. */ readonly planes: Float64Array; /** 8 world corners, packed xyz × [ntl,ntr,nbl,nbr,ftl,ftr,fbl,fbr]. */ readonly corners: Float64Array; minX: number; minY: number; minZ: number; maxX: number; maxY: number; maxZ: number; } /** @internal */ export declare function createFrustum(): Frustum; /** @internal */ export declare function updateFrustum(out: Frustum, view: CameraView): Frustum; /** Conservative AABB-vs-frustum: never a false negative (may keep a corner-case that is truly outside). * @internal */ export declare function aabbInFrustum(f: Frustum, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): boolean; /** @internal */ export declare function sphereInFrustum(f: Frustum, cx: number, cy: number, cz: number, radius: number): boolean; /** Sphere broad-phase reject, then the tight AABB test. Both conservative. * @internal */ export declare function boundsInFrustum(f: Frustum, b: RenderBounds): boolean; /** Push every plane outward by `margin` (unit normals ⇒ d += margin) to form a preload/hysteresis region. * @internal */ export declare function dilateFrustum(src: Frustum, margin: number, out: Frustum): Frustum;