Capítulo 346 de 859

Chapter 346: Frustum

Core Idea

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.

Key Concepts

  • planes : Array.<Plane>: This array holds the planes that enclose the frustum.

Reference Tables

Constructor

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

Properties

PropertyDescription
.planes : Array.<Plane>This array holds the planes that enclose the frustum.

Methods

MethodDescription
.clone() : FrustumReturns a new frustum with copied values from this instance.
.containsPoint( point : Vector3 ) : booleanReturns true if the given point lies within the frustum.
.copy( frustum : Frustum ) : FrustumCopies the values of the given frustum to this instance.
.intersectsBox( box : Box3 ) : booleanReturns true if the given bounding box is intersecting this frustum.
.intersectsObject( object : Object3D ) : booleanReturns true if the 3D object's bounding sphere is intersecting this frustum.
.intersectsSphere( sphere : Sphere ) : booleanReturns true if the given bounding sphere is intersecting this frustum.
.intersectsSprite( sprite : Sprite ) : booleanReturns true if the given sprite is intersecting this frustum.
.set( p0 : Plane, p1 : Plane, p2 : Plane, p3 : Plane, p4 : Plane, p5 : Plane ) : FrustumSets the frustum planes by copying the given planes.
`.setFromProjectionMatrix( m : Matrix4, coordinateSystem : WebGLCoordinateSystemWebGPUCoordinateSystem, reversedDepth : boolean ) : Frustum`

Key Takeaways

  1. Most relevant properties: planes.
  2. Key methods: clone, containsPoint, copy, intersectsBox.

Connects To