Frustum
Package: Libraries.Compute · Inherits from: Libraries.Language.Object
A Frustum is a truncated rectangular pyramid (i.e., a pyramid with the top chopped off) used to define the viewable region and its projection onto the screen.
Variables
Libraries.Containers.Array planePointsLibraries.Containers.Array planes
Actions
PointInFrustum(number x, number y, number z)
This action determines wither the point with the passed x, y, and z coordinates lies in the frustum.
Parameters
xnumber: The x component of the point to testynumber: The y component of the point to testznumber: The z component of the point to test
Returns
boolean: true if the point is in the frustum, false otherwise
PointInFrustum(Libraries.Compute.Vector3 point)
This action determines whether the passed point lies in the frustum.
Parameters
pointLibraries.Compute.Vector3: The point to test
Returns
boolean: true if the point is in the frustum, false otherwise
SphereInFrustum(number x, number y, number z, number radius)
This action determines whether the sphere with its center at the passed x, y, and z coordinates and radius lies in the frustum.
Parameters
xnumber: The x coordinate of the center of the sphereynumber: The y coordinate of the center of the sphereznumber: The z coordinate of the center of the sphereradiusnumber: The radius of the sphere
Returns
boolean: true if the sphere lies in the frustum, false otherwise
SphereInFrustum(Libraries.Compute.Vector3 center, number radius)
This action determines whether the sphere with the passed center and radius lies in the frustum.
Parameters
centerLibraries.Compute.Vector3: The center of the sphereradiusnumber: The radius of the sphere
Returns
boolean: true if the sphere lies in the frustum, false otherwise
SphereInFrustumWithoutNearFar(number x, number y, number z, number radius)
This action determines whether the sphere with the passed center and radius lies within the frustum without checking whether it is behind the near and far clipping plane.
Parameters
xnumber: The x coordinate of the center of the sphereynumber: The y coordinate of the center of the sphereznumber: The z coordinate of the center of the sphereradiusnumber: The radius of the sphere
Returns
boolean: true if the sphere is in the frustum, false otherwise
SphereInFrustumWithoutNearFar(Libraries.Compute.Vector3 center, number radius)
This action determines whether the sphere with the passed center and radius lies within the frustum without checking whether it is behind the near and far clipping plane.
Parameters
centerLibraries.Compute.Vector3: The center of the sphereradiusnumber: The radius of the sphere
Returns
boolean: true if the sphere is in the frustum, false otherwise
Update(Libraries.Compute.Matrix4 inverseProjectionView)
This action updates the clipping planes based on the given inverse combined projection and view matrix, like one gotten from an orthographic or perspective camera
Parameters
inverseProjectionViewLibraries.Compute.Matrix4: te combined projection and view matrices