import { Dimensions, Matrix4, Point, Ray, Rectangle, Vector3 } from '@vertexvis/geometry';
import { DepthBuffer } from './depthBuffer';
import type { FrameCameraBase, FrameImageLike } from './frame';
/**
 * A `Viewport` represents the drawing area in the viewer.
 *
 * When a frame is received from the rendering pipeline, it might not be the
 * same dimensions of the viewport because of an interactive frame or because of
 * bandwidth limitations or other performance reasons.
 *
 * The viewport contains methods to scale an image to the viewport, as well as
 * translate 2D coordinates between the viewport and the frame.
 */
export declare class Viewport implements Dimensions.Dimensions {
    /**
     * The width of the viewport.
     */
    readonly width: number;
    /**
     * The height of the viewport.
     */
    readonly height: number;
    /**
     * The center point of the viewport.
     */
    readonly center: Point.Point;
    constructor(
    /**
     * The width of the viewport.
     */
    width: number, 
    /**
     * The height of the viewport.
     */
    height: number);
    /**
     * Returns a new viewport with the given dimensions.
     * @param dimensions The dimensions of the viewport
     * @returns A new viewport.
     */
    static fromDimensions(dimensions: Dimensions.Dimensions): Viewport;
    /**
     * Transforms a normalized device coordinate to a 2D point within the
     * viewport.
     *
     * @param ndc A 2D point in NDC.
     * @returns A 2D point in the coordinate space of the viewport.
     */
    transformNdcPointToViewport(ndc: Point.Point): Point.Point;
    /**
     * Transforms a normalized device coordinate to a 2D point within the
     * viewport.
     *
     * @param ndc A 3D point in NDC.
     * @returns A 2D point in the coordinate space of the viewport.
     */
    transformVectorToViewport(ndc: Vector3.Vector3): Point.Point;
    /**
     * Transforms a world point to 2D point in viewport space.
     *
     * @param worldPt The world point to transform.
     * @param projectionViewMatrix The projection matrix to transform a 3D point to 2D point.
     * @returns A point in viewport space.
     */
    transformWorldToViewport(worldPt: Vector3.Vector3, projectionViewMatrix: Matrix4.Matrix4): Point.Point;
    transformPointToViewport(pt: Point.Point, image: FrameImageLike): Point.Point;
    /**
     * Transforms a point in viewport coordinate space to a point in a frame's
     * coordinate space.
     *
     * @param pt A point in viewport coordinate space.
     * @param image An image of a frame.
     * @returns A point in the coordinate space of the frame.
     */
    transformPointToFrame(pt: Point.Point, image: FrameImageLike): Point.Point;
    /**
     * Transforms a point in viewport coordinates to a point in world space
     * coordinates. This method expects a depth buffer in order to compute a value
     * for the Z axis.
     *
     * @param pt A point in viewport coordinates.
     * @param depthBuffer A depth buffer for computing the Z axis.
     * @param fallbackNormalizedDepth A fallback value if the depth is the max
     *   depth value, or cannot be determined.
     * @returns
     */
    transformPointToWorldSpace(pt: Point.Point, depthBuffer: DepthBuffer, fallbackNormalizedDepth?: number): Vector3.Vector3;
    /**
     * Transforms a point in viewport coordinates to a ray.
     *
     * For perspective cameras, the returned ray will have an
     * origin that is at the position of the camera with a direction
     * that is pointing into world space away from the camera.
     *
     * For orthographic cameras, the returned ray will have an
     * origin that is at the world point of viewport coordinate
     * with a direction that is pointing into world space away
     * from the camera.
     *
     * @param pt A point in viewport coordinates.
     * @param image An image of a frame.
     * @param camera A camera used to determine orientation of the scene.
     * @returns A ray
     */
    transformPointToRay(pt: Point.Point, image: FrameImageLike, camera: FrameCameraBase): Ray.Ray;
    /**
     * Maps a screen point to normalized device coordinates (NDC). A screen point
     * at 0,0 represents the top-left of the viewport.
     *
     * @param screenPt A screen point.
     */
    transformScreenPointToNdc(screenPt: Point.Point, image: FrameImageLike): Point.Point;
    /**
     * Computes a rectangle that is scaled correctly to be drawn within the
     * viewport.
     *
     * @param image The image to be drawn.
     * @param imageDimensions The dimensions of the received image.
     * @returns A rectangle.
     */
    calculateDrawRect(image: FrameImageLike): Rectangle.Rectangle;
    private calculateFrameScale;
    get dimensions(): Dimensions.Dimensions;
}
