CSMFrustum

This class is mainly intended for use internally by DirectionalLightShadowCSM for calculating subfrustums.

Constructor

CSMFrustum()

Creates a new CSMFrustum.

Properties

.vertices : Object

Contains 8 points forming the frustum.

near — array of points forming the near plane.
far — array of points forming the far plane.

Methods

.setFromProjectionMatrix(matrix : Matrix4, maxFar : Float) → this

matrix — view camera's projection matrix.
maxFar — frustum far plane distance.

Sets frustum points from projection matrix.

.split(breaks : Array, target : Array, fitToScene : Boolean) → this

breaks — array of split intervals.
target — array of subfrustums, should be target.length <= breaks.length.
fitToScene — if true, uses fit to scene, else fit to cascade method.

Splits this frustum into subfrustums.

.toSpace(matrix : Matrix4, target : this) → this

matrix — matrix applied to each frustum point.
targetfrustum to which the results will be written.

Multiplies each frustum point by a matrix and write the results to the target.

Source

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