Class: Frustum

Frustum

Frustum constructor

new Frustum()

Methods


compute(projectionMatrix)

Compute the frustum from the given projection matrix
Parameters:
Name Type Description
projectionMatrix Projection matrix

transform(frustum, matrix)

Transform the frustum with the given matrix
Parameters:
Name Type Description
frustum
matrix Matrix

inverseTransform(frustum, matrix)

Inverse transform the frustum with the given matrix
Parameters:
Name Type Description
frustum
matrix Matrix

containsSphere(center, radius)

Intersection test between frustum and bounding sphere.
Parameters:
Name Type Description
center Array Center
radius Float Radius
Returns:
  • 1 if the bounding sphere is completely inside the frustum,
  • 0 if the bounding sphere intersects the frustum,
  • -1 if the bounding sphere is completely outside the frustum.
Type
Integer

containsBoundingBox(bbox)

Test if the frustum contains the given bounding box
Parameters:
Name Type Description
bbox BoundingBox Bounding box
Returns:
Contains ?
Type
boolean