Aviatrix3D
2.0 Dev

org.j3d.aviatrix3d.pipeline.graphics
Interface GraphicsSortStage

All Known Implementing Classes:
BaseSortStage

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.0 $
Author:
Justin Couch

Method Summary
 void halt()
          Force a halt of the current processing.
 void setSortedGeometryReceiver(SortedGeometryReceiver sgr)
          Register a reciever for the output of the sorter.
 void sort(ViewportCollection[][] layers, int[] numLayers, int numScenes, SceneGraphObject[][] sceneParent, int bufferId)
          Sort the listing of layers and nodes.
 

Method Detail

sort

public void sort(ViewportCollection[][] layers,
                 int[] numLayers,
                 int numScenes,
                 SceneGraphObject[][] sceneParent,
                 int bufferId)
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:
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
bufferId - The buffer ID to use to output the data to when multi-threaded

setSortedGeometryReceiver

public 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

public 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.


Aviatrix3D
2.0 Dev

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