com.threerings.miso.client
Class DirtyItemList.RenderComparator

java.lang.Object
  extended by com.threerings.miso.client.DirtyItemList.RenderComparator
All Implemented Interfaces:
Comparator<DirtyItemList.DirtyItem>
Enclosing class:
DirtyItemList

protected class DirtyItemList.RenderComparator
extends Object
implements Comparator<DirtyItemList.DirtyItem>

A comparator class for use in sorting the dirty sprites and objects in a scene in ascending x- and y-coordinate order suitable for rendering in the isometric view with proper visual results.


Constructor Summary
protected DirtyItemList.RenderComparator()
           
 
Method Summary
 int compare(DirtyItemList.DirtyItem da, DirtyItemList.DirtyItem db)
           
protected  int compareNonPartitioned(DirtyItemList.DirtyItem da, DirtyItemList.DirtyItem db)
          Compares the two dirty items assuming there are no partitioning objects between them.
protected  int comparePartitioned(int axis, DirtyItemList.DirtyItem da, DirtyItemList.DirtyItem db)
          Returns whether two dirty items have a partitioning object between them on the given axis.
 
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

DirtyItemList.RenderComparator

protected DirtyItemList.RenderComparator()
Method Detail

compare

public int compare(DirtyItemList.DirtyItem da,
                   DirtyItemList.DirtyItem db)
Specified by:
compare in interface Comparator<DirtyItemList.DirtyItem>

comparePartitioned

protected int comparePartitioned(int axis,
                                 DirtyItemList.DirtyItem da,
                                 DirtyItemList.DirtyItem db)
Returns whether two dirty items have a partitioning object between them on the given axis.


compareNonPartitioned

protected int compareNonPartitioned(DirtyItemList.DirtyItem da,
                                    DirtyItemList.DirtyItem db)
Compares the two dirty items assuming there are no partitioning objects between them.