toxi.sim.dla
Class BottomUpOrder

java.lang.Object
  extended by toxi.sim.dla.BottomUpOrder
All Implemented Interfaces:
java.util.Comparator<toxi.geom.Line3D>

public class BottomUpOrder
extends java.lang.Object
implements java.util.Comparator<toxi.geom.Line3D>

This comparator sorts segments based on their midpoint's Y position. Positive Y axis is assumed the default up direction, but can be changed via the constructor.


Field Summary
 boolean isFlipped
           
 
Constructor Summary
BottomUpOrder(boolean isFlipped)
           
 
Method Summary
 int compare(toxi.geom.Line3D a, toxi.geom.Line3D b)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

isFlipped

public boolean isFlipped
Constructor Detail

BottomUpOrder

public BottomUpOrder(boolean isFlipped)
Method Detail

compare

public int compare(toxi.geom.Line3D a,
                   toxi.geom.Line3D b)
Specified by:
compare in interface java.util.Comparator<toxi.geom.Line3D>