public int compare(Drawable3D d1, Drawable3D d2) { /* Drawable3D d1 = (Drawable3D) arg1; Drawable3D d2 = (Drawable3D) arg2; */ return d1.comparePickingTo(d2, false); }
public int compare(TreeSet<Drawable3D> set1, TreeSet<Drawable3D> set2) { /* TreeSet set1 = (TreeSet) arg1; TreeSet set2 = (TreeSet) arg2; */ // check if one set is empty if (set1.isEmpty()) return 1; if (set2.isEmpty()) return -1; Drawable3D d1 = (Drawable3D) set1.first(); Drawable3D d2 = (Drawable3D) set2.first(); return d1.comparePickingTo(d2, true); }