toxi.sim.dla
Class RadialDistanceOrder
java.lang.Object
toxi.sim.dla.RadialDistanceOrder
- All Implemented Interfaces:
- java.util.Comparator<toxi.geom.Line3D>
public class RadialDistanceOrder
- extends java.lang.Object
- implements java.util.Comparator<toxi.geom.Line3D>
This comparator sorts segments based on their mid-point's distance to a given
origin point. This creates a circular growth. The order can be reversed via a
constructor flag and then causes the DLA system to grow from the outside
towards the given origin point.
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 |
origin
public toxi.geom.Vec3D origin
isFlipped
public boolean isFlipped
RadialDistanceOrder
public RadialDistanceOrder()
RadialDistanceOrder
public RadialDistanceOrder(toxi.geom.Vec3D origin,
boolean isFlipped)
compare
public int compare(toxi.geom.Line3D a,
toxi.geom.Line3D b)
- Specified by:
compare
in interface java.util.Comparator<toxi.geom.Line3D>