Class: Frustum

Frustum

Frustum object, part of the camera object.

new Frustum(options)

Name Type Description
options *

Members

protected_inverseProjectionMatrixMat4

Camera inverse projection matrix.

protected_inverseProjectionViewMatrixMat4

Inverse projectionView Matrix.

protected_projectionMatrixMat4

Camera projection matrix.

protected_projectionViewMatrixMat4

Product of projection and view matrices.

bottom

Projection frustum bottom value.

far

Projection frustum far value.

left

Projection frustum left value.

near

Projection frustum near value.
Projection frustum right value.

top

Projection frustum top value.

Methods

containsBox(box){boolean}

Returns true if the frustum contains a bounding box.
Name Type Description
box Box Bounding box.
Returns:
Type Description
boolean -

containsPoint(point){boolean}

Returns true if a point in the frustum.
Name Type Description
point Vec3 Cartesian point.
Returns:
Type Description
boolean -

containsSphere(sphere){boolean}

Returns true if the frustum contains a bonding sphere.
Name Type Description
sphere Sphere Bounding sphere.
Returns:
Type Description
boolean -

containsSphere2(center, radius){boolean}

Returns true if the frustum contains a bonding sphere.
Name Type Description
center Vec3 Sphere center.
radius number Sphere radius.
Returns:
Type Description
boolean -

containsSphereBottomExc(sphere){boolean}

Returns true if the frustum contains a bonding sphere, but bottom plane exclude.
Name Type Description
sphere Sphere Bounding sphere.
Returns:
Type Description
boolean -

setProjectionMatrix(angle, aspect, near, far)

Sets up camera projection matrix.
Name Type Description
angle nnumber Camera's view angle.
aspect number Screen aspect ration.
near number Near camera distance.
far number Far camera distance.

setViewMatrix(projectionView)

Camera's projection matrix values.
Name Type Description
projectionView Mat4 projectionView matrix.