Class HelperAnnotation.Helper

java.lang.Object
org.opentrafficsim.editor.extensions.map.edit.HelperAnnotation.Helper
All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable, OtsShape
Enclosing class:
HelperAnnotation

public static class HelperAnnotation.Helper extends Object implements OtsShape
Helper annotation data.
  • Constructor Details

    • Helper

      public Helper(Point2d initialLocation, Function<? super Point2d,? extends PolyLine2d> lineFunction)
      Constructor.
      Parameters:
      initialLocation - initial location
      lineFunction - function to derive line from location draggable location
  • Method Details

    • setLocation

      public void setLocation(Point2d location)
      Sets the location (same as draggable being helped) and updates the line. Invoked by DraggableAnnotation when the draggable is moved or released.
      Parameters:
      location - location
    • getZ

      public double getZ()
      Specified by:
      getZ in interface nl.tudelft.simulation.dsol.animation.Locatable
    • getLocation

      public DirectedPoint2d getLocation()
      Specified by:
      getLocation in interface nl.tudelft.simulation.dsol.animation.Locatable
      Specified by:
      getLocation in interface OtsShape
    • getLine

      public PolyLine2d getLine()
      Returns the line.
      Returns:
      line
    • getRelativeContour

      public Polygon2d getRelativeContour()
      Specified by:
      getRelativeContour in interface OtsShape