N
- network node based on com.anylogic.engine.markup.INode
interfacepublic interface IPath<N extends INode> extends INetworkMarkupElement, AnimationMovingLocationProvider
Modifier and Type | Method and Description |
---|---|
Point |
getEndPoint()
Returns the location of the end point
|
Point |
getEndPoint(Point out)
Returns the location of the end point
|
Position |
getEndPosition(Position position)
Returns the end position
|
java.awt.Color |
getLineColor()
Returns the line color of the markup element, or
null if markup element has no line color or
has textured line (in this case getLineTexture() should be used instead) |
Texture |
getLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
|
double |
getLineWidth()
Returns the line width of the markup element.
|
java.lang.String |
getName()
If the markup shape is declared as field in an agent class, e.g. if it was drawn
in the graphical editor, returns the name of the field, otherwise returns the
string
#UNKNOWN_NAME . |
N |
getOtherNode(N n)
If the given node is source of this path, returns path's target,
otherwise returns source.
|
Position |
getPositionAtOffset(double offset,
LengthUnits units,
Position out)
Returns the point (+rotations) located on the markup element with the given
offset
distance calculated from start point. |
Position |
getPositionAtOffset(double offset,
Position out)
Returns the point (+rotations) located on the markup element with the given
offset
distance calculated from start point. |
IMarkupSegment |
getSegment(int index)
Returns the segment by its index
|
int |
getSegmentCount()
Returns the number of segments
|
N |
getSource()
Returns source node of this path.
|
Point |
getStartPoint()
Returns the location of the start point
|
Point |
getStartPoint(Point out)
Returns the location of the start point
|
Position |
getStartPosition(Position position)
Returns the start position
|
N |
getTarget()
Returns target node of this path.
|
boolean |
isBidirectional()
Returns the 'bidirectional' property (
true by default). |
java.util.Iterator<? extends IMarkupSegment> |
iterator()
Returns iterator over segments of the path
|
void |
setBidirectional(boolean bidirectional)
Sets the 'bidirectional' property (
true by default). |
void |
setLineColor(java.awt.Paint lineColor)
Sets the line color (or
Texture ) of the markup element. |
void |
setLineWidth(double width)
Sets the line width of the markup element, 0 means thinnest possible
|
void |
setSource(N node)
Sets source node of this path.
|
void |
setTarget(N node)
Sets source node of this path.
|
contains, getNearestPoint, getNetwork, getSpace, randomPointInside, randomPointInside, randomPointInside, randomPointInside
getPosition, length, length
getPosition, getSpace
N getSource()
com.anylogic.engine.markup.INode
interfacevoid setSource(N node)
initialize()
method.node
- instance of com.anylogic.engine.markup.INode
interfaceN getTarget()
com.anylogic.engine.markup.INode
interfacevoid setTarget(N node)
initialize()
method.node
- instance of com.anylogic.engine.markup.INode
interfacePoint getStartPoint()
Point getStartPoint(Point out)
out
- output object to write to, may be null
Point getEndPoint()
Point getEndPoint(Point out)
out
- output object to write to, may be null
boolean isBidirectional()
true
by default).true
for paths which allow movements
in both directions, false
for paths which allow movements
from source to target onlyvoid setBidirectional(boolean bidirectional)
true
by default).bidirectional
- true
for paths which allow movements
in both directions, false
for paths which allow movements
from source to target onlyisBidirectional()
int getSegmentCount()
IMarkupSegment getSegment(int index)
index
- the segment index, [0 .. getSegmentCount()
- 1]java.util.Iterator<? extends IMarkupSegment> iterator()
N getOtherNode(N n)
n
- the node (one of the path endings)java.lang.String getName()
#UNKNOWN_NAME
.
For replicated shapes returns the name of the field with the index of the shape
in square brackets.#UNKNOWN_NAME
Position getPositionAtOffset(double offset, Position out)
offset
distance calculated from start point.offset
- offset, non-negative value, should be less or equal to the full length.out
- output object to write to, may be null
Position getPositionAtOffset(double offset, LengthUnits units, Position out)
offset
distance calculated from start point.offset
- offset, non-negative value, should be less or equal to the full length.units
- the length unitsout
- output object to write to, may be null
Position getStartPosition(Position position)
out
- output object to write to, may be null
Position getEndPosition(Position position)
out
- output object to write to, may be null
java.awt.Color getLineColor()
null
if markup element has no line color or
has textured line (in this case getLineTexture()
should be used instead)void setLineColor(java.awt.Paint lineColor)
Texture
) of the markup element.lineColor
- the new line color, null = do not draw the markup element lineTexture getLineTexture()
double getLineWidth()
void setLineWidth(double width)
width
- the new line width of the markup elementCopyright © AnyLogic North America, LLC. All Rights Reserved.