|
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.PolarPoint
public class PolarPoint
Represents a point in space defined by a latitude, longitude and distance from the origin.
Instances ofPolarPoint
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(Vec4 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()
|
Vec4 |
toCartesian()
Obtains a cartesian point equivalent to this PolarPoint , except in cartesian space. |
static Vec4 |
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 |
---|
public static final PolarPoint ZERO
Constructor Detail |
---|
public PolarPoint(Angle latitude, Angle longitude, double radius)
PolarPoint
from two angles
and a radius.
latitude
- the latitudelongitude
- the longituderadius
- the distance from the center
IllegalArgumentException
- if latitude
or longitude
is nullMethod Detail |
---|
public boolean equals(Object o)
equals
in class Object
public static PolarPoint fromCartesian(double x, double y, double z)
PolarPoint
from cartesian coordinates.
x
- the x coordinate of the cartesian pointy
- the y coordinate of the cartesian pointz
- the z coordinate of the cartesian point
public static PolarPoint fromCartesian(Vec4 cartesianPoint)
PolarPoint
from a cartesian point.
cartesianPoint
- the point to convert
IllegalArgumentException
- if cartesianPoint
is nullpublic static PolarPoint fromDegrees(double latitude, double longitude, double radius)
PolarPoint
from degrees and a radius.
latitude
- the latitude in degreeslongitude
- the longitude in degreesradius
- the distance form the center
PolarPoint
public static PolarPoint fromRadians(double latitude, double longitude, double radius)
PolarPoint
from radians and a radius.
latitude
- the latitude in radianslongitude
- the longitude in radiansradius
- the distance form the center
PolarPoint
public final Angle getLatitude()
public final Angle getLongitude()
public final double getRadius()
public int hashCode()
hashCode
in class Object
public final Vec4 toCartesian()
PolarPoint
, except in cartesian space.
public static Vec4 toCartesian(Angle latitude, Angle longitude, double radius)
Vec4 p = new PolarPoint(latitude, longitude, radius).toCartesian()
latitude
- the latitudelongitude
- the longituderadius
- the distance from the origin
IllegalArgumentException
- if latitude
or longitude
is nullpublic String toString()
toString
in class Object
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |