import { Box3, PerspectiveCamera, Quaternion, Vector3 } from 'three'; /** * Helper methods for implementing a camera manager. */ export declare class CameraManagerHelper { /** * @deprecated usage of mutable static variables is unsafe * Reusable buffers used by updateNearAndFarPlane function to avoid allocations. */ private static readonly _updateNearAndFarPlaneBuffers; /** * @deprecated usage of mutable static variables is unsafe * @private */ private static readonly _calculateCameraFarBuffers; private readonly _instanceUpdateNearAndFarPlaneBuffers; private readonly _instanceCalculateCameraFarBuffers; /** * Calculates camera target based on new camera rotation. * @param camera Used camera instance. * @param rotation New camera rotation in quaternion form. * @param currentTarget Current camera target. * @param position New camera position. * @returns */ static calculateNewTargetFromRotation(camera: PerspectiveCamera, rotation: Quaternion, currentTarget: Vector3, position: Vector3): Vector3; /** * Calculates camera rotation from target * @param camera Used Camera instance * @param newTarget The target to compute rotation from * @returns New camera rotationg */ static calculateNewRotationFromTarget(camera: PerspectiveCamera, newTarget: Vector3): Quaternion; /** * Updates near and far plane of the camera based on the bounding box. * @param camera Used camera instance. * @param boundingBox Bounding box of all objects on the scene. * @deprecated use instance method instead */ static updateCameraNearAndFar(camera: PerspectiveCamera, boundingBox: Box3): void; /** * Updates near and far plane of the camera based on the bounding box. * @param camera Used camera instance. * @param boundingBox Bounding box of all objects on the scene. */ updateCameraNearAndFar(camera: PerspectiveCamera, boundingBox: Box3): void; /** * Calculates camera position and target that allows to see the content of provided bounding box. * @param camera Used camera instance. * @param boundingBox Bounding box to be fitted. * @param radiusFactor The ratio of the distance from camera to center of box and radius of the box. * @returns */ static calculateCameraStateToFitBoundingBox(camera: PerspectiveCamera, boundingBox: Box3, radiusFactor?: number): { position: Vector3; target: Vector3; }; private static updateCameraNearAndFarInternal; private static calculateCameraFar; private static calculateCameraNear; private static getBoundingBoxCorners; }