Package toxi.sim.dla

Class RadialDistanceOrder

java.lang.Object
toxi.sim.dla.RadialDistanceOrder
All Implemented Interfaces:
Comparator<Line3D>

public class RadialDistanceOrder extends Object implements 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 Details

    • origin

      public Vec3D origin
    • isFlipped

      public boolean isFlipped
  • Constructor Details

    • RadialDistanceOrder

      public RadialDistanceOrder()
    • RadialDistanceOrder

      public RadialDistanceOrder(Vec3D origin, boolean isFlipped)
  • Method Details