org.xith3d.render.preprocessing
Class FrustumCuller

java.lang.Object
  extended by org.xith3d.render.preprocessing.FrustumCuller

public class FrustumCuller
extends java.lang.Object

The ViewCuller is in charge of traversing the scenegraph to cull any Shape3D with the View's Frustum.

This class is based on AtomsCollector, which is originally coded by David Yazel and heavily modified by Marvin Froehlich.


Constructor Summary
FrustumCuller()
          Creates a new renderer that also capable of collecting RenderAtoms.
 
Method Summary
 int cullAtoms(java.util.List<RenderPass> renderPasses, java.util.List<? extends java.util.List<GroupNode>> groupsLists, Canvas3D canvas, OpenGLCapabilities glCaps, long frameId, long nanoTime, long nanoStep, PickRequest pickRequest)
          Traverses the scenegraph and collects all RenderAtoms and spreads them over different RenderBins.
 int cullAtoms(RenderPass renderPass, GroupNode rootGroup, Canvas3D canvas, org.openmali.vecmath2.Point3f viewPosition, OpenGLCapabilities glCaps, long frameId, long nanoTime, long nanoStep, PickRequest pickRequest)
          Traverses the scenegraph and collects all RenderAtoms and spreads them over different RenderBins.
 void cullNodeAtoms(Node node, org.openmali.spatial.bodies.Classifier.Classification parentClassify, boolean cullingSuppressed, View view, org.openmali.vecmath2.Point3f viewPosition, org.openmali.spatial.bodies.Frustum frustum, RenderBinProvider binProvider, OpenGLCapabilities glCaps, long frameId, long nanoTime, long nanoStep, PickRay pickRay, boolean isShadowPass)
          Checks the Node's actual type and invokes the appropriate method to further traverse the scenegraph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrustumCuller

public FrustumCuller()
Creates a new renderer that also capable of collecting RenderAtoms.

Method Detail

cullNodeAtoms

public final void cullNodeAtoms(Node node,
                                org.openmali.spatial.bodies.Classifier.Classification parentClassify,
                                boolean cullingSuppressed,
                                View view,
                                org.openmali.vecmath2.Point3f viewPosition,
                                org.openmali.spatial.bodies.Frustum frustum,
                                RenderBinProvider binProvider,
                                OpenGLCapabilities glCaps,
                                long frameId,
                                long nanoTime,
                                long nanoStep,
                                PickRay pickRay,
                                boolean isShadowPass)
Checks the Node's actual type and invokes the appropriate method to further traverse the scenegraph.


cullAtoms

public final int cullAtoms(RenderPass renderPass,
                           GroupNode rootGroup,
                           Canvas3D canvas,
                           org.openmali.vecmath2.Point3f viewPosition,
                           OpenGLCapabilities glCaps,
                           long frameId,
                           long nanoTime,
                           long nanoStep,
                           PickRequest pickRequest)
Traverses the scenegraph and collects all RenderAtoms and spreads them over different RenderBins. This collection is later passed to the OpenGL renderer.

Parameters:
renderPass -
rootGroup -
canvas -
viewPosition -
frameId -
pickRequest -

cullAtoms

public final int cullAtoms(java.util.List<RenderPass> renderPasses,
                           java.util.List<? extends java.util.List<GroupNode>> groupsLists,
                           Canvas3D canvas,
                           OpenGLCapabilities glCaps,
                           long frameId,
                           long nanoTime,
                           long nanoStep,
                           PickRequest pickRequest)
Traverses the scenegraph and collects all RenderAtoms and spreads them over different RenderBins. This collection is later passed to the OpenGL renderer.

Parameters:
renderPasses -
groupsLists -
canvas -
frameId -
nanoTime -
nanoStep -
pickRequest -