aim4.map.track

## Class ArcTrack.Position

- java.lang.Object
- - aim4.map.track.ArcTrack.Position

- All Implemented Interfaces:
    TrackPosition
  Enclosing class:
    ArcTrack

      public class ArcTrack.Position
      extends Object
      implements TrackPosition

  A position of the arc-shape track.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ArcTrack.Position(double dist)` Create a position object at the given distance from the starting waypoint on this track

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getTangentSlope()` Get the slope of the tangent at the location.
    `double` | `getX()` Get the x-coordinate of the current position.
    `double` | `getY()` Get the y-coordinate of the current position.
    `double` | `move(double dist)` Move the position by a certain distance on the track but not beyond the end waypoint.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### ArcTrack.Position

          public ArcTrack.Position(double dist)

      Create a position object at the given distance from the starting waypoint on this track
      Parameters:
        `dist` - the distance

  - ### Method Detail

    - #### getX

          public double getX()

      Get the x-coordinate of the current position.
      Specified by:
        `getX` in interface `TrackPosition`
      Returns:
        the x-coordinate of the current position.

    - #### getY

          public double getY()

      Get the y-coordinate of the current position.
      Specified by:
        `getY` in interface `TrackPosition`
      Returns:
        the y-coordinate of the current position.

    - #### getTangentSlope

          public double getTangentSlope()

      Get the slope of the tangent at the location.
      Specified by:
        `getTangentSlope` in interface `TrackPosition`
      Returns:
        The slope of the tangent at the location.

    - #### move

          public double move(double dist)

      Move the position by a certain distance on the track but not beyond the end waypoint. Return the remaining distance if it moves beyond the end waypoint.
      Specified by:
        `move` in interface `TrackPosition`
      Parameters:
        `dist` - the distance
      Returns:
        the remaining distance of the traversal; exactly 0 (that can be tested with "== 0.0") if the traversal has not reached the end waypoint.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2013. All rights reserved.