Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.AbstractDrawableMarkupAggregator
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkupAggregator
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Constructor Details
- Method Details
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkupAggregator<Agent>
- com.anylogic.engine.markup.AbstractDrawableMarkupAggregator
- com.anylogic.engine.markup.RailwayNetwork
- All Implemented Interfaces:
AggregatableAnimationElement
,HasLevel
,LevelElement
,LevelMarkup
,Serializable
public class RailwayNetwork extends AbstractDrawableMarkupAggregator implements LevelMarkup, AggregatableAnimationElement
- See Also:
- Serialized Form
Constructor | Description |
---|---|
RailwayNetwork |
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
|
RailwayNetwork |
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
|
RailwayNetwork |
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
|
Modifier and Type | Method | Description |
---|---|---|
void | add |
Adds a PositionOnTrack object to the network.
|
void | add |
Adds a RailwaySwitch object to the network.
|
void | add |
Adds a RailwayTrack object to the network.
|
void | addAll |
Adds all arguments to the network
|
Stream<? extends AbstractMarkup> | elementsInternal() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
ShapeDrawMode | getDrawMode() |
Returns the drawing mode of the shape (where to draw this shape: 2D, 3D or 2D+3D).
If the shape has been created with no-argument constructor, and has no specific limitations (like 2D-only), and drawing mode hasn't yet been set, then it is initialized to default (2D + 3D). |
Level | getLevel() |
Returns level associated with this space markup element or
null
if this element has no level |
List<PositionOnTrack> | getPointOnTracks() |
Returns the list of all PositionOnTrack elements in this network.
|
Agent | getSpace() | |
List<RailwaySwitch> | getSwitches() |
Returns the list of all switches in this network.
|
List<RailwayTrack> | getTracks() |
Returns the list of all tracks in this network.
|
double | getZ() |
Returns the base level z coordinate
|
double | metersToPixels |
Converts specified value from meters to pixels in the space of this network
|
double | pixelsToMeters |
Converts specified value from pixels to meters in the space of this network
|
void | setLevel | |
void | setZ |
Sets the base level z coordinate.
|
@Deprecated public RailwayNetwork(Agent owner, String name, ShapeDrawMode drawMode, double z)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
- Parameters:
owner
-name
-drawMode
-z
-
@Deprecated public RailwayNetwork(Agent owner, String name, ShapeDrawMode drawMode, double z, boolean isPublic, boolean visible)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
- Parameters:
owner
-name
-drawMode
-z
-isPublic
-visible
-
@AnyLogicInternalAPI @Deprecated public RailwayNetwork(Agent owner, String name, ShapeDrawMode drawMode, double z, boolean isPublic, boolean visible, AbstractRailwayMarkup... contents)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
- Parameters:
owner
-name
-drawMode
-z
-isPublic
-visible
-contents
-
public void addAll(AbstractRailwayMarkup... contents)
Adds all arguments to the network
- Parameters:
contents
- - an instance of any of the following classes:RailwayTrack
,RailwaySwitch
,PositionOnTrack
}
public Agent getSpace()
public void setZ(double z)
Sets the base level z coordinate. Elements in network have z-coordinates related to this level.
- Parameters:
z
- the base level z coordinate
public double getZ()
Returns the base level z coordinate
- Returns:
- the base level z coordinate
public List<RailwayTrack> getTracks()
Returns the list of all tracks in this network.
The network should be initialized
- Returns:
- the list of all tracks in this network
public List<RailwaySwitch> getSwitches()
Returns the list of all switches in this network.
The network should be initialized
- Returns:
- the list of all switches in this network
public List<PositionOnTrack> getPointOnTracks()
Returns the list of all PositionOnTrack elements in this network.
The network should be initialized
- Returns:
- the list of all PositionOnTrack elements in this network
@AnyLogicInternalAPI public Stream<? extends AbstractMarkup> elementsInternal()
Description copied from class:
AbstractMarkupAggregator
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
elementsInternal
in classAbstractMarkupAggregator<Agent>
public void add(RailwayTrack track)
Adds a RailwayTrack object to the network.
The network should be uninitialized
- Parameters:
track
- RailwayTrack element to be added
public void add(RailwaySwitch sw)
Adds a RailwaySwitch object to the network.
The network should be uninitialized
- Parameters:
sw
- RailwaySwitch element to be added
public void add(PositionOnTrack pointOnTrack)
Adds a PositionOnTrack object to the network.
The network should be uninitialized
- Parameters:
pointOnTrack
- PositionOnTrack element to be added
public double pixelsToMeters(double value)
Converts specified value from pixels to meters in the space of this network
- Parameters:
value
- in pixels
public double metersToPixels(double value)
Converts specified value from meters to pixels in the space of this network
- Parameters:
value
- in meters
public Level getLevel()
Description copied from interface:
HasLevel
Returns level associated with this space markup element or
null
if this element has no levelpublic ShapeDrawMode getDrawMode()
Description copied from class:
AbstractDrawableMarkupAggregator
Returns the drawing mode of the shape (where to draw this shape: 2D, 3D or 2D+3D).
If the shape has been created with no-argument constructor, and has no specific limitations (like 2D-only), and drawing mode hasn't yet been set, then it is initialized to default (2D + 3D).
If the shape has been created with no-argument constructor, and has no specific limitations (like 2D-only), and drawing mode hasn't yet been set, then it is initialized to default (2D + 3D).
- Overrides:
getDrawMode
in classAbstractDrawableMarkupAggregator
@AnyLogicInternalAPI public void setLevel(Level level)
- Specified by:
setLevel
in interfaceLevelElement