nl.tudelft.simulation.traffic.track
Class ComplexTrackLink

java.lang.Object
  extended byjavax.vecmath.Tuple3d
      extended byjavax.vecmath.Point3d
          extended bynl.tudelft.simulation.language.d3.CartesianPoint
              extended bynl.tudelft.simulation.language.d3.DirectedPoint
                  extended bynl.tudelft.simulation.traffic.track.ComplexTrackLink
All Implemented Interfaces:
java.lang.Cloneable, nl.tudelft.simulation.dsol.animation.LocatableInterface, java.io.Serializable, TrackLinkInterface

public class ComplexTrackLink
extends nl.tudelft.simulation.language.d3.DirectedPoint
implements TrackLinkInterface

This is a complex track link, with several possible predecessors and several possible successors.

(c) copyright 2003-2004 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Version:
Jun 19, 2004
Author:
Alexander Verbraeck
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.vecmath.Point3d
 
Fields inherited from class javax.vecmath.Tuple3d
x, y, z
 
Constructor Summary
ComplexTrackLink(java.lang.String name, nl.tudelft.simulation.language.d3.DirectedPoint location)
          Construct a new ComplexTrackLink
ComplexTrackLink(java.lang.String name, double x, double y, double z)
          Construct a new ComplexTrackLink
ComplexTrackLink(java.lang.String name, javax.vecmath.Point3d point)
          Construct a new ComplexTrackLink
 
Method Summary
 void addPredecessor(TrackInterface predecessor)
          Adds a predecessor to this link.
 void addSuccessor(TrackInterface successor)
          Adds a successor to this link.
 TrackInterface getActivePredecessor(TrackInterface successor)
           
 TrackInterface getActiveSuccessor(TrackInterface predecessor)
          This method gets the active successor of the given track.
 javax.media.j3d.Bounds getBounds()
           
 nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
           
 javax.vecmath.Point3d getPosition()
           
 TrackList getPredecessors()
          Returns all predecessors for this link.
 TrackList getSuccessors()
          Returns all successors for this link.
protected  void setActivePredecessor(TrackInterface successor, TrackInterface predecessor)
           
 void setActiveSuccessor(TrackInterface prevTrack, TrackInterface nextTrack)
          This method sets the active successor of the given track.
 java.lang.String toString()
           
 
Methods inherited from class nl.tudelft.simulation.language.d3.DirectedPoint
clone, equals, equals, getRotX, getRotY, getRotZ, hashCode, setRotX, setRotY, setRotZ
 
Methods inherited from class nl.tudelft.simulation.language.d3.CartesianPoint
to2D, toCartesianPoint, toSphericalPoint
 
Methods inherited from class javax.vecmath.Point3d
distance, distanceL1, distanceLinf, distanceSquared, project
 
Methods inherited from class javax.vecmath.Tuple3d
absolute, absolute, add, add, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, epsilonEquals, get, get, interpolate, interpolate, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, scaleAdd, set, set, set, set, sub, sub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComplexTrackLink

public ComplexTrackLink(java.lang.String name,
                        nl.tudelft.simulation.language.d3.DirectedPoint location)
Construct a new ComplexTrackLink

Parameters:
name -
location -

ComplexTrackLink

public ComplexTrackLink(java.lang.String name,
                        javax.vecmath.Point3d point)
Construct a new ComplexTrackLink

Parameters:
name -
point -

ComplexTrackLink

public ComplexTrackLink(java.lang.String name,
                        double x,
                        double y,
                        double z)
Construct a new ComplexTrackLink

Parameters:
name -
x -
y -
z -
Method Detail

addSuccessor

public void addSuccessor(TrackInterface successor)
Description copied from interface: TrackLinkInterface
Adds a successor to this link.

Specified by:
addSuccessor in interface TrackLinkInterface
Parameters:
successor -
See Also:
TrackLinkInterface.addSuccessor(TrackInterface)

addPredecessor

public void addPredecessor(TrackInterface predecessor)
Description copied from interface: TrackLinkInterface
Adds a predecessor to this link.

Specified by:
addPredecessor in interface TrackLinkInterface
Parameters:
predecessor -
See Also:
TrackLinkInterface.addPredecessor(TrackInterface)

setActiveSuccessor

public void setActiveSuccessor(TrackInterface prevTrack,
                               TrackInterface nextTrack)
Description copied from interface: TrackLinkInterface
This method sets the active successor of the given track.

Specified by:
setActiveSuccessor in interface TrackLinkInterface
Parameters:
prevTrack -
nextTrack -
See Also:
TrackLinkInterface.setActiveSuccessor(TrackInterface, TrackInterface)

setActivePredecessor

protected void setActivePredecessor(TrackInterface successor,
                                    TrackInterface predecessor)
Parameters:
successor -
predecessor -

getActiveSuccessor

public TrackInterface getActiveSuccessor(TrackInterface predecessor)
Description copied from interface: TrackLinkInterface
This method gets the active successor of the given track.

Specified by:
getActiveSuccessor in interface TrackLinkInterface
Parameters:
predecessor -
Returns:
activeSuccessor
See Also:
TrackLinkInterface.getActiveSuccessor(TrackInterface)

getActivePredecessor

public TrackInterface getActivePredecessor(TrackInterface successor)
Parameters:
successor -
Returns:

getSuccessors

public TrackList getSuccessors()
Description copied from interface: TrackLinkInterface
Returns all successors for this link.

Specified by:
getSuccessors in interface TrackLinkInterface
Returns:
successors
See Also:
TrackLinkInterface.getSuccessors()

getPredecessors

public TrackList getPredecessors()
Description copied from interface: TrackLinkInterface
Returns all predecessors for this link.

Specified by:
getPredecessors in interface TrackLinkInterface
Returns:
TrackList
See Also:
TrackLinkInterface.getPredecessors()

getPosition

public javax.vecmath.Point3d getPosition()
Specified by:
getPosition in interface TrackLinkInterface
Returns:
position
See Also:
TrackLinkInterface.getPosition()

getBounds

public javax.media.j3d.Bounds getBounds()
Specified by:
getBounds in interface nl.tudelft.simulation.dsol.animation.LocatableInterface
See Also:
LocatableInterface.getBounds()

getLocation

public nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
Specified by:
getLocation in interface nl.tudelft.simulation.dsol.animation.LocatableInterface
See Also:
LocatableInterface.getLocation()

toString

public java.lang.String toString()
See Also:
Object.toString()


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