j3d.org Aviatrix3D

org.j3d.aviatrix3d.pipeline
Class StateAndTransparencyDepthSortStage

java.lang.Object
  extended byorg.j3d.aviatrix3d.pipeline.StateAndTransparencyDepthSortStage
All Implemented Interfaces:
SortStage

public class StateAndTransparencyDepthSortStage
extends java.lang.Object
implements SortStage

Implementation of the sort stage that does everything - state sorting and depth sorted transparency.

Version:
$Revision: 1.24 $
Author:
Justin Couch

Constructor Summary
StateAndTransparencyDepthSortStage()
          Create an empty sorting stage that assumes just a single renderable output.
StateAndTransparencyDepthSortStage(int numSurfaces)
          Create an empty sorting stage that initialises the internal structures to assume that there is a minumum number of surfaces, both on and offscreen.
StateAndTransparencyDepthSortStage(int numSurfaces, int depthBits)
          Create an empty sorting stage that initialises the internal structures to assume that there is a minumum number of surfaces, both on and offscreen.
 
Method Summary
 void setSortedGeometryReceiver(SortedGeometryReceiver sgr)
          Register a reciever for the output of the sorter.
 void sort(RenderEnvironmentData[] data, CullOutputDetails[][] nodes, int[] numNodes, SceneGraphObject[][] sceneParents, int numScenes, int buffer)
          Sort the listing of nodes in the given array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateAndTransparencyDepthSortStage

public StateAndTransparencyDepthSortStage()
Create an empty sorting stage that assumes just a single renderable output.


StateAndTransparencyDepthSortStage

public StateAndTransparencyDepthSortStage(int numSurfaces)
Create an empty sorting stage that initialises the internal structures to assume that there is a minumum number of surfaces, both on and offscreen. The number of depth bits is set to 16.

Parameters:
numSurfaces - The number of surfaces to start the internal lists sizes at.

StateAndTransparencyDepthSortStage

public StateAndTransparencyDepthSortStage(int numSurfaces,
                                          int depthBits)
Create an empty sorting stage that initialises the internal structures to assume that there is a minumum number of surfaces, both on and offscreen.

Parameters:
numSurfaces - The number of surfaces to start the internal lists sizes at.
depthBits - The number of bits of depth precision to quantize the depth sorting to
Throws:
java.lang.IllegalArgumentException - Depth bits is zero or negative
Method Detail

sort

public void sort(RenderEnvironmentData[] data,
                 CullOutputDetails[][] nodes,
                 int[] numNodes,
                 SceneGraphObject[][] sceneParents,
                 int numScenes,
                 int buffer)
Sort the listing of nodes in the given array. Do not return until the sort has been completed. If the sceneParent is the main scene graph and not an offscreen texture, then that spot should be set to null in the list.

Specified by:
sort in interface SortStage
Parameters:
data - External rendering environment information
nodes - List of processed nodes based on the scene they came from
numNodes - Number of nodes in each scene
sceneParents - Parent nodes that hold the subscene in the main scene graph
numScenes - The number of valid scenes to process
buffer - 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.

Specified by:
setSortedGeometryReceiver in interface SortStage
Parameters:
sgr - The receiver instance to add or null

j3d.org Aviatrix3D

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