Package com.anylogic.engine.markup
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.AreaNode
- Methods inherited from class com.anylogic.engine.markup.Node
- Methods inherited from class com.anylogic.engine.markup.NetworkMarkupElement
- Methods inherited from class com.anylogic.engine.markup.MarkupShape
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkup
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AbstractPositionalMarkup
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.markup.AnimationStaticLocationProvider
- Methods inherited from interface com.anylogic.engine.markup.HasLevel
- Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
- Methods inherited from interface com.anylogic.engine.markup.INetworkMarkupElement
- Methods inherited from interface com.anylogic.engine.markup.INode
- Methods inherited from interface java.lang.Iterable
- Methods inherited from interface com.anylogic.engine.markup.LevelElement
- Methods inherited from interface com.anylogic.engine.presentation.SVGElement
- Methods inherited from interface com.anylogic.engine.presentation.UsdElement
- Constructor Details
- Method Details
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkup
- com.anylogic.engine.markup.MarkupShape
- com.anylogic.engine.markup.NetworkMarkupElement
- com.anylogic.engine.markup.Node
- com.anylogic.engine.markup.AreaNode<T>
- com.anylogic.engine.markup.PolygonalNode<T>
- All Implemented Interfaces:
AbstractPositionalMarkup,AggregatableAnimationElement,AnimationStaticLocationProvider,IAreaNodeDescriptor<T>,IDescriptor,HasBoundingRectangle,HasLevel,IMarkupLibraryDescriptor,INetworkMarkupElement,INode<Node,,Path> LevelElement,LevelMarkup,com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor,com.anylogic.engine.markup.material_handling.INodeDescriptor<Agent>,SVGElement,UsdElement,Serializable,Iterable<T>
- Direct Known Subclasses:
QueueArea
public class PolygonalNode<T extends Agent> extends AreaNode<T> implements HasBoundingRectangle
- See Also:
- Serialized Form
| Constructor | Description |
|---|---|
PolygonalNode() | |
PolygonalNode | |
PolygonalNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PolygonalNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PolygonalNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PolygonalNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PolygonalNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PolygonalNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PolygonalNode | |
PolygonalNode |
| Modifier and Type | Method | Description |
|---|---|---|
void | addVertex |
Adds a point to the collection of vertices that will be used to initialize the polygon of this node.
|
double | area |
Returns the area of this area, measured in area units
|
boolean | contains |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
BoundingRectangle | getBoundingRectangle() | |
double | getNearestPoint |
Calculates (using the
output object) the point in this space markup element
nearest to the given (x, y, z) point. |
double | getNearestPoint |
Calculates (using the
output object) the point in this space markup element
nearest to the given (x, y) point. |
int | getNPoints() |
Returns the number of points in the markup element.
|
double | getPointDx |
Returns the x coordinate of a particular point of the markup element relative to the start point.
|
double | getPointDy |
Returns the y coordinate of a particular point of the markup element relative to the start point.
|
Position | getPosition |
Returns the item position with the given index.
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1). |
double | getXMax() |
Returns the x coordinate of the bottom-right corner of bounding rectangle for this markup element.
|
double | getXMin() |
Returns the x coordinate of the top-left corner of bounding rectangle for this markup element.
|
double | getYMax() |
Returns the y coordinate of the bottom-right corner of bounding rectangle for this markup element.
|
double | getYMin() |
Returns the y coordinate of the top-left corner of bounding rectangle for this markup element.
|
Point | randomPointInside |
Returns the randomly chosen point inside/along the given space markup element.
|
accessRestrictionCondition, addAgent, addAreaDataSource, addAttractor, addAttractor, agents, close, contains, density, getAccessRestrictionType, getAdmittedTransporters, getAgentsWaitingToEnter, getAttractors, getCapacity, getFillColor, getFillTexture, getLineColor, getLineStyle, getLineTexture, getLineWidth, getMaxSpeed, getNumberOfAdmittedAgents, getNumberOfAdmittedTransporters, getPeds, getPositionChoiceMode, getRestrictedAgentClass, getSchedule, getSlope, getThroughput, getX, getY, getZ, getZ, isAccessRestricted, isAllowedToEnter, isApplied, isAvoidedIfClosed, isLimitSpeed, isOpen, isReadyToEnter, isSpeedRestricted, iterator, notifyCancelReadyToEnter, notifyReadyToEnter, notifyReadyToEnter2, notifyReadyToExit, onClose, onEnter, onEnterDenied, onExit, onOpen, open, recalculateAccessibility, removeAgent, removeAreaDataSource, removeFromQueue, restrictAccessByCapacity, restrictAccessBySchedule, restrictAccessByThroughput, restrictAccessManually, restrictSpeed, setAccessRestricted, setAccessRestrictionType, setAvoidedIfClosed, setCapacity, setLimitSpeed, setLineColor, setLineColor, setLineStyle, setLineWidth, setMaxSpeed, setOpen, setPos, setPositionChoiceMode, setRestrictedAgentClass, setSchedule, setSlope, setSpeedRestricted, setThroughputaddConnection, getCompatibleAgentExtensionClass, getConnection, getConnectionsCount, getMaterialLibraryDescriptor, getNumberOfTransporters, getTransferDistance, getTransferPositionByPercent, getTransporter, getTransporters, setFillColor, setFillColorerror, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isOnly3D, isPublic, onClick, remove, setDrawMode, setOwnerdiscardOwner, executeUserAction, findSVGElement, getGroupOrOwner, getInspect, getInspectionWindowString, getName, getOrGenerateUSDId, getSVGComponent, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setInspect, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGPropertiesMethods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
getMarkup, setMarkupexecuteUserAction, findSVGElement, getGroupOrOwner, getPresentable, getSVGComponent, getSVGId, isOnly3D, removeSVGFromOwner, resetSVGState, updateSVGPropertiespublic PolygonalNode()
public PolygonalNode(Agent owner)
@Deprecated public PolygonalNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double[] dx, double[] dy, Slope slope, Paint fillColor, Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, PathEnd<Path>[] pathEnds, Attractor... attractors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner-drawMode-isPublic-x-y-z-dx-dy-slope-fillColor-lineColor-lineWidth-lineStyle-positionChoiceMode-pathEnds-attractors-
@AnyLogicInternalCodegenAPI public PolygonalNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, IAreaNodeDescriptor<T> descriptor, double x, double y, double z, double[] dx, double[] dy, Slope slope, Paint fillColor, Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, PathEnd<Path>[] pathEnds, Attractor... attractors)
@AnyLogicInternalCodegenAPI public PolygonalNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, IAreaNodeDescriptor<T> descriptor, double x, double y, double z, double[] dx, double[] dy, Paint fillColor, Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, PathEnd<Path>[] pathEnds, Attractor... attractors)
@Deprecated public PolygonalNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double[] dx, double[] dy, Slope slope, Paint fillColor, Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, boolean limitSpeed, double maxSpeedInMPS, PathEnd<Path>[] pathEnds, Attractor... attractors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner-drawMode-isPublic-x-y-z-dx-dy-slope-fillColor-lineColor-lineWidth-lineStyle-positionChoiceMode-limitSpeed-maxSpeedInMPS-pathEnds-attractors-
@Deprecated public PolygonalNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double[] dx, double[] dy, Paint fillColor, Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, PathEnd<Path>[] pathEnds, Attractor... attractors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner-drawMode-isPublic-x-y-z-dx-dy-fillColor-lineColor-lineWidth-lineStyle-positionChoiceMode-pathEnds-attractors-
@Deprecated public PolygonalNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double[] dx, double[] dy, Paint fillColor, Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, boolean limitSpeed, double maxSpeedInMPS, PathEnd<Path>[] pathEnds, Attractor... attractors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner-drawMode-isPublic-x-y-z-dx-dy-fillColor-lineColor-lineWidth-lineStyle-positionChoiceMode-limitSpeed-maxSpeedInMPS-pathEnds-attractors-
@Deprecated public PolygonalNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double[] dx, double[] dy, Slope slope, Paint fillColor, Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, Attractor... attractors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner-drawMode-isPublic-x-y-z-dx-dy-slope-fillColor-lineColor-lineWidth-lineStyle-positionChoiceMode-attractors-
@Deprecated public PolygonalNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double[] dx, double[] dy, Paint fillColor, Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, Attractor... attractors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner-drawMode-isPublic-x-y-z-dx-dy-fillColor-lineColor-lineWidth-lineStyle-positionChoiceMode-attractors-
public void addVertex(double x, double y)
Adds a point to the collection of vertices that will be used to initialize the polygon of this node.
The element should be uninitialized
- Parameters:
x- x coordinate of the pointy- y coordinate of the point
public Point randomPointInside(Random rng, Point out)
Description copied from interface:
INetworkMarkupElementReturns the randomly chosen point inside/along the given space markup element.
This method utilises the given Random Number Generator.
- Specified by:
randomPointInsidein interfaceINetworkMarkupElement- Parameters:
rng- the random number generator.out- output object to write to, may benull- Returns:
- the randomly chosen point
public double getNearestPoint(double px, double py, Point output)
Description copied from class:
NetworkMarkupElementCalculates (using the
output object) the point in this space markup element
nearest to the given (x, y) point. Returns the square of distance to the point
(in the XY-projection).
All the calculations are performed in the horizontal projection (z-coordinates aren't used,
as if all of the z coordinates were zero).- Specified by:
getNearestPointin classNetworkMarkupElement- Parameters:
px- x coordinate of the pointpy- y coordinate of the pointoutput- the output point to write result to. Note thatoutput.zis left unchanged.- Returns:
- the square of distance to the nearest point in the horizontal (XY) projection
public double getNearestPoint(double x, double y, double z, Point output)
Description copied from class:
NetworkMarkupElementCalculates (using the
output object) the point in this space markup element
nearest to the given (x, y, z) point. Returns the square of distance to the point.- Specified by:
getNearestPointin classNetworkMarkupElement- Parameters:
x- x coordinate of the pointy- y coordinate of the pointz- z coordinate of the pointoutput- the output point to write result to.- Returns:
- the square of distance to the nearest point
public Position getPosition(int index, int totalNumber, Position out)
Description copied from interface:
AnimationStaticLocationProviderReturns the item position with the given index.
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
- Specified by:
getPositionin interfaceAnimationStaticLocationProvider- Overrides:
getPositionin classAreaNode<T extends Agent>- Parameters:
index- the index of some item positions, should be not negative and less thantotalNumbertotalNumber- the total number of item positions, should be positiveout- output object to write to, may benull- Returns:
- the Position object with coordinates of the requested item position
public double getXMin()
Returns the x coordinate of the top-left corner of bounding rectangle for this markup element.
(
AreaNode.getX() is included)- Returns:
- the minimum x coordinate of the markup element
public double getXMax()
Returns the x coordinate of the bottom-right corner of bounding rectangle for this markup element.
(
AreaNode.getX() is included)- Returns:
- the maximum x coordinate of the markup element
- Since:
- 6.8
public double getYMin()
Returns the y coordinate of the top-left corner of bounding rectangle for this markup element.
(
AreaNode.getY() is included)- Returns:
- the minimum y coordinate of the markup element
- Since:
- 6.8
public double getYMax()
Returns the y coordinate of the bottom-right corner of bounding rectangle for this markup element.
(
AreaNode.getY() is included)- Returns:
- the maximum y coordinate of the markup element
- Since:
- 6.8
public int getNPoints()
Returns the number of points in the markup element.
- Returns:
- the number of points in the markup element
public double getPointDx(int i)
Returns the x coordinate of a particular point of the markup element 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 (
AreaNode.getX(),AreaNode.getY())
public double getPointDy(int i)
Returns the y coordinate of a particular point of the markup element 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 (
AreaNode.getX(),AreaNode.getY())
public boolean contains(double px, double py)
Description copied from class:
MarkupShapeTest if the shape contains the point with the given coordinates (relative
to this shape's container, i.e. in the same system with the coordinates
of this shape, x and y)
- Specified by:
containsin interfaceINetworkMarkupElement- Specified by:
containsin classMarkupShape- Parameters:
px- the x coordinate relative to this shape's containerpy- the y coordinate relative to this shape's container- Returns:
trueif the shape contains the point with the given coordinates
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
- Specified by:
getBoundingRectanglein interfaceHasBoundingRectangle
@AnyLogicInternalAPI public double area(AreaUnits units)
Description copied from class:
AreaNodeReturns the area of this area, measured in area units