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 PolarPoint

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

    public class PolarPoint

extends Object

Represents a point in space defined by a latitude, longitude and distance from the origin.

Instances of `PolarPoint` are immutable.

Field Summary
`static PolarPoint` | `ZERO`

Constructor Summary
`PolarPoint(Angle latitude, Angle longitude, double radius)` Obtains a `PolarPoint` from two `angles` and a radius.

Method Summary
`boolean` | `equals(Object o)`
`static PolarPoint` | `fromCartesian(double x, double y, double z)` Obtains a `PolarPoint` from cartesian coordinates.
`static PolarPoint` | `fromCartesian(Point cartesianPoint)` Obtains a `PolarPoint` from a cartesian point.
`static PolarPoint` | `fromDegrees(double latitude, double longitude, double radius)` Obtains a `PolarPoint` from degrees and a radius.
`static PolarPoint` | `fromRadians(double latitude, double longitude, double radius)` Obtains a `PolarPoint` from radians and a radius.
`Angle` | `getLatitude()` Obtains the latitude of this polar point
`Angle` | `getLongitude()` Obtains the longitude of this polar point
`double` | `getRadius()` Obtains the radius of this polar point
`int` | `hashCode()`
`Point` | `toCartesian()` Obtains a cartesian point equivalent to this `PolarPoint`, except in cartesian space.
`static Point` | `toCartesian(Angle latitude, Angle longitude, double radius)` Obtains a cartesian point from a given latitude, longitude and distance from center.
`String` | `toString()`

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

Field Detail

### ZERO

    public static final PolarPoint ZERO

Constructor Detail

### PolarPoint

    public PolarPoint(Angle latitude,
                      Angle longitude,
                      double radius)

  Obtains a `PolarPoint` from two `angles` and a radius.

  Parameters:
    `latitude` - the latitude
    `longitude` - the longitude
    `radius` - the distance from the center
  Throws:
    `IllegalArgumentException` - if `latitude` or `longitude` is null

Method Detail

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### fromCartesian

    public static PolarPoint fromCartesian(double x,
                                           double y,
                                           double z)

  Obtains a `PolarPoint` from cartesian coordinates.

  Parameters:
    `x` - the x coordinate of the cartesian point
    `y` - the y coordinate of the cartesian point
    `z` - the z coordinate of the cartesian point
  Returns:
    a polar point located at (x,y,z) in cartesian space

### fromCartesian

    public static PolarPoint fromCartesian(Point cartesianPoint)

  Obtains a `PolarPoint` from a cartesian point.

  Parameters:
    `cartesianPoint` - the point to convert
  Returns:
    the cartesian point expressed as a polar point
  Throws:
    `IllegalArgumentException` - if `cartesianPoint` is null

### fromDegrees

    public static PolarPoint fromDegrees(double latitude,
                                         double longitude,
                                         double radius)

  Obtains a `PolarPoint` from degrees and a radius.

  Parameters:
    `latitude` - the latitude in degrees
    `longitude` - the longitude in degrees
    `radius` - the distance form the center
  Returns:
    a new `PolarPoint`

### fromRadians

    public static PolarPoint fromRadians(double latitude,
                                         double longitude,
                                         double radius)

  Obtains a `PolarPoint` from radians and a radius.

  Parameters:
    `latitude` - the latitude in radians
    `longitude` - the longitude in radians
    `radius` - the distance form the center
  Returns:
    a new `PolarPoint`

### getLatitude

    public final Angle getLatitude()

  Obtains the latitude of this polar point

  Returns:
    this polar point's latitude

### getLongitude

    public final Angle getLongitude()

  Obtains the longitude of this polar point

  Returns:
    this polar point's longitude

### getRadius

    public final double getRadius()

  Obtains the radius of this polar point

  Returns:
    the distance from this polar point to its origin

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toCartesian

    public final Point toCartesian()

  Obtains a cartesian point equivalent to this `PolarPoint`, except in cartesian space.

  Returns:
    this polar point in cartesian coordinates

### toCartesian

    public static Point toCartesian(Angle latitude,
                                    Angle longitude,
                                    double radius)

  Obtains a cartesian point from a given latitude, longitude and distance from center. This method is equivalent to, but may perform faster than `Point p = new PolarPoint(latitude, longitude, radius).toCartesian()`

  Parameters:
    `latitude` - the latitude
    `longitude` - the longitude
    `radius` - the distance from the origin
  Returns:
    a cartesian point from two angles and a radius
  Throws:
    `IllegalArgumentException` - if `latitude` or `longitude` is null

### 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