Package com.anylogic.engine.markup
- Field Summary
- Constructor Summary
- Method Summary
- 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 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
- getConnectors
- addConnector
- getRadius
- setRadius
- getConnector
- getConnectedExternalPaths
- getConnectedInternalPaths
- randomPointInside
- getX
- getY
- getZ
- setPos
- setPos
- getXYZ
- getXYZ
- setLineColor
- setLineColor
- getLineColor
- getLineTexture
- getNearestPoint
- getNearestPoint
- contains
- getPosition
- getTransferPositionByPercent
- getBoundingRectangle
- 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.PointNode
- All Implemented Interfaces:
AbstractPositionalMarkup
,AggregatableAnimationElement
,AnimationStaticLocationProvider
,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
public class PointNode extends Node implements AbstractPositionalMarkup
- See Also:
- Serialized Form
Constructor | Description |
---|---|
PointNode() | |
PointNode | |
PointNode | |
PointNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PointNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PointNode |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. It is public due to technical reasons. |
PointNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PointNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
PointNode |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
Modifier and Type | Method | Description |
---|---|---|
void | addConnector |
Adds internal path connector to the inside of this node.
|
boolean | contains |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
BoundingRectangle | getBoundingRectangle() | |
Collection<Path> | getConnectedExternalPaths | |
Collection<Path> | getConnectedInternalPaths | |
PathConnector<Path, | getConnector |
Return a connection between two paths inside the node.
|
List<PathConnector<Path, | getConnectors() | |
Color | getLineColor() |
The same as
Node.getFillColor() |
Texture | getLineTexture() |
The same as
Node.getFillTexture() |
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. |
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 | getRadius() |
Returns the radius of this point node
|
Position | getTransferPositionByPercent | |
double | getX() |
Returns the x coordinate
|
Point | getXYZ() |
Returns (x, y, z) coordinates of this node
|
Point | getXYZ |
Returns (x, y, z) coordinates of this node
|
double | getY() |
Returns the y coordinate
|
double | getZ() |
Returns the z coordinate of the node.
|
Point | randomPointInside |
Returns the randomly chosen point inside/along the given space markup element.
|
void | setLineColor |
The same as
Node.setFillColor(Color) |
void | setLineColor |
The same as
Node.setFillColor(Paint) |
void | setPos |
Sets coordinates of the point node
|
void | setPos |
Sets coordinates of the point node
|
void | setRadius |
Sets the radius of this point node.
|
addConnection, getCompatibleAgentExtensionClass, getConnection, getConnectionsCount, getFillColor, getFillTexture, getMaterialLibraryDescriptor, getMaxSpeed, getNumberOfTransporters, getTransferDistance, getTransporter, getTransporters, isLimitSpeed, setFillColor, setFillColor, setLimitSpeed, setMaxSpeed
error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner
discardOwner, executeUserAction, findSVGElement, getName, getOrGenerateUSDId, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
getMarkup, setMarkup
public PointNode()
public PointNode(Agent owner)
public PointNode(Agent owner, double x, double y, double z)
@Deprecated public PointNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner
-drawMode
-isPublic
-x
-y
-z
-
@Deprecated public PointNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double radius, Paint fillColor)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner
-drawMode
-isPublic
-x
-y
-z
-radius
-fillColor
-
@SafeVarargs @Deprecated public PointNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, PathEnd<Path>[] pathEnds, PathConnector<Path, Node>... connectors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner
-drawMode
-isPublic
-x
-y
-z
-pathEnds
-connectors
-
@SafeVarargs @Deprecated public PointNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double radius, Paint fillColor, PathEnd<Path>[] pathEnds, PathConnector<Path, Node>... connectors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner
-drawMode
-isPublic
-x
-y
-z
-radius
-fillColor
-pathEnds
-connectors
-
@AnyLogicInternalCodegenAPI public PointNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double radius, Paint fillColor, boolean limitSpeed, double maxSpeedInMPS, PathEnd<Path>[] pathends)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. It is public due to technical reasons.
it may be removed/renamed in future. It is public due to technical reasons.
@SafeVarargs @Deprecated public PointNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, double radius, Paint fillColor, boolean limitSpeed, double maxSpeedInMPS, PathEnd<Path>[] pathends, PathConnector<Path, Node>... connectors)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner
-drawMode
-isPublic
-x
-y
-z
-radius
-fillColor
-limitSpeed
-maxSpeedInMPS
-pathends
-connectors
-
@AnyLogicInternalAPI public List<PathConnector<Path,Node>> getConnectors()
public void addConnector(PathConnector<Path, Node> connector)
Adds internal path connector to the inside of this node.
- Parameters:
connector
- path connector
public double getRadius()
Returns the radius of this point node
public void setRadius(double radius)
Sets the radius of this point node. The element should be uninitialized
- Parameters:
radius
- new radius
public PathConnector<Path,Node> getConnector(Path path1, Path path2)
Return a connection between two paths inside the node.
If the connection is bidirectional, you need to check the movement direction.
It could be done by comparing your path1 with
PathConnector.getStartPath()
,
in case of equality the movement is straight and reverse otherwise.- Parameters:
path1
- a path connected to the node by its end point, or optionally with its start point if is bidirectionalpath2
- a path connected to the node by its start point, or optionally with its end point if is bidirectional- Returns:
- a connector between two paths
@AnyLogicInternalAPI public Collection<Path> getConnectedExternalPaths(Path path)
@AnyLogicInternalAPI public Collection<Path> getConnectedInternalPaths(Path path)
public Point randomPointInside(Random rng, Point out)
Description copied from interface:
INetworkMarkupElement
Returns the randomly chosen point inside/along the given space markup element.
This method utilises the given Random Number Generator.
- Specified by:
randomPointInside
in interfaceINetworkMarkupElement
- Parameters:
rng
- the random number generator.out
- output object to write to, may benull
- Returns:
- the randomly chosen point
public double getX()
Returns the x coordinate
- Specified by:
getX
in interfaceAbstractPositionalMarkup
- Returns:
- the x coordinate
public double getY()
Returns the y coordinate
- Specified by:
getY
in interfaceAbstractPositionalMarkup
- Returns:
- the y coordinate
public double getZ()
Description copied from class:
Node
Returns the z coordinate of the node.
- Specified by:
getZ
in interfaceAbstractPositionalMarkup
- Specified by:
getZ
in classNode
- Returns:
- the z coordinate of the node
public void setPos(double x, double y)
Sets coordinates of the point node
- Parameters:
x
- the value of x coordinatey
- the value of y coordinate
public void setPos(double x, double y, double z)
Sets coordinates of the point node
- Parameters:
x
- the value of x coordinatey
- the value of y coordinatez
- the value of z coordinate
public Point getXYZ()
Returns (x, y, z) coordinates of this node
- Returns:
- the Point object with (x, y, z) coordinates of this node
public Point getXYZ(Point out)
Returns (x, y, z) coordinates of this node
- Returns:
- the Point object with (x, y, z) coordinates of this node
public void setLineColor(Color lineColor)
The same as
Node.setFillColor(Color)
- Specified by:
setLineColor
in classNode
- Parameters:
lineColor
- the new line color, null = do not draw the markup element line
public void setLineColor(Paint lineColor)
The same as
Node.setFillColor(Paint)
- Specified by:
setLineColor
in interfaceINode<Node,
Path> - Specified by:
setLineColor
in classNode
- Parameters:
lineColor
- the new line color, null = do not draw the markup element line
public Color getLineColor()
The same as
Node.getFillColor()
- Specified by:
getLineColor
in interfaceINode<Node,
Path> - Specified by:
getLineColor
in classNode
- Returns:
- the line color of the markup element
public Texture getLineTexture()
The same as
Node.getFillTexture()
- Specified by:
getLineTexture
in interfaceINode<Node,
Path> - Specified by:
getLineTexture
in classNode
- Returns:
- the line texture of the markup element
public double getNearestPoint(double x, double y, Point output)
Description copied from class:
NetworkMarkupElement
Calculates (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:
getNearestPoint
in classNetworkMarkupElement
- Parameters:
x
- x coordinate of the pointy
- y coordinate of the pointoutput
- the output point to write result to. Note thatoutput.z
is 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:
NetworkMarkupElement
Calculates (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:
getNearestPoint
in 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 boolean contains(double px, double py)
Description copied from class:
MarkupShape
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)
- Specified by:
contains
in interfaceINetworkMarkupElement
- Specified by:
contains
in classMarkupShape
- Parameters:
px
- the x coordinate relative to this shape's containerpy
- the y coordinate relative to this shape's container- Returns:
true
if the shape contains the point with the given coordinates
public Position getPosition(int index, int totalNumber, Position out)
Description copied from interface:
AnimationStaticLocationProvider
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).
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
- Specified by:
getPosition
in interfaceAnimationStaticLocationProvider
- Parameters:
index
- the index of some item positions, should be not negative and less thantotalNumber
totalNumber
- 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 Position getTransferPositionByPercent(Path path1, Path path2, double percent, Position out)
- Specified by:
getTransferPositionByPercent
in interfaceINode<Node,
Path> - Overrides:
getTransferPositionByPercent
in classNode
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()