AnyLogic
Expand
Font size
All Implemented Interfaces:
com.anylogic.engine.internal.Child, Locatable2D, Locatable3D, AggregatableAnimationElement, HasLevel, LevelElement, Path2D, Path3D, SVGElement, Serializable, Cloneable
Direct Known Subclasses:
ShapePolyLine

public abstract class ShapeMultiplePoints
extends ShapeLineFill
implements Path3D
A base class for shapes having multiple points, such as polyline or curve.
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Field Summary

Fields inherited from class com.anylogic.engine.presentation.Shape3D

UNKNOWN_NAME

Constructor Summary

ConstructorDescription
ShapeMultiplePoints() 

Method Summary

Modifier and TypeMethodDescription
intgetNPoints()
Returns the number of points in the shape.
doublegetPointDx(int i)
Returns the x coordinate of a particular point of the shape relative to the start point.
doublegetPointDy(int i)
Returns the y coordinate of a particular point of the shape relative to the start point.
doublegetPointDz(int i)
Returns the z coordinate of a particular point of the shape relative to the start point.
booleanisClosed()
Returns the closed/open status of the shape.
voidsetClosed(boolean closed)
Sets the shape closed or open.
voidsetNPoints(int n)
Sets the number of points in the shape.
voidsetPoint(int i, double ptdx, double ptdy)
Sets the coordinates of a particular point of the shape relative to the start point.
voidsetPoint(int i, double ptdx, double ptdy, double ptdz)
Sets the coordinates of a particular point of the shape relative to the start point.
voidsetPointDx(int i, double ptdx)
Sets the x coordinate of a particular point of the shape relative to the start point.
voidsetPointDy(int i, double ptdy)
Sets the y coordinate of a particular point of the shape relative to the start point.
voidsetPointDz(int i, double ptdz)
Sets the z coordinate of a particular point of the shape relative to the start point.

Methods inherited from class com.anylogic.engine.presentation.Shape3D

canHandleClick, getDrawMode, getScaleZ, getZ, setDrawMode, setPos, setPos, setPos, setRotation, setScale, setScale, setScaleZ, setZ

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, postInitialize

Methods inherited from interface com.anylogic.engine.Locatable3D

getZOffset

Methods inherited from interface com.anylogic.engine.Path2D

getX, getY

Methods inherited from interface com.anylogic.engine.Path3D

getZ

Constructor Details

ShapeMultiplePoints

public ShapeMultiplePoints()

Method Details

setNPoints

public void setNPoints(int n)
Sets the number of points in the shape. Does nothing if the number of points equals the current one. If it is different, the maximum possible portion of points keep their coordinates in the new shape.
Parameters:
n - the new number of points

getNPoints

public int getNPoints()
Returns the number of points in the shape.
Specified by:
getNPoints in interface Path2D
Returns:
the number of points in the shape

setPoint

public void setPoint(int i,
 double ptdx,
 double ptdy)
Sets the coordinates of a particular point of the shape relative to the start point.
Parameters:
i - the index of the point (starting from 0)
ptdx - the new x coordinate of the point relative to the start point
ptdy - the new y coordinate of the point relative to the start point

setPoint

public void setPoint(int i,
 double ptdx,
 double ptdy,
 double ptdz)
Sets the coordinates of a particular point of the shape relative to the start point.
Parameters:
i - the index of the point (starting from 0)
ptdx - the new x coordinate of the point relative to the start point
ptdy - the new y coordinate of the point relative to the start point
ptdz - the new z coordinate of the point relative to the start point

setPointDx

public void setPointDx(int i,
 double ptdx)
Sets the x coordinate of a particular point of the shape relative to the start point.
Parameters:
i - the index of the point (starting from 0)
ptdx - the new x coordinate of the point relative to the start point

getPointDx

public double getPointDx(int i)
Returns the x coordinate of a particular point of the shape relative to the start point.
Specified by:
getPointDx in interface Path2D
Parameters:
i - the index of the point (starting from 0)
Returns:
the x coordinate of the point relative to the start point

setPointDy

public void setPointDy(int i,
 double ptdy)
Sets the y coordinate of a particular point of the shape relative to the start point.
Parameters:
i - the index of the point (starting from 0)
ptdy - the new y coordinate of the point relative to the start point

getPointDy

public double getPointDy(int i)
Returns the y coordinate of a particular point of the shape relative to the start point.
Specified by:
getPointDy in interface Path2D
Parameters:
i - the index of the point (starting from 0)
Returns:
the y coordinate of the point relative to the start point

setPointDz

public void setPointDz(int i,
 double ptdz)
Sets the z coordinate of a particular point of the shape relative to the start point.
Parameters:
i - the index of the point (starting from 0)
ptdz - the new z coordinate of the point relative to the start point

getPointDz

public double getPointDz(int i)
Returns the z coordinate of a particular point of the shape relative to the start point.
Specified by:
getPointDz in interface Path3D
Parameters:
i - the index of the point (starting from 0)
Returns:
the z coordinate of the point relative to the start point

setClosed

public void setClosed(boolean closed)
Sets the shape closed or open.
Parameters:
closed - true - closed, false - open

isClosed

public boolean isClosed()
Returns the closed/open status of the shape.
Returns:
true - closed, false - open