/** * Camera projection utilities for screen/world coordinate conversion * and view fitting. Extracted from Camera class using composition pattern. */ import type { Vec3 } from './types.js'; import type { CameraInternalState } from './camera-controls.js'; /** * Handles projection math: screen-to-world and world-to-screen conversions, * bounding box fitting, and near/far plane management. */ export declare class CameraProjection { private readonly state; private readonly updateMatrices; constructor(state: CameraInternalState, updateMatrices: () => void); /** * Project a world position to screen coordinates * @param worldPos - Position in world space * @param canvasWidth - Canvas width in pixels * @param canvasHeight - Canvas height in pixels * @returns Screen coordinates { x, y } or null if behind camera */ projectToScreen(worldPos: Vec3, canvasWidth: number, canvasHeight: number): { x: number; y: number; } | null; /** * Unproject screen coordinates to a ray in world space * @param screenX - X position in screen coordinates * @param screenY - Y position in screen coordinates * @param canvasWidth - Canvas width in pixels * @param canvasHeight - Canvas height in pixels * @returns Ray origin and direction in world space */ unprojectToRay(screenX: number, screenY: number, canvasWidth: number, canvasHeight: number): { origin: Vec3; direction: Vec3; }; /** * Fit view to bounding box * Sets camera to southeast isometric view (typical BIM starting view) * Y-up coordinate system: Y is vertical */ fitToBounds(min: Vec3, max: Vec3): void; /** * Update near/far planes dynamically based on camera distance. * Now a no-op since updateMatrices() handles this automatically. * Kept for API compatibility with CameraAnimator. */ updateNearFarPlanes(_distance: number): void; } //# sourceMappingURL=camera-projection.d.ts.map