de.rico.engine.camera.culling
Class ViewingFrustum

java.lang.Object
  extended by de.rico.engine.camera.culling.ViewingFrustum

public class ViewingFrustum
extends java.lang.Object

This class represents the viewing frustum with its six planes. The six planes are being used for the frustum culling technique.

Author:
Frank Bruns

Constructor Summary
ViewingFrustum()
          Creates a new viewing frustum object.
 
Method Summary
 FrustumPlane getBackPlane()
          Returns the back plane of the frustum
 FrustumPlane getBottomPlane()
          Returns the bottom plane of the frustum
 FrustumPlane getFrontPlane()
          Returns the front plane of the frustum
 FrustumPlane getLeftPlane()
          Returns the left plane of the frustum
 FrustumPlane getRightPlane()
          Returns the right plane of the frustum
 FrustumPlane getTopPlane()
          Returns the top plane of the frustum
 void update(javax.media.opengl.GL gl)
          This methods updates the frustum by (re-)calculating its planes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewingFrustum

public ViewingFrustum()
Creates a new viewing frustum object.

Method Detail

getBackPlane

public FrustumPlane getBackPlane()
Returns the back plane of the frustum

Returns:
the backPlane

getBottomPlane

public FrustumPlane getBottomPlane()
Returns the bottom plane of the frustum

Returns:
the bottomPlane

getFrontPlane

public FrustumPlane getFrontPlane()
Returns the front plane of the frustum

Returns:
the frontPlane

getLeftPlane

public FrustumPlane getLeftPlane()
Returns the left plane of the frustum

Returns:
the leftPlane

getRightPlane

public FrustumPlane getRightPlane()
Returns the right plane of the frustum

Returns:
the rightPlane

getTopPlane

public FrustumPlane getTopPlane()
Returns the top plane of the frustum

Returns:
the topPlane

update

public void update(javax.media.opengl.GL gl)
This methods updates the frustum by (re-)calculating its planes. To improve performance only call this method, if something camera related has changed since the last call.

Parameters:
gl -