nl.tudelft.simulation.traffic.track
Interface TrackLinkInterface

All Superinterfaces:
nl.tudelft.simulation.dsol.animation.LocatableInterface
All Known Implementing Classes:
ComplexTrackLink, SimpleTrackLink

public interface TrackLinkInterface
extends nl.tudelft.simulation.dsol.animation.LocatableInterface

This interface defines the interface of TrackLinks. A link is used for connections between tracks.

Tracks need to be explicitly added to links. The possibility to travel from track A to track B has to be explicitly defined using the addSuccessorToTrack() method. A connection between tracks is only possible between tracks added to the link.

A simpleTrackLink is a location.

Author:
Alexander Verbraeck
See Also:
TrackInterface

Method Summary
 void addPredecessor(TrackInterface predecessor)
          Adds a predecessor to this link.
 void addSuccessor(TrackInterface successor)
          Adds a successor to this link.
 TrackInterface getActiveSuccessor(TrackInterface predecessor)
          This method gets the active successor of the given track.
 javax.vecmath.Point3d getPosition()
           
 TrackList getPredecessors()
          Returns all predecessors for this link.
 TrackList getSuccessors()
          Returns all successors for this link.
 void setActiveSuccessor(TrackInterface predecessor, TrackInterface successor)
          This method sets the active successor of the given track.
 
Methods inherited from interface nl.tudelft.simulation.dsol.animation.LocatableInterface
getBounds, getLocation
 

Method Detail

addSuccessor

public void addSuccessor(TrackInterface successor)
Adds a successor to this link.

Parameters:
successor -

addPredecessor

public void addPredecessor(TrackInterface predecessor)
Adds a predecessor to this link.

Parameters:
predecessor -

setActiveSuccessor

public void setActiveSuccessor(TrackInterface predecessor,
                               TrackInterface successor)
This method sets the active successor of the given track.

Parameters:
predecessor -
successor -

getActiveSuccessor

public TrackInterface getActiveSuccessor(TrackInterface predecessor)
This method gets the active successor of the given track.

Parameters:
predecessor -
Returns:
activeSuccessor

getSuccessors

public TrackList getSuccessors()
Returns all successors for this link.

Returns:
successors

getPredecessors

public TrackList getPredecessors()
Returns all predecessors for this link.

Returns:
TrackList

getPosition

public javax.vecmath.Point3d getPosition()
Returns:
position


Copyright © 2003-2004 Delft University of Technology, the Netherlands. All Rights Reserved.