Package toxi.sim.dla
Class RadialDistanceOrder
java.lang.Object
toxi.sim.dla.RadialDistanceOrder
- All Implemented Interfaces:
Comparator<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.
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
origin
-
isFlipped
public boolean isFlipped
-
-
Constructor Details
-
RadialDistanceOrder
public RadialDistanceOrder() -
RadialDistanceOrder
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<Line3D>
-