import { BoundingBox, Dimensions, Line3, Matrix4, Rectangle, Vector3 } from '@vertexvis/geometry';
import { UUID } from '@vertexvis/utils';
import * as CrossSectioning from './crossSectioning';
import { DepthBuffer } from './depthBuffer';
import { FeatureMap } from './featureMap';
import * as FrameCamera from './frameCamera';
import { Orientation } from './orientation';
import * as SceneViewSummary from './sceneViewSummary';
export declare class Frame {
    readonly correlationIds: string[];
    readonly temporalRefinementCorrelationId: string;
    readonly sequenceNumber: number;
    readonly dimensions: Dimensions.Dimensions;
    readonly image: FrameImage;
    readonly scene: FrameScene;
    readonly depthBufferBytes: Uint8Array | undefined;
    private readonly featureMapBytes;
    private readonly id;
    private cachedDepthBuffer?;
    private cachedFeatureMap?;
    constructor(correlationIds: string[], temporalRefinementCorrelationId: string, sequenceNumber: number, dimensions: Dimensions.Dimensions, image: FrameImage, scene: FrameScene, depthBufferBytes: Uint8Array | undefined, featureMapBytes: Uint8Array | undefined, id?: string);
    getId(): UUID.UUID;
    depthBuffer(): Promise<DepthBuffer | undefined>;
    private decodeDepthBuffer;
    featureMap(): Promise<FeatureMap | undefined>;
    private decodeFeatureMap;
    copy({ correlationIds, temporalRefinementCorrelationId, sequenceNumber, dimensions, image, scene, depthBufferBytes, featureMapBytes, }: {
        correlationIds?: string[];
        temporalRefinementCorrelationId?: string;
        sequenceNumber?: number;
        dimensions?: Dimensions.Dimensions;
        image?: FrameImage;
        scene?: FrameScene;
        depthBufferBytes?: Uint8Array;
        featureMapBytes?: Uint8Array;
    }): Frame;
}
export interface FrameImageLike {
    readonly imageAttr: ImageAttributesLike;
}
export interface ImageAttributesLike {
    readonly frameDimensions: Dimensions.Dimensions;
    readonly imageRect: Rectangle.Rectangle;
    readonly imageScale: number;
}
export declare class FrameImage implements FrameImageLike {
    readonly imageAttr: ImageAttributesLike;
    readonly imageBytes: Uint8Array;
    constructor(imageAttr: ImageAttributesLike, imageBytes: Uint8Array);
}
export declare class FrameScene {
    readonly camera: FrameCameraBase;
    readonly boundingBox: BoundingBox.BoundingBox;
    readonly crossSection: CrossSectioning.CrossSectioning;
    readonly worldOrientation: Orientation;
    readonly hasChanged: boolean;
    readonly sceneViewSummary: SceneViewSummary.SceneViewSummary;
    readonly modelViewId: UUID.UUID | undefined;
    constructor(camera: FrameCameraBase, boundingBox: BoundingBox.BoundingBox, crossSection: CrossSectioning.CrossSectioning, worldOrientation: Orientation, hasChanged: boolean, sceneViewSummary: SceneViewSummary.SceneViewSummary, modelViewId: UUID.UUID | undefined);
    copy({ camera, boundingBox, crossSection, worldOrientation, hasChanged, sceneViewSummary, modelViewId, }: Partial<{
        camera: FrameCameraBase;
        boundingBox: BoundingBox.BoundingBox;
        crossSection: CrossSectioning.CrossSectioning;
        worldOrientation: Orientation;
        hasChanged: boolean;
        sceneViewSummary: SceneViewSummary.SceneViewSummary;
        modelViewId: UUID.UUID | undefined;
    }>): FrameScene;
}
interface FrameCameraMatrices {
    readonly projectionMatrix: Matrix4.Matrix4;
    readonly projectionMatrixInverse: Matrix4.Matrix4;
    readonly projectionViewMatrix: Matrix4.Matrix4;
    readonly viewMatrix: Matrix4.Matrix4;
    readonly worldMatrix: Matrix4.Matrix4;
}
export declare class FrameCameraBase {
    readonly position: Vector3.Vector3;
    readonly lookAt: Vector3.Vector3;
    readonly up: Vector3.Vector3;
    readonly near: number;
    readonly far: number;
    readonly aspectRatio: number;
    protected cameraMatrices?: FrameCameraMatrices;
    constructor(position: Vector3.Vector3, lookAt: Vector3.Vector3, up: Vector3.Vector3, near: number, far: number, aspectRatio: number);
    get direction(): Vector3.Vector3;
    get viewVector(): Vector3.Vector3;
    get worldMatrix(): Matrix4.Matrix4;
    get viewMatrix(): Matrix4.Matrix4;
    get projectionMatrix(): Matrix4.Matrix4;
    get projectionMatrixInverse(): Matrix4.Matrix4;
    get projectionViewMatrix(): Matrix4.Matrix4;
    get frustumProjectionViewMatrix(): Matrix4.Matrix4;
    static fromBoundingBox(camera: FrameCamera.FrameCamera, boundingBox: BoundingBox.BoundingBox, aspectRatio: number): FrameCameraBase;
    /**
     * Returns whether this `FrameCameraBase` is an orthographic camera.
     */
    isOrthographic(): this is FrameOrthographicCamera;
    /**
     * Returns whether this `FrameCameraBase` is a perspective camera.
     */
    isPerspective(): this is FramePerspectiveCamera;
    /**
     * Checks if the given point, in world space, is behind the near plane
     * of the camera.
     *
     * @param world A point in world space.
     * @returns `true` if the point is behind the camera.
     */
    isPointBehindNear(world: Vector3.Vector3): boolean;
    /**
     * Returns a point on the near plane that intersects with `line`. If `line`
     * does not intersect, then `undefined` is returned.
     *
     * @param line The line to intersect.
     * @returns A point in world space, or `undefined` if the line does not
     * intersect with the near plane.
     */
    intersectLineWithNear(line: Line3.Line3): Vector3.Vector3 | undefined;
    protected computeCameraMatrices(): FrameCameraMatrices;
    protected updateCameraMatrices(cameraMatrices: FrameCameraMatrices): FrameCameraMatrices;
}
export interface FrameCameraWithMatrices extends FrameCameraBase {
    readonly direction: Vector3.Vector3;
    readonly viewVector: Vector3.Vector3;
    readonly worldMatrix: Matrix4.Matrix4;
    readonly viewMatrix: Matrix4.Matrix4;
    readonly projectionMatrix: Matrix4.Matrix4;
    readonly projectionMatrixInverse: Matrix4.Matrix4;
    readonly projectionViewMatrix: Matrix4.Matrix4;
}
export declare class FramePerspectiveCamera extends FrameCameraBase {
    readonly position: Vector3.Vector3;
    readonly lookAt: Vector3.Vector3;
    readonly up: Vector3.Vector3;
    readonly near: number;
    readonly far: number;
    readonly aspectRatio: number;
    readonly fovY: number;
    constructor(position: Vector3.Vector3, lookAt: Vector3.Vector3, up: Vector3.Vector3, near: number, far: number, aspectRatio: number, fovY: number);
    /**
     * Converts this `FramePerspectiveCamera` to a `FrameOrthographicCamera` using
     * the provided `boundingBox` to compute the viewing frustum.
     *
     * @param boundingBox The visible bounding box.
     */
    toOrthographic(boundingBox: BoundingBox.BoundingBox): FrameCameraBase;
    isPerspective(): this is FramePerspectiveCamera;
    protected computeCameraMatrices(): FrameCameraMatrices;
}
export declare class FrameOrthographicCamera extends FrameCameraBase {
    readonly lookAt: Vector3.Vector3;
    readonly up: Vector3.Vector3;
    readonly near: number;
    readonly far: number;
    readonly aspectRatio: number;
    readonly fovHeight: number;
    readonly rotationPoint?: Vector3.Vector3 | undefined;
    readonly top: number;
    readonly bottom: number;
    readonly right: number;
    readonly left: number;
    constructor(viewVector: Vector3.Vector3, lookAt: Vector3.Vector3, up: Vector3.Vector3, near: number, far: number, aspectRatio: number, fovHeight: number, rotationPoint?: Vector3.Vector3 | undefined);
    /**
     * Converts this `FrameOrthographicCamera` to a `FramePerspectiveCamera` using
     * the provided `boundingBox` to compute the near and far clipping planes.
     *
     * @param boundingBox The visible bounding box.
     */
    toPerspective(boundingBox: BoundingBox.BoundingBox): FrameCameraBase;
    isOrthographic(): this is FrameOrthographicCamera;
    get frustumProjectionViewMatrix(): Matrix4.Matrix4;
    protected computeCameraMatrices(): FrameCameraMatrices;
}
export {};
