aim4.map.track

## Class PathTrack

- java.lang.Object
- - aim4.map.track.PathTrack

- All Implemented Interfaces:
    Track

      public class PathTrack
      extends Object
      implements Track

  A track created by joining multiple tracks.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `PathTrack.Position` A position on the track.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PathTrack()` Create an empty path track.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(Track track)` Add a track to the path track.
    `void` | `append(PathTrack track)` Append a path track to the end of this path track.
    `WayPoint` | `getEndWayPoint()` Get the ending waypoint of the track segment.
    `double` | `getLength()` Get the length of the track.
    `TrackPosition` | `getPosition(double dist)` Get the position on the track that is a given distance from the starting waypoint.
    `Shape` | `getShape()` Get the shape of the track segment
    `WayPoint` | `getStartWayPoint()` Get the starting waypoint of the track segment.
    `List<Track>` | `getTracks()` Get the list of tracks that constitutes this path track.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PathTrack

          public PathTrack()

      Create an empty path track.

  - ### Method Detail

    - #### add

          public void add(Track track)

      Add a track to the path track.
      Parameters:
        `track` - the track

    - #### append

          public void append(PathTrack track)

      Append a path track to the end of this path track.
      Parameters:
        `track` - the path track

    - #### getTracks

          public List<Track> getTracks()

      Get the list of tracks that constitutes this path track.
      Returns:
        the list of tracks

    - #### getStartWayPoint

          public WayPoint getStartWayPoint()

      Get the starting waypoint of the track segment.
      Specified by:
        `getStartWayPoint` in interface `Track`
      Returns:
        the starting waypoint

    - #### getEndWayPoint

          public WayPoint getEndWayPoint()

      Get the ending waypoint of the track segment.
      Specified by:
        `getEndWayPoint` in interface `Track`
      Returns:
        the ending waypoint

    - #### getLength

          public double getLength()

      Get the length of the track.
      Specified by:
        `getLength` in interface `Track`
      Returns:
        the length of the track.

    - #### getPosition

          public TrackPosition getPosition(double dist)

      Get the position on the track that is a given distance from the starting waypoint. It returns null if the position is off the track (i.e., beyond the ending waypoint.)
      Specified by:
        `getPosition` in interface `Track`
      Parameters:
        `dist` - the distance from the starting waypoint; null if the distance is longer than the length of the track.

    - #### getShape

          public Shape getShape()

      Get the shape of the track segment
      Specified by:
        `getShape` in interface `Track`
      Returns:
        the shape of the track segment

Copyright © 2013. All rights reserved.