org.xith3d.render.preprocessing
Class RenderBinProvider

java.lang.Object
  extended by org.xith3d.render.preprocessing.RenderBinProvider
Direct Known Subclasses:
ShadowMappingFactory.HackedRenderBinProvider

public class RenderBinProvider
extends java.lang.Object

Contains and maintains all RenderBins, which on their part may contain all RenderAtoms of the whole scenegraph.


Field Summary
protected  RenderBin opaqueBin
           
protected  RenderBin shadowsBin
           
protected  RenderBin transparentBin
           
 
Constructor Summary
RenderBinProvider()
           
RenderBinProvider(RenderBin opaqueBin, RenderBin transparentBin, RenderBin shadowsBin)
           
 
Method Summary
 void addMainAtom(RenderAtom<? extends Node> atom, org.openmali.spatial.bodies.Classifier.Classification classify, long frameId)
          Adds an atom to be rendered.
 void addShadowAtom(RenderAtom<? extends Node> atom, org.openmali.spatial.bodies.Classifier.Classification classify, long frameId)
           
 void clearAllBins()
           
 int getAtomsCount()
           
 RenderBin getOpaqueBin()
           
 RenderBin getShadowsBin()
           
 RenderBin getTransparentBin()
           
 void shrinkAllBins()
           
 void sortAllAtoms(RenderBinSorter opaqueSorter, RenderBinSorter transparentSorter, Transform3D viewTransform)
          Sorts the RenderAtoms in the diverse RenderBins by policies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

opaqueBin

protected RenderBin opaqueBin

transparentBin

protected RenderBin transparentBin

shadowsBin

protected RenderBin shadowsBin
Constructor Detail

RenderBinProvider

public RenderBinProvider(RenderBin opaqueBin,
                         RenderBin transparentBin,
                         RenderBin shadowsBin)

RenderBinProvider

public RenderBinProvider()
Method Detail

getOpaqueBin

public final RenderBin getOpaqueBin()

getTransparentBin

public final RenderBin getTransparentBin()

getShadowsBin

public final RenderBin getShadowsBin()

getAtomsCount

public final int getAtomsCount()

addMainAtom

public final void addMainAtom(RenderAtom<? extends Node> atom,
                              org.openmali.spatial.bodies.Classifier.Classification classify,
                              long frameId)
Adds an atom to be rendered. The atoms are sorted into multiple render bins to facilitate multiple passes where necessary.

Parameters:
atom -

addShadowAtom

public final void addShadowAtom(RenderAtom<? extends Node> atom,
                                org.openmali.spatial.bodies.Classifier.Classification classify,
                                long frameId)

sortAllAtoms

public final void sortAllAtoms(RenderBinSorter opaqueSorter,
                               RenderBinSorter transparentSorter,
                               Transform3D viewTransform)
Sorts the RenderAtoms in the diverse RenderBins by policies.

Parameters:
opaqueSorter - the sorting policy for opaque shapes
transparentSorter - the sorting policy for transparent shapes
viewTransform - the View's transform

clearAllBins

public final void clearAllBins()

shrinkAllBins

public final void shrinkAllBins()