t3d. Frustum

Frustums are used to determine what is inside the camera's field of view. They help speed up the rendering process - objects which lie outside a camera's frustum can safely be excluded from rendering.

Constructor

new Frustum(p0, p1, p2, p3, p4, p5)

Parameters:
NameTypeDescription
p0t3d.Plane(optional) defaults to a new Plane.
p1t3d.Plane(optional) defaults to a new Plane.
p2t3d.Plane(optional) defaults to a new Plane.
p3t3d.Plane(optional) defaults to a new Plane.
p4t3d.Plane(optional) defaults to a new Plane.
p5t3d.Plane(optional) defaults to a new Plane.

Methods

clone() → {t3d.Frustum}

Return a new Frustum with the same parameters as this one.
Returns:
Type: 
t3d.Frustum

copy(frustum) → {t3d.Frustum}

Copies the properties of the passed frustum into this one.
Parameters:
NameTypeDescription
frustumt3d.FrustumThe frustum to copy
Returns:
Type: 
t3d.Frustum

intersectsBox(box) → {Boolean}

Return true if box intersects with this frustum.
Parameters:
NameTypeDescription
boxt3d.Box3Box3 to check for intersection.
Returns:
Type: 
Boolean

intersectsSphere(sphere) → {Boolean}

Return true if sphere intersects with this frustum.
Parameters:
NameTypeDescription
spheret3d.SphereSphere to check for intersection.
Returns:
Type: 
Boolean

set(p0, p1, p2, p3, p4, p5) → {t3d.Frustum}

Sets the frustum from the passed planes. No plane order is implied.
Parameters:
NameTypeDescription
p0t3d.Plane(optional) defaults to a new Plane.
p1t3d.Plane(optional) defaults to a new Plane.
p2t3d.Plane(optional) defaults to a new Plane.
p3t3d.Plane(optional) defaults to a new Plane.
p4t3d.Plane(optional) defaults to a new Plane.
p5t3d.Plane(optional) defaults to a new Plane.
Returns:
Type: 
t3d.Frustum

setFromMatrix(m) → {t3d.Frustum}

Sets the frustum planes from the matrix.
Parameters:
NameTypeDescription
mt3d.Matrix4a Matrix4 used to set the planes
Returns:
Type: 
t3d.Frustum