GeomRep
Class FaceZSorter

java.lang.Object
  extended by GeomRep.FaceZSorter
All Implemented Interfaces:
java.util.Comparator<DrawFace>

 class FaceZSorter
extends java.lang.Object
implements java.util.Comparator<DrawFace>

FaceZSorter class used as a comparator. Note that this comparator is not compatible with the general contract of Comparator.compare(obj1, obj2) method because comp.compare(faceClass1, faceClass2)==0 does not imply that faceClass1.equals(faceClass2). This is beuase the comparator processes only the minimum z coordinates of the face.

Since:
1.0

Constructor Summary
FaceZSorter()
           
 
Method Summary
 int compare(DrawFace f1, DrawFace f2)
          compare the two DrawFace objects using their Z coordinate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

FaceZSorter

FaceZSorter()
Method Detail

compare

public int compare(DrawFace f1,
                   DrawFace f2)
compare the two DrawFace objects using their Z coordinate.

Specified by:
compare in interface java.util.Comparator<DrawFace>
Parameters:
f1 - First DrawFace (@see DrawFace)
f2 - Second DrawFace (@see DrawFace)
Returns:
int that is +1, 0 or -1 when f1 > f2, f1 == f2, or f1 < f2 respectively.