public class RectangularNode<T extends Agent> extends AreaNode<T>
Constructor and Description |
---|
RectangularNode() |
RectangularNode(Agent owner) |
RectangularNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double width,
double height,
double rotation,
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
|
RectangularNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double width,
double height,
double rotation,
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
|
RectangularNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double width,
double height,
double rotation,
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
|
RectangularNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double width,
double height,
double rotation,
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
|
RectangularNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double width,
double height,
double rotation,
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
|
RectangularNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double z,
double width,
double height,
double rotation,
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
|
RectangularNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
IAreaNodeDescriptor<T> descriptor,
double x,
double y,
double z,
double width,
double height,
double rotation,
java.awt.Paint fillColor,
java.awt.Paint lineColor,
double lineWidth,
LineStyle lineStyle,
PositionChoiceMode positionChoiceMode,
PathEnd<Path>[] pathEnds,
Attractor... attractors) |
RectangularNode(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
IAreaNodeDescriptor<T> descriptor,
double x,
double y,
double z,
double width,
double height,
double rotation,
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 |
---|---|
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() |
Point |
getCenter()
Returns coordinates of the rectangle center.
|
Point |
getCenter(Point p)
Returns coordinates of the rectangle center.
|
double |
getHeight()
Returns the height of the markup shape.
|
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. |
Point[] |
getPoints() |
Position |
getPosition(int index,
int totalNumber,
Position out)
Returns the item position with the given index.
|
double |
getRotation()
Returns the rotation of the shape.
|
double |
getWidth()
Returns the width of the markup shape.
|
Point |
randomPointInside(java.util.Random rng,
Point out)
Returns the randomly chosen point inside/along the given space markup element.
|
void |
setRotation(double rotation)
Sets the rotation of the shape.
|
void |
setSize(double width,
double height)
Sets the width and height of the markup shape.
|
Area3D |
toArea3D()
Returns the 3D representation of this area
|
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 RectangularNode()
public RectangularNode(Agent owner)
@Deprecated public RectangularNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double width, double height, double rotation, 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
- width
- height
- rotation
- slope
- fillColor
- lineColor
- lineWidth
- lineStyle
- positionChoiceMode
- pathEnds
- attractors
- @AnyLogicInternalCodegenAPI public RectangularNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, IAreaNodeDescriptor<T> descriptor, double x, double y, double z, double width, double height, double rotation, Slope slope, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, PathEnd<Path>[] pathEnds, Attractor... attractors)
@AnyLogicInternalCodegenAPI public RectangularNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, IAreaNodeDescriptor<T> descriptor, double x, double y, double z, double width, double height, double rotation, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, PathEnd<Path>[] pathEnds, Attractor... attractors)
@Deprecated public RectangularNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double width, double height, double rotation, 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
- width
- height
- rotation
- slope
- fillColor
- lineColor
- lineWidth
- lineStyle
- positionChoiceMode
- limitSpeed
- maxSpeedInMPS
- pathEnds
- attractors
- @Deprecated public RectangularNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double width, double height, double rotation, 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
- width
- height
- rotation
- fillColor
- lineColor
- lineWidth
- lineStyle
- positionChoiceMode
- pathEnds
- attractors
- @Deprecated public RectangularNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double width, double height, double rotation, 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
- width
- height
- rotation
- fillColor
- lineColor
- lineWidth
- lineStyle
- positionChoiceMode
- limitSpeed
- maxSpeedInMPS
- pathEnds
- attractors
- @Deprecated public RectangularNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double width, double height, double rotation, Slope slope, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, Attractor... attractors)
owner
- drawMode
- isPublic
- x
- y
- z
- width
- height
- rotation
- slope
- fillColor
- lineColor
- lineWidth
- lineStyle
- positionChoiceMode
- attractors
- @Deprecated public RectangularNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double width, double height, double rotation, java.awt.Paint fillColor, java.awt.Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, Attractor... attractors)
owner
- drawMode
- isPublic
- x
- y
- z
- width
- height
- rotation
- fillColor
- lineColor
- lineWidth
- lineStyle
- positionChoiceMode
- attractors
- public double getWidth()
public double getHeight()
public void setSize(double width, double height)
width
- the new width of the markup shapeheight
- the new height of the markup shapepublic void setRotation(double rotation)
r
- the new value of rotation in radianspublic double getRotation()
public 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.@AnyLogicInternalAPI public double area(AreaUnits units)
AreaNode
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
coordinatespublic Point getCenter()
public Point getCenter(Point p)
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
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
@AnyLogicInternalAPI public Point[] getPoints()
public Area3D toArea3D()
Copyright © AnyLogic North America, LLC. All Rights Reserved.