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
Helper annotation data.
-
Field Summary
Fields inherited from interface org.opentrafficsim.base.geometry.OtsShape
DEFAULT_POLYGON_SEGMENTS, WORLD_MARGIN_LINE -
Constructor Summary
ConstructorsConstructorDescriptionHelper(Point2d initialLocation, Function<? super Point2d, ? extends PolyLine2d> lineFunction) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetLine()Returns the line.doublegetZ()voidsetLocation(Point2d location) Sets the location (same as draggable being helped) and updates the line.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opentrafficsim.base.geometry.OtsShape
contains, contains, getAbsoluteBounds, getAbsoluteContour, getAbsoluteContour, getDirZ, getRelativeBounds, signedDistance, signedDistance
-
Constructor Details
-
Helper
Constructor.- Parameters:
initialLocation- initial locationlineFunction- function to derive line from location draggable location
-
-
Method Details
-
setLocation
Sets the location (same as draggable being helped) and updates the line. Invoked byDraggableAnnotationwhen the draggable is moved or released.- Parameters:
location- location
-
getZ
public double getZ()- Specified by:
getZin interfacenl.tudelft.simulation.dsol.animation.Locatable
-
getLocation
- Specified by:
getLocationin interfacenl.tudelft.simulation.dsol.animation.Locatable- Specified by:
getLocationin interfaceOtsShape
-
getLine
Returns the line.- Returns:
- line
-
getRelativeContour
- Specified by:
getRelativeContourin interfaceOtsShape
-