Aviatrix3D
2.1.0

org.j3d.aviatrix3d.pipeline.graphics
Interface GraphicsSortStage

All Known Implementing Classes:
BaseSortStage, BaseStateSortStage, NullSortStage, SimpleTransparencySortStage, StateAndTransparencyDepthSortStage, StateSortStage, TransparencyDepthSortStage

public interface GraphicsSortStage

Handles any sort of rendering sort ability.

Typical sorting operations that may implement this interface are for state and transparency sorting.

A sorter will have a reciever for its output. If no receiver is registered the sorter should still operate because an implemenation could choose to poll for the output of the sorter at any time too. The output should always remain valid, regardless of whether another sort is in progress. If a sort is in progress then the output is for the previous sort step.

Version:
$Revision: 3.5 $
Author:
Justin Couch

Method Summary
 void halt()
          Force a halt of the current processing.
 void setErrorReporter(org.j3d.util.ErrorReporter reporter)
          Register an error reporter with the engine so that any errors generated by the node's internals can be reported in a nice, pretty fashion.
 void setSortedGeometryReceiver(SortedGeometryReceiver sgr)
          Register a reciever for the output of the sorter.
 void sort(GraphicsRequestData otherData, GraphicsProfilingData profilingData, ViewportCollection[][] layers, int[] numLayers, int numScenes, OffscreenBufferRenderable[][] sceneParent)
          Sort the listing of layers and nodes.
 

Method Detail

sort

void sort(GraphicsRequestData otherData,
          GraphicsProfilingData profilingData,
          ViewportCollection[][] layers,
          int[] numLayers,
          int numScenes,
          OffscreenBufferRenderable[][] sceneParent)
Sort the listing of layers and nodes. Do not return until the sort has been completed.

For the 2D array of layers, it contains the list of final subscenes to send to the final stage, with the second dimension describing the layers, in rendering order. The first item will always be the main scene that gets rendered to the canvas.

For the 2D array sceneParent, it allows for mapping the output of internal scenes to the holding texture node. Index 0 is the direct owner of the scene contents. Index 1 is the scene parent of the scene included (needed for pBuffer GL context handling at render time). If this second one is null, then the parent is the main canvas that is being rendered to.

Parameters:
otherData - data to be passed along unprocessed
profilingData - The timing and load data
layers - The list of layers that need to be further processed
numLayers - The number of valid layers in each scene to process
numScenes - The number of valid scenes to process
sceneParent - Parent node that holds the subscene in the main scene graph

setSortedGeometryReceiver

void setSortedGeometryReceiver(SortedGeometryReceiver sgr)
Register a reciever for the output of the sorter. If the value is null, it will clear the currently set receiver.

Parameters:
sgr - The receiver instance to add or null

halt

void halt()
Force a halt of the current processing. Any processing in progress should exit immediately. Used to abort the current scene processing due to application shutdown or complete scene replacement.


setErrorReporter

void setErrorReporter(org.j3d.util.ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the node's internals can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.

Parameters:
reporter - The instance to use or null

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org