Overview | Package | Class | Use | Tree | Index | Help
| NASA World Wind
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gov.nasa.worldwind.geom
Class Line

    java.lang.Object
      gov.nasa.worldwind.geom.Line

    public final class Line

extends Object

Constructor Summary
`Line(Point origin, Point direction)`

Method Summary
`double` | `distanceTo(Point p)` Calculate the shortests distance between this line and a specified `Point`.
`boolean` | `equals(Object o)` Performs a comparison to test whether this Object is internally identical to the other Object `o`.
`Point` | `getDirection()`
`Point` | `getOrigin()`
`Point` | `getPointAt(double t)`
`int` | `hashCode()`
`double` | `selfDot()`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Line

    public Line(Point origin,
                Point direction)

Parameters:
  `origin` -
  `direction` -
Throws:
  `IllegalArgumentException` - if `origin` is null, or `direction` is null or has zero length

Method Detail

### distanceTo

    public final double distanceTo(Point p)

  Calculate the shortests distance between this line and a specified `Point`. This method returns a positive distance.

  Parameters:
    `p` - the `Point` whose distance from this `Line` will be calculated
  Returns:
    the distance between this `Line` and the specified `Point`
  Throws:
    `IllegalArgumentException` - if `p` is null

### equals

    public final boolean equals(Object o)

  Performs a comparison to test whether this Object is internally identical to the other Object `o`. This method takes into account both direction and origin, so two lines which may be equivalent may not be considered equal.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `o` - the object to be compared against.
  Returns:
    true if these two objects are equal, false otherwise

### getDirection

    public final Point getDirection()

### getOrigin

    public final Point getOrigin()

### getPointAt

    public final Point getPointAt(double t)

### hashCode

    public final int hashCode()

  Overrides:
    `hashCode` in class `Object`

### selfDot

    public final double selfDot()

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Index | Help
| NASA World Wind
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD