AnyLogic
Expand
Font size
All Superinterfaces:
Locatable2D
All Known Subinterfaces:
Path3D
All Known Implementing Classes:
ShapeCurve, ShapeMultiplePoints, ShapePolyLine

public interface Path2D
extends Locatable2D
This interface represents a sequence of (x, y) points
Coordinates of all the points (getPointDx(int), getPointDy(int)) are relative to the base coordinates (getX(), getY())
Author:
AnyLogic North America, LLC https://anylogic.com

Method Summary

Modifier and TypeMethodDescription
intgetNPoints()
Returns the number of points in the path.
doublegetPointDx(int i)
Returns the x coordinate of a particular point of the path relative to the start point.
doublegetPointDy(int i)
Returns the y coordinate of a particular point of the path relative to the start point.
doublegetX()
Returns the base x coordinate of the path.
doublegetY()
Returns the base y coordinate of the path.

Method Details

getX

double getX()
Returns the base x coordinate of the path.
Specified by:
getX in interface Locatable2D
Returns:
the base x coordinate of the path

getY

double getY()
Returns the base y coordinate of the path.
Specified by:
getY in interface Locatable2D
Returns:
the base y coordinate of the path

getNPoints

int getNPoints()
Returns the number of points in the path.
Returns:
the number of points in the path

getPointDx

double getPointDx(int i)
Returns the x coordinate of a particular point of the path relative to the start point.
Parameters:
i - the index of the point (starting from 0)
Returns:
the x coordinate of the point relative to the start point

getPointDy

double getPointDy(int i)
Returns the y coordinate of a particular point of the path relative to the start point.
Parameters:
i - the index of the point (starting from 0)
Returns:
the y coordinate of the point relative to the start point