nl.tudelft.simulation.traffic.track
Class SimpleTrackLink

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.SimpleTrackLink
All Implemented Interfaces:
java.lang.Cloneable, nl.tudelft.simulation.dsol.animation.LocatableInterface, java.io.Serializable, TrackLinkInterface

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

This is a simple track link, with one predecessor and one successor.

(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
SimpleTrackLink(java.lang.String name, nl.tudelft.simulation.language.d3.DirectedPoint location)
          Construct a new SimpleTrackLink
SimpleTrackLink(java.lang.String name, double x, double y, double z)
          Construct a new SimpleTrackLink
SimpleTrackLink(java.lang.String name, javax.vecmath.Point3d point)
          Construct a new SimpleTrackLink
 
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.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.
 void setActiveSuccessor(TrackInterface predecessor, TrackInterface successor)
          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

SimpleTrackLink

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

Parameters:
name -
location -

SimpleTrackLink

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

Parameters:
name -
point -

SimpleTrackLink

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

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 predecessor,
                               TrackInterface successor)
Description copied from interface: TrackLinkInterface
This method sets the active successor of the given track.

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

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)

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()
                                                            throws java.rmi.RemoteException
Specified by:
getLocation in interface nl.tudelft.simulation.dsol.animation.LocatableInterface
Throws:
java.rmi.RemoteException
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.