Frustum

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 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

pointVector3 to test.

Checks to see if the frustum contains the point.

.copy(frustum : Frustum) → this

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 so that the bounding sphere can be calculated.

.intersectsSphere(sphere : Sphere) → Boolean

sphereSphere 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) → this

Sets the frustum from the passed planes. No plane order is implied.
Note that this method only copies the values from the given objects.

.setFromProjectionMatrix(matrix : Matrix4) → this

matrix — Projection Matrix4 used to set the planes.

Sets the frustum planes from the projection matrix.

Source

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