File: Frustum.md | Updated: 11/15/2025
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.
Constructs a new frustum.
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.
This array holds the planes that enclose the frustum.
Returns a new frustum with copied values from this instance.
Returns: A clone of this instance.
Returns true if the given point lies within the frustum.
point | The point to test.
---|---
Returns: Whether the point lies within this frustum or not.
Copies the values of the given frustum to this instance.
frustum | The frustum to copy.
---|---
Returns: A reference to this frustum.
Returns true if the given bounding box is intersecting this frustum.
box | The bounding box to test.
---|---
Returns: Whether the bounding box is intersecting this frustum or not.
Returns true if the 3D object's bounding sphere is intersecting this frustum.
Note that the 3D object must have a geometry so that the bounding sphere can be calculated.
object | The 3D object to test.
---|---
Returns: Whether the 3D object's bounding sphere is intersecting this frustum or not.
Returns true if the given bounding sphere is intersecting this frustum.
sphere | The bounding sphere to test.
---|---
Returns: Whether the bounding sphere is intersecting this frustum or not.
Returns true if the given sprite is intersecting this frustum.
sprite | The sprite to test.
---|---
Returns: Whether the sprite is intersecting this frustum or not.
Sets the frustum planes by copying the given planes.
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.
Returns: A reference to this frustum.
Sets the frustum planes from the given projection matrix.
m | The projection matrix.
---|---
coordinateSystem | The coordinate system.
reversedDepth | Whether to use a reversed depth. Default is false.
Returns: A reference to this frustum.