public class PolygonalNode<T extends Agent> extends AreaNode<T>
Constructor and Description |
---|
PolygonalNode() |
PolygonalNode(Agent owner) |
PolygonalNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double[] dx,
double[] dy,
java.awt.Paint fillColor,
java.awt.Paint lineColor,
double lineWidth,
LineStyle lineStyle,
PositionChoiceMode positionChoiceMode,
Attractor... attractors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PolygonalNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double[] dx,
double[] dy,
java.awt.Paint fillColor,
java.awt.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
|
PolygonalNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double[] dx,
double[] dy,
java.awt.Paint fillColor,
java.awt.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
|
PolygonalNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double[] dx,
double[] dy,
Slope slope,
java.awt.Paint fillColor,
java.awt.Paint lineColor,
double lineWidth,
LineStyle lineStyle,
PositionChoiceMode positionChoiceMode,
Attractor... attractors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PolygonalNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double[] dx,
double[] dy,
Slope slope,
java.awt.Paint fillColor,
java.awt.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
|
PolygonalNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double[] dx,
double[] dy,
Slope slope,
java.awt.Paint fillColor,
java.awt.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
|
PolygonalNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
IAreaNodeDescriptor<T> descriptor,
double x,
double y,
double z,
double[] dx,
double[] dy,
java.awt.Paint fillColor,
java.awt.Paint lineColor,
double lineWidth,
LineStyle lineStyle,
PositionChoiceMode positionChoiceMode,
PathEnd<Path>[] pathEnds,
Attractor... attractors) |
PolygonalNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
IAreaNodeDescriptor<T> descriptor,
double x,
double y,
double z,
double[] dx,
double[] dy,
Slope slope,
java.awt.Paint fillColor,
java.awt.Paint lineColor,
double lineWidth,
LineStyle lineStyle,
PositionChoiceMode positionChoiceMode,
PathEnd<Path>[] pathEnds,
Attractor... attractors) |
Modifier and Type | Method and Description |
---|---|
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.
|
double |
area(AreaUnits units)
Returns the area of this area, measured in area units
|
boolean |
contains(double px,
double py)
Test 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)
|
BoundingRectangle |
getBoundingRectangle() |
double |
getNearestPoint(double x,
double y,
double z,
Point output)
Calculates (using the
output object) the point in this space markup element
nearest to the given (x, y, z) point. |
double |
getNearestPoint(double px,
double py,
Point output)
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(int i)
Returns the x coordinate of a particular point of the markup element relative to the start point.
|
double |
getPointDy(int i)
Returns the y coordinate of a particular point of the markup element relative to the start point.
|
Position |
getPosition(int index,
int totalNumber,
Position out)
Returns the item position with the given index.
|
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(java.util.Random rng,
Point out)
Returns the randomly chosen point inside/along the given space markup element.
|
accessRestrictionCondition, addAgent, addAreaDataSource, 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, setThroughput
addConnection, getCompatibleAgentExtensionClass, getConnection, getConnectionsCount, getMaterialLibraryDescriptor, getNumberOfTransporters, getTransferDistance, getTransferPositionByPercent, getTransporter, getTransporters, setFillColor, setFillColor
getDrawMode, getLevel, getNearestPoint, getNearestPoint, getNearestPoint, getNetwork, setLevel
error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner
discardOwner, executeUserAction, findSVGElement, getName, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNearestPoint, getNetwork, getSpace, randomPointInside, randomPointInside, randomPointInside
getSpace
getMarkup, setMarkup
setLevel
initializeInternal, onAggregatorVisibilityChanged, postInitialize
public 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, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, PathEnd<Path>[] pathEnds, Attractor... attractors)
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, java.awt.Paint fillColor, java.awt.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, java.awt.Paint fillColor, java.awt.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, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, boolean limitSpeed, double maxSpeedInMPS, PathEnd<Path>[] pathEnds, Attractor... attractors)
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, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, PathEnd<Path>[] pathEnds, Attractor... attractors)
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, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, boolean limitSpeed, double maxSpeedInMPS, PathEnd<Path>[] pathEnds, Attractor... attractors)
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, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, Attractor... attractors)
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, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, Attractor... attractors)
owner
- drawMode
- isPublic
- x
- y
- z
- dx
- dy
- fillColor
- lineColor
- lineWidth
- lineStyle
- positionChoiceMode
- attractors
- public void addVertex(double x, double y)
x
- x coordinate of the pointy
- y coordinate of the pointpublic Point randomPointInside(java.util.Random rng, Point out)
INetworkMarkupElement
randomPointInside
in interface INetworkMarkupElement
rng
- the random number generator.out
- output object to write to, may be null
public double getNearestPoint(double px, double py, Point output)
NetworkMarkupElement
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).getNearestPoint
in class NetworkMarkupElement
px
- x coordinate of the pointpy
- y coordinate of the pointoutput
- the output point to write result to. Note that output.z
is left unchanged.public double getNearestPoint(double x, double y, double z, Point output)
NetworkMarkupElement
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.getNearestPoint
in class NetworkMarkupElement
x
- x coordinate of the pointy
- y coordinate of the pointz
- z coordinate of the pointoutput
- the output point to write result to.public Position getPosition(int index, int totalNumber, Position out)
AnimationStaticLocationProvider
getPosition
in interface AnimationStaticLocationProvider
getPosition
in class AreaNode<T extends Agent>
index
- the index of some item positions, should be not negative and less than totalNumber
totalNumber
- the total number of item positions, should be positiveout
- output object to write to, may be null
public double getXMin()
AreaNode.getX()
is included)public double getXMax()
AreaNode.getX()
is included)public double getYMin()
AreaNode.getY()
is included)public double getYMax()
AreaNode.getY()
is included)public int getNPoints()
public double getPointDx(int i)
i
- the index of the point (starting from 0)AreaNode.getX()
, AreaNode.getY()
)public double getPointDy(int i)
i
- the index of the point (starting from 0)AreaNode.getX()
, AreaNode.getY()
)public boolean contains(double px, double py)
MarkupShape
contains
in interface INetworkMarkupElement
contains
in class MarkupShape
px
- the x coordinate relative to this shape's containerpy
- the y coordinate relative to this shape's containertrue
if the shape contains the point with the given
coordinates@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
Copyright © AnyLogic North America, LLC. All Rights Reserved.