|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.geom.LatLon
gov.nasa.worldwind.geom.Position
public class Position
| Nested Class Summary | |
|---|---|
static class |
Position.PositionList
|
| Field Summary | |
|---|---|
double |
elevation
|
static Position |
ZERO
|
| Fields inherited from class gov.nasa.worldwind.geom.LatLon |
|---|
latitude, longitude |
| Constructor Summary | |
|---|---|
Position(Angle latitude,
Angle longitude,
double elevation)
|
|
Position(LatLon latLon,
double elevation)
|
|
| Method Summary | |
|---|---|
Position |
add(Position that)
|
static List<Position> |
computeShiftedPositions(Position oldPosition,
Position newPosition,
Iterable<? extends Position> positions)
Computes a new set of positions translated from a specified reference position to a new reference position. |
boolean |
equals(Object o)
|
static Position |
fromDegrees(double latitude,
double longitude)
|
static Position |
fromDegrees(double latitude,
double longitude,
double elevation)
|
static Position |
fromRadians(double latitude,
double longitude,
double elevation)
|
double |
getAltitude()
Obtains the elevation of this position |
double |
getElevation()
Obtains the elevation of this position |
int |
hashCode()
|
static Position |
interpolate(double amount,
Position value1,
Position value2)
Returns the linear interpolation of value1 and value2, treating the geographic
locations as simple 2D coordinate pairs, and treating the elevation values as 1D scalars. |
static Position |
interpolateGreatCircle(double amount,
Position value1,
Position value2)
Returns the an interpolated location along the great-arc between value1 and value2. |
static Position |
interpolateRhumb(double amount,
Position value1,
Position value2)
Returns the an interpolated location along the rhumb line between value1 and value2. |
static boolean |
positionsCrossDateLine(Iterable<? extends Position> positions)
|
Position |
subtract(Position that)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final double elevation
public static final Position ZERO
| Constructor Detail |
|---|
public Position(Angle latitude,
Angle longitude,
double elevation)
public Position(LatLon latLon,
double elevation)
| Method Detail |
|---|
public Position add(Position that)
add in class LatLon
public static List<Position> computeShiftedPositions(Position oldPosition,
Position newPosition,
Iterable<? extends Position> positions)
oldPosition - the original reference position.newPosition - the new reference position.positions - the positions to translate.
IllegalArgumentException - if any argument is null.public boolean equals(Object o)
equals in class LatLon
public static Position fromDegrees(double latitude,
double longitude)
public static Position fromDegrees(double latitude,
double longitude,
double elevation)
public static Position fromRadians(double latitude,
double longitude,
double elevation)
public double getAltitude()
public double getElevation()
public int hashCode()
hashCode in class LatLon
public static Position interpolate(double amount,
Position value1,
Position value2)
value1 and value2, treating the geographic
locations as simple 2D coordinate pairs, and treating the elevation values as 1D scalars.
amount - the interpolation factorvalue1 - the first position.value2 - the second position.
value1 and value2.
IllegalArgumentException - if either position is null.
public static Position interpolateGreatCircle(double amount,
Position value1,
Position value2)
value1 and value2. The
position's elevation components are linearly interpolated as a simple 1D scalar value. The interpolation factor
amount defines the weight given to each value, and is clamped to the range [0, 1]. If a
is 0 or less, this returns value1. If amount is 1 or more, this returns
value2. Otherwise, this returns the position on the great-arc between value1 and
value2 with a linearly interpolated elevation component, and corresponding to the specified
interpolation factor.
amount - the interpolation factorvalue1 - the first position.value2 - the second position.
value1 and value2, with a
linearly interpolated elevation component.
IllegalArgumentException - if either location is null.
public static Position interpolateRhumb(double amount,
Position value1,
Position value2)
value1 and value2.
The position's elevation components are linearly interpolated as a simple 1D scalar value. The interpolation
factor amount defines the weight given to each value, and is clamped to the range [0, 1]. If
a is 0 or less, this returns value1. If amount is 1 or more, this returns
value2. Otherwise, this returns the position on the rhumb line between value1 and
value2 with a linearly interpolated elevation component, and corresponding to the specified
interpolation factor.
amount - the interpolation factorvalue1 - the first position.value2 - the second position.
value1 and value2, with a
linearly interpolated elevation component.
IllegalArgumentException - if either location is null.public static boolean positionsCrossDateLine(Iterable<? extends Position> positions)
public Position subtract(Position that)
subtract in class LatLonpublic String toString()
toString in class LatLon
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||