Class TransparencySortController

  extended by com.sun.j3d.utils.scenegraph.transparency.TransparencySortController

public class TransparencySortController
extends java.lang.Object

This class controls the Transparency Sorting scheme used by Java 3D when rendering transparent objects. By default (and in all previous versions of Java 3D) objects are sorted depending on the distance from the viewer of the centroid of their bounds. By supplying a different Comparator for a view using the static setComparator method the user can provide their own sorting scheme. The Comparator provided will be called with 2 objects of class TransparencySortGeom.

Java 3D 1.4

Constructor Summary
Method Summary
static java.util.Comparator<TransparencySortGeom> getComparator(View view)
          Returns the comparator for the specified view
static void setComparator(View view, java.util.Comparator<TransparencySortGeom> comparator)
          Set the comparator for the specified view.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public TransparencySortController()
Method Detail


public static void setComparator(View view,
                                 java.util.Comparator<TransparencySortGeom> comparator)
Set the comparator for the specified view. The comparators compare method will be called with 2 objects of type TransparencySortGeom and it's result should indicate which object is closer to the viewer. Object1 < Object2 if it is to be considered closer and rendered after.

view - the view to which the comparator applies
comparator - the comparator to call


public static java.util.Comparator<TransparencySortGeom> getComparator(View view)
Returns the comparator for the specified view

the comparator for the specified view, or null if there is no comparator for the view or the view is unknown.