org.openmali.spatial.bodies
Class Frustum

java.lang.Object
  extended by org.openmali.spatial.bodies.Frustum

public class Frustum
extends java.lang.Object

A viewing frustum.


Constructor Summary
Frustum()
          Frustum constructor comment.
 
Method Summary
 void compute(Matrix4f proj, Matrix4f modl)
          Extract the frustum from the incoming projections and modelview matrices.
 Matrix4f computeInverse(Matrix4f proj)
          Extract the frustum from the incoming projections and modelview matrices.
 Matrix4f getMatrix()
           
 Plane getPlaneBottom()
           
 Plane getPlaneBottom(Plane plane)
           
 Plane getPlaneFar()
           
 Plane getPlaneFar(Plane plane)
           
 Plane getPlaneLeft()
           
 Plane getPlaneLeft(Plane plane)
           
 Plane getPlaneNear()
           
 Plane getPlaneNear(Plane plane)
           
 Plane getPlaneRight()
           
 Plane getPlaneRight(Plane plane)
           
 Plane getPlaneTop()
           
 Plane getPlaneTop(Plane plane)
           
 boolean intersects(Plane p, Vector3f[] quad)
          Intersect the frustum with a plane.
 Classifier.Classification quickClassify(Box box)
          Quick check to see if an orthogonal bounding box is inside the frustum
 void setPlaneBottom(Plane plane)
           
 void setPlaneFar(Plane plane)
           
 void setPlaneLeft(Plane plane)
           
 void setPlaneNear(Plane plane)
           
 void setPlaneRight(Plane plane)
           
 void setPlaneTop(Plane plane)
           
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Frustum

public Frustum()
Frustum constructor comment.

Method Detail

getMatrix

public Matrix4f getMatrix()

setPlaneRight

public final void setPlaneRight(Plane plane)

getPlaneRight

public final Plane getPlaneRight()

getPlaneRight

public final Plane getPlaneRight(Plane plane)

setPlaneLeft

public final void setPlaneLeft(Plane plane)

getPlaneLeft

public final Plane getPlaneLeft()

getPlaneLeft

public final Plane getPlaneLeft(Plane plane)

setPlaneBottom

public final void setPlaneBottom(Plane plane)

getPlaneBottom

public final Plane getPlaneBottom()

getPlaneBottom

public final Plane getPlaneBottom(Plane plane)

setPlaneTop

public final void setPlaneTop(Plane plane)

getPlaneTop

public final Plane getPlaneTop()

getPlaneTop

public final Plane getPlaneTop(Plane plane)

setPlaneFar

public final void setPlaneFar(Plane plane)

getPlaneFar

public final Plane getPlaneFar()

getPlaneFar

public final Plane getPlaneFar(Plane plane)

setPlaneNear

public final void setPlaneNear(Plane plane)

getPlaneNear

public final Plane getPlaneNear()

getPlaneNear

public final Plane getPlaneNear(Plane plane)

quickClassify

public final Classifier.Classification quickClassify(Box box)
Quick check to see if an orthogonal bounding box is inside the frustum


intersects

public final boolean intersects(Plane p,
                                Vector3f[] quad)
Intersect the frustum with a plane. The result is returned in a set of points which make a quadrilateral. If the frustum does not intersect the plane then the function

Parameters:
p -
quad -
Returns:
false and the points are left untouched. The array of points passed in must have a size equal to 4.

compute

public final void compute(Matrix4f proj,
                          Matrix4f modl)
Extract the frustum from the incoming projections and modelview matrices.


computeInverse

public final Matrix4f computeInverse(Matrix4f proj)
Extract the frustum from the incoming projections and modelview matrices.


toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object