Skip to main content

flywave-mapview.camerautils

Home > @flywave/flywave-mapview > CameraUtils

CameraUtils namespace

Signature:

export declare namespace CameraUtils 

Functions

Function

Description

convertScreenToWorldSize(focalLength, distance, screenSize)

(BETA) Calculates object's world size based on the focal length and it's camera distance.

convertWorldToScreenSize(focalLength, distance, worldSize)

(BETA) Calculates object's screen size based on the focal length and it's camera distance.

getBottomFov(camera)

(BETA) Returns bottom fov angle for a given perspective camera.

getFocalLength(camera)

(BETA) Returns the camera's focal length.

getHorizontalFov(camera)

Returns the camera's horizontal field of view.

getLeftFov(camera)

(BETA) Returns left fov angle for a given perspective camera.

getPrincipalPoint(camera, result)

(BETA) Returns the camera's principal point (intersection of principal ray and image plane) in NDC coordinates.

getRightFov(camera)

(BETA) Returns right fov angle for a given perspective camera.

getTopFov(camera)

(BETA) Returns top fov angle for a given perspective camera.

getVerticalFov(camera)

Returns the camera's vertical field of view.

setFocalLength(camera, focalLength, viewportHeight)

(BETA) Sets a camera's focal length.

setPrincipalPoint(camera, ndcCoords)

(BETA) Sets the camera's principal point (intersection of principal ray and image plane) in NDC coordinates.

setVerticalFov(camera, verticalFov, viewportHeight)

(BETA) Sets a camera's vertical fov.