Class: Frustum

Frustum

Frustum object, part of the camera object.

new Frustum()

Members

protected_inverseProjectionViewMatrixog.Mat4

Inverse projectionView Matrix.

protected_projectionMatrixog.Mat4

Camera projection matrix.

protected_projectionViewMatrixog.Mat4

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 og.bv.Box Bounding box.
Returns:
Type Description
boolean -

containsPoint(point){boolean}

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

containsSphere(sphere){boolean}

Returns true if the frustum contains a bonding sphere.
Name Type Description
sphere og.bv.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 og.bv.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.