PerspectiveOffCenterFrustum

open external class PerspectiveOffCenterFrustum(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 PerspectiveOffCenterFrustum({
left : -1.0,
right : 1.0,
top : 1.0,
bottom : -1.0,
near : 1.0,
far : 100.0
});

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
external var bottom: Double?

Defines the bottom clipping plane.

Link copied to clipboard
external var far: Double

The distance of the far plane.

Link copied to clipboard

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

Link copied to clipboard
external var left: Double?

Defines the left clipping plane.

Link copied to clipboard
external var near: Double

The distance of the near plane.

Link copied to clipboard

Gets the perspective projection matrix computed from the view frustum. The projection matrix will be recomputed if any frustum parameters have changed.

Link copied to clipboard
external var right: Double?

Defines the right clipping plane.

Link copied to clipboard
external var top: Double?

Defines the top clipping plane.

Functions

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

Returns a duplicate of a PerspectiveOffCenterFrustum instance.

Link copied to clipboard
external fun computeCullingVolume(position: Cartesian3, direction: Cartesian3, up: Cartesian3): CullingVolume

Creates a culling volume for this frustum.

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

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

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

Returns the pixel's width and height in meters.