Frustum

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

This class is mainly intended for use internally by a renderer for calculating a camera or shadowCamera's frustum.

Constructor

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

p0 - (optional) defaults to a new Plane.
p1 - (optional) defaults to a new Plane.
p2 - (optional) defaults to a new Plane.
p3 - (optional) defaults to a new Plane.
p4 - (optional) defaults to a new Plane.
p5 - (optional) defaults to a new Plane.

Creates a new Frustum.

Properties

.planes : Array

Array of 6 planes.

Methods

.clone () : Frustum

Return a new Frustum with the same parameters as this one.

.containsPoint (point : Vector3) : Boolean

point - Vector3 to test.

Checks to see if the frustum contains the point.

.copy (frustum : Frustum) : Frustum

frustum - The frustum to copy

Copies the properties of the passed frustum into this one.

.intersectsBox (box : Box3) : Boolean

box - Box3 to check for intersection.

Return true if box intersects with this frustum.

.intersectsObject (object : Object3D) : Boolean

Checks whether the object's bounding sphere is intersecting the Frustum.

Note that the object must have a Geometry or BufferGeometry so that the bounding sphere can be calculated.

.intersectsSphere (sphere : Sphere) : Boolean

sphere - Sphere to check for intersection.

Return true if sphere intersects with this frustum.

.intersectsSprite (sprite : Sprite) : Boolean

Checks whether the sprite is intersecting the Frustum.

.set (p0 : Plane, p1 : Plane, p2 : Plane, p3 : Plane, p4 : Plane, p5 : Plane) : Frustum

Sets the current frustum from the passed planes. No plane order is implicitely implied.

.setFromMatrix (matrix : Matrix4) : Frustum

matrix - Matrix4 used to set the planes

This is used by the WebGLRenderer to set up the Frustum from a Camera's projectionMatrix and matrixWorldInverse.

Source

For more info on how to obtain the source code of this module see this page.