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

All Methods Instance Methods Abstract Methods 
int getNPoints()
Returns the number of points in the path.
double getPointDx​(int i)
Returns the x coordinate of a particular point of the path relative to the start point.
double getPointDy​(int i)
Returns the y coordinate of a particular point of the path relative to the start point.
double getX()
Returns the base x coordinate of the path.
double getY()
Returns the base y coordinate of the path.
Modifier and Type Method Description

Method Detail

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
How can we improve this article?