AnyLogic
Expand
Font size
All Superinterfaces:
Locatable2D
All Known Subinterfaces:
Segment3D
All Known Implementing Classes:
ShapeArrowLine, ShapeLine

public interface Segment2D
extends Locatable2D
This interface represents a segment: (x, y) - (x+dx, y+dy)
Author:
AnyLogic North America, LLC https://anylogic.com

Method Summary

Modifier and TypeMethodDescription
doublegetDx()
Returns the x-offset of the end segment point relative to the start one (the difference of x coordinates of the segment end and start points).
doublegetDy()
Returns the y-offset of the end segment point relative to the start one (the difference of y coordinates of the segment end and start points).
doublegetEndX()
Returns the x coordinate of the segment end point.
doublegetEndY()
Returns the y coordinate of the segment end point.
doublegetX()
Returns the x coordinate of the start segment point.
doublegetY()
Returns the y coordinate of the start segment point.

Method Details

getX

double getX()
Returns the x coordinate of the start segment point.
Specified by:
getX in interface Locatable2D
Returns:
the x coordinate of the start segment point

getY

double getY()
Returns the y coordinate of the start segment point.
Specified by:
getY in interface Locatable2D
Returns:
the y coordinate of the start segment point

getDx

double getDx()
Returns the x-offset of the end segment point relative to the start one (the difference of x coordinates of the segment end and start points).
Returns:
the x-offset of the end segment point relative to the start one

getDy

double getDy()
Returns the y-offset of the end segment point relative to the start one (the difference of y coordinates of the segment end and start points).
Returns:
the y-offset of the end segment point relative to the start one

getEndX

double getEndX()
Returns the x coordinate of the segment end point.
Returns:
the x coordinate of the segment end

getEndY

double getEndY()
Returns the y coordinate of the segment end point.
Returns:
the y coordinate of the segment end