Frustum

class Frustum(p0: Plane = Plane(), p1: Plane = Plane(), p2: Plane = Plane(), p3: Plane = Plane(), p4: Plane = Plane(), p5: Plane = Plane())

Frustums are used to determine what is inside the camera's field of view. They help speed up the rendering process. Objects which lie outside a camera's frustum can safely be excluded from rendering.

This class is mainly intended for use internally by a renderer.

Frustums are mutable and not thread-safe; confine an instance (and any object graph holding it) to a single thread, exactly as in three.js.

The constructor stores the given Plane instances by reference.

Parameters

p0

The first plane that encloses the frustum.

p1

The second plane that encloses the frustum.

p2

The third plane that encloses the frustum.

p3

The fourth plane that encloses the frustum.

p4

The fifth plane that encloses the frustum.

p5

The sixth plane that encloses the frustum.

Constructors

Link copied to clipboard
constructor(p0: Plane = Plane(), p1: Plane = Plane(), p2: Plane = Plane(), p3: Plane = Plane(), p4: Plane = Plane(), p5: Plane = Plane())

Properties

Link copied to clipboard

This array holds the planes that enclose the frustum.

Functions

Link copied to clipboard
fun clone(): Frustum

Returns a new frustum with copied values from this instance.

Link copied to clipboard

Returns true if the given point lies within the frustum.

Link copied to clipboard
fun copy(frustum: Frustum): Frustum

Copies the values of the given frustum to this instance.

Link copied to clipboard

Returns true if the given bounding box is intersecting this frustum.

Link copied to clipboard

Returns true if the given bounding sphere is intersecting this frustum.

Link copied to clipboard
fun set(p0: Plane, p1: Plane, p2: Plane, p3: Plane, p4: Plane, p5: Plane): Frustum

Sets the frustum planes by copying the given planes.

Link copied to clipboard
fun setFromProjectionMatrix(m: Matrix4, coordinateSystem: CoordinateSystem = CoordinateSystem.WebGL, reversedDepth: Boolean = false): Frustum

Sets the frustum planes from the given projection matrix.