Frustum

Frustum object, part of the camera object.

Constructor

new Frustum(options)

Parameters:
NameTypeDescription
options*

Methods

containsBox(box) → {boolean}

Returns true if the frustum contains a bounding box.

Parameters:
NameTypeDescription
boxBox

Bounding box.

Returns:
Type: 
boolean

containsPoint(point) → {boolean}

Returns true if a point in the frustum.

Parameters:
NameTypeDescription
pointVec3

Cartesian point.

Returns:
Type: 
boolean

containsSphere(sphere) → {boolean}

Returns true if the frustum contains a bonding sphere.

Parameters:
NameTypeDescription
sphereSphere

Bounding sphere.

Returns:
Type: 
boolean

containsSphere2(center, radius) → {boolean}

Returns true if the frustum contains a bonding sphere.

Parameters:
NameTypeDescription
centerVec3

Sphere center.

radiusnumber

Sphere radius.

Returns:
Type: 
boolean

containsSphereBottomExc(sphere) → {boolean}

Returns true if the frustum contains a bonding sphere, but bottom plane exclude.

Parameters:
NameTypeDescription
sphereSphere

Bounding sphere.

Returns:
Type: 
boolean

setProjectionMatrix(angle, aspect, near, far)

Sets up camera projection matrix.

Parameters:
NameTypeDescription
anglenumber

Camera's view angle.

aspectnumber

Screen aspect ratio.

nearnumber

Near camera distance.

farnumber

Far camera distance.

setViewMatrix(viewMatrix)

Camera's projection matrix values.

Parameters:
NameTypeDescription
viewMatrixMat4

View matrix.