Package com.sun.j3d.utils.scenegraph.transparency

# Class TransparencySortController

java.lang.Object
com.sun.j3d.utils.scenegraph.transparency.TransparencySortController

public class TransparencySortController extends 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.

Since:
  Java 3D 1.4

## Constructor Summary

Constructors
Constructor
Description
`TransparencySortController()`

## Method Summary

Modifier and Type
Method
Description
`static Comparator`
`getComparator(View view)`
Returns the comparator for the specified view
`static void`
`setComparator(View view, Comparator comparator)`
Set the comparator for the specified view.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TransparencySortController

public TransparencySortController()

## Method Details

### setComparator

public static void setComparator(View view, Comparator 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 invalid input: '<' Object2 if it is to be considered closer and rendered after.

Parameters:
  `view` - the view to which the comparator applies
  `comparator` - the comparator to call

### getComparator

public static Comparator getComparator(View view)
Returns the comparator for the specified view

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