public class SpatialLayoutManager
extends java.lang.Object
| Constructor and Description |
|---|
SpatialLayoutManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSpatialObject(java.lang.String name,
SpatialObject spatialObject)
Register a new SpatialObject.
|
void |
addTrack(Track track)
Register a new track.
|
static SpatialLayoutManager |
getSpatialLayoutManager()
Returns the singleton SpatialLayoutManager.
|
SpatialObject |
getSpatialObject(java.lang.String objectName)
Returns the SpatialObject with the specified name.
|
Track |
getTrack(MovableSpatialObject mover,
SpatialObject destination)
Gets a registered track which leads the moving object to the destiny.
|
Track |
getTrack(SpatialObject startLocation,
java.lang.String exitPointName,
SpatialObject destinationLocation,
java.lang.String entryPointName)
Gets the track base on the given start- and destination location.
|
Track |
getTrack(java.lang.String name)
Search through the registered tracks for a track with the given name.
|
java.util.Iterator<Track> |
getTracksIterator()
Get an iterator of all the tracks managed by this layout manager.
|
SimpleTrack |
getTrackStraightTo(MovableSpatialObject mover,
java.lang.String exitPoint,
Length x,
Length y,
Length z)
Generates a SimpleTrack which leads directly to the given position.
|
SimpleTrack |
getTrackStraightTo(MovableSpatialObject mover,
java.lang.String exitPoint,
SpatialObject destination,
java.lang.String entryPoint)
Generates a SimpleTrack which leads directly to the given destination.
|
boolean |
removeTrack(Track track)
Removes a specific track from the layout manager.
|
void |
setTrace(boolean showInTrace)
Sets the flag, whether the tracks generated from this class should
be traced or not.
|
boolean |
showTrace()
Gets whether the showInTrace flag will be set at generating a new
Track.
|
public static SpatialLayoutManager getSpatialLayoutManager()
public void addSpatialObject(java.lang.String name,
SpatialObject spatialObject)
name - The name of the SpatialObject.spatialObject - The SpatialObject to be registered.public void addTrack(Track track)
track - The track to be registered.public SpatialObject getSpatialObject(java.lang.String objectName)
objectName - The name of the SpatialObject to be get.public Track getTrack(MovableSpatialObject mover, SpatialObject destination)
mover - The object which should move to the destiny.destination - The destiny the mover should move to.public Track getTrack(SpatialObject startLocation, java.lang.String exitPointName, SpatialObject destinationLocation, java.lang.String entryPointName)
startLocation - The start location.exitPointName - The exit point at the start location.destinationLocation - The destination location.entryPointName - The entry point at the destination location.public Track getTrack(java.lang.String name)
name - The name of the track which should be get.public SimpleTrack getTrackStraightTo(MovableSpatialObject mover, java.lang.String exitPoint, SpatialObject destination, java.lang.String entryPoint)
mover - The object which should move to the given position.exitPoint - The specific exit point which should be the start
position of the generated track.destination - The destination object the mover should steered
directly into.entryPoint - The specific entry point of the destination object.public SimpleTrack getTrackStraightTo(MovableSpatialObject mover, java.lang.String exitPoint, Length x, Length y, Length z)
mover - The object which should move to the given position.exitPoint - The specific exit point which should be the start
position of the generated track.x - The x-coordinate of the destiny position.y - The y-coordinate of the destiny position.z - The z-coordinate of the destiny position.public java.util.Iterator<Track> getTracksIterator()
public boolean removeTrack(Track track)
track - The track to be removed.public void setTrace(boolean showInTrace)
showInTrace - The showInTrace flag which will be forwarded at
to the constructor of the Track.public boolean showTrace()