Package com.anylogic.engine.presentation
- Field Summary
- Fields inherited from class com.anylogic.engine.presentation.Shape3D
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.presentation.ShapeLineFill
- Methods inherited from class com.anylogic.engine.presentation.Shape3D
- Methods inherited from class com.anylogic.engine.presentation.Shape
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.Locatable3D
- Methods inherited from interface com.anylogic.engine.Path2D
- Methods inherited from interface com.anylogic.engine.Path3D
- Constructor Detail
- Method Detail
- java.lang.Object
-
- com.anylogic.engine.presentation.Shape
-
- com.anylogic.engine.presentation.Shape3D
-
- com.anylogic.engine.presentation.ShapeLineFill
-
- com.anylogic.engine.presentation.ShapeMultiplePoints
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,Locatable2D
,Locatable3D
,AggregatableAnimationElement
,HasLevel
,LevelElement
,Path2D
,Path3D
,SVGElement
,java.io.Serializable
,java.lang.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
UNKNOWN_NAME
ShapeMultiplePoints() |
|
Constructor | Description |
---|
int |
getNPoints() |
Returns the number of points in the shape.
|
double |
getPointDx(int i) |
Returns the x coordinate of a particular point of the shape relative to the start point.
|
double |
getPointDy(int i) |
Returns the y coordinate of a particular point of the shape relative to the start point.
|
double |
getPointDz(int i) |
Returns the z coordinate of a particular point of the shape relative to the start point.
|
boolean |
isClosed() |
Returns the closed/open status of the shape.
|
void |
setClosed(boolean closed) |
Sets the shape closed or open.
|
void |
setNPoints(int n) |
Sets the number of points in the shape.
|
void |
setPoint(int i,
double ptdx,
double ptdy) |
Sets the coordinates of a particular point of the shape relative to the start point.
|
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.
|
void |
setPointDx(int i,
double ptdx) |
Sets the x coordinate of a particular point of the shape relative to the start point.
|
void |
setPointDy(int i,
double ptdy) |
Sets the y coordinate of a particular point of the shape relative to the start point.
|
void |
setPointDz(int i,
double ptdz) |
Sets the z coordinate of a particular point of the shape relative to the start point.
|
Modifier and Type | Method | Description |
---|
getFillColor, getFillTexture, getLineColor, getLineStyle, getLineTexture, getLineWidth, getPresentable, getZHeight, getZOffset, postSVGShapeSpecificAttributes, setContextReference_xjal, setFillColor, setFillColor, setLineColor, setLineColor, setLineStyle, setLineWidth, setZHeight
canHandleClick, getDrawMode, getScaleZ, getZ, setDrawMode, setPos, setPos, setPos, setRotation, setScale, setScale, setScaleZ, setZ
clone, contains, executeUserAction, findSVGElement, getGroup, getLevel, getName, getRotation, getScaleX, getScaleY, getSVGId, getX, getY, isJava2DSwingPresentation, isPublic_xjal, isSVGPresentation, isVisible, onAggregatorVisibilityChanged, onClick, randomPointInside, randomPointInside, removeSVGFromOwner, removeSVGImage, resetSVGState, restoreOwner, setLevel, setPublic_xjal, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeInternal, postInitialize
getZOffset
getX, getY
getZ
public ShapeMultiplePoints()
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
public int getNPoints()
Returns the number of points in the shape.
- Specified by:
getNPoints
in interfacePath2D
- Returns:
- the number of points in the shape
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 pointptdy
- the new y coordinate of the point relative to the start point
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 pointptdy
- the new y coordinate of the point relative to the start pointptdz
- the new z coordinate of the point relative to the start point
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
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 interfacePath2D
- Parameters:
i
- the index of the point (starting from 0)- Returns:
- the x coordinate of the point relative to the start point
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
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 interfacePath2D
- Parameters:
i
- the index of the point (starting from 0)- Returns:
- the y coordinate of the point relative to the start point
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
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 interfacePath3D
- Parameters:
i
- the index of the point (starting from 0)- Returns:
- the z coordinate of the point relative to the start point
public void setClosed(boolean closed)
Sets the shape closed or open.
- Parameters:
closed
-true
- closed,false
- open
public boolean isClosed()
Returns the closed/open status of the shape.
- Returns:
true
- closed,false
- open
-
How can we improve this article?
-