Skip to main content

flywave-mapview.camerautils.getprincipalpoint

Home > @flywave/flywave-mapview > CameraUtils > getPrincipalPoint

CameraUtils.getPrincipalPoint() function

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

Signature:

function getPrincipalPoint(camera: THREE.PerspectiveCamera, result?: Vector2Like): Vector2Like;

Parameters

Parameter

Type

Description

camera

THREE.PerspectiveCamera

The camera.

result

Vector2Like

(Optional) Optional vector where the principal point coordinates will be copied.

Returns:



Vector2Like

A vector containing the principal point NDC coordinates.

## Remarks

This point coincides with the principal vanishing point. By default it's located at the image center (NDC coords \[0,0\]), and the resulting projection is centered or symmetric. But it may be offset (<!-- -->@<!-- -->see THREE.PerspectiveCamera.setViewOffset) for some use cases such as multiview setups (e.g. stereoscopic rendering), resulting in an asymmetric perspective projection.