PerspectiveFrustum

external class PerspectiveFrustum(source)

The viewing frustum is defined by 6 planes. Each plane is represented by a Cartesian4 object, where the x, y, and z components define the unit vector normal to the plane, and the w component is the distance of the plane from the origin/camera position.

const frustum = new PerspectiveFrustum({
fov : Math.PI_OVER_THREE,
aspectRatio : canvas.clientWidth / canvas.clientHeight
near : 1.0,
far : 1000.0
});

See also

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard

Properties

Link copied to clipboard

The aspect ratio of the frustum's width to it's height.

Link copied to clipboard
var far: Double

The distance of the far plane.

Link copied to clipboard
var fov: Double?

The angle of the field of view (FOV), in radians. This angle will be used as the horizontal FOV if the width is greater than the height, otherwise it will be the vertical FOV.

Link copied to clipboard
val fovy: Double?

Gets the angle of the vertical field of view, in radians.

Link copied to clipboard

The perspective projection matrix computed from the view frustum with an infinite far plane.

Link copied to clipboard

The distance of the near plane.

Link copied to clipboard

Gets the perspective projection matrix computed from the view frustum. If necessary, the projection matrix will be recomputed.

Link copied to clipboard

Offsets the frustum in the x direction.

Link copied to clipboard

Offsets the frustum in the y direction.

Functions

Link copied to clipboard
fun clone(result: PerspectiveFrustum? = definedExternally): PerspectiveFrustum

Returns a duplicate of a PerspectiveFrustum instance.

Link copied to clipboard

Creates a culling volume for this frustum.

Link copied to clipboard
fun equalsEpsilon(other: PerspectiveFrustum, relativeEpsilon: Double, absoluteEpsilon: Double? = definedExternally): Boolean

Compares the provided PerspectiveFrustum componentwise and returns true if they pass an absolute or relative tolerance test, false otherwise.

Link copied to clipboard
fun getPixelDimensions(drawingBufferWidth: Double, drawingBufferHeight: Double, distance: Double, pixelRatio: Double, result: Cartesian2): Cartesian2

Returns the pixel's width and height in meters.