API Docs for: 0.5.5
Show:

kick.math.Frustum Class

Module: kick.math

Frustum represented as 6 line equations (ax+by+c*z+d=0 , where [a,b,c] is the normal of the plane). Note the normals of the frustum points inwards. The order of the planes are left, right, top, bottom, near, far The implementation is based on "Fast Extraction of Viewing Frustum Planes from the WorldView-Projection Matrix" by Gil Grib and Klaus Hartmann http://www.cs.otago.ac.nz/postgrads/alexis/planeExtraction.pdf

Item Index

Methods

Properties

Methods

create

() static

Create a array of 24. 6 line equations (ax+by+c*z+d=0 , where [a,b,c] is the normal of the plane).

extractPlanes

(
  • out
  • modelViewMatrix
  • normalize
)
Array_24 static

Parameters:

  • out Array_24
  • modelViewMatrix kick.math.Mat4
  • normalize Boolean

    normalize plane normal

Returns:

Array_24:

out

intersectAabb

(
  • frustumPlanes
  • aabbIn
)
Number static

Based on [Akenine-Moller's Real-Time Rendering 3rd Ed] chapter 16.14.3

Parameters:

Returns:

Number:

frustum.OUTSIDE = outside(0), frustum.INSIDE = inside(1), frustum.INTERSECTING = intersecting(2)

Properties

INSIDE

Number static

Value = 1

INTERSECTING

Number static

Value = 2

OUTSIDE

Number static

Value = 0