|
mhuss AstroLib 1.1.4a | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.mhuss.AstroLib.LocationElements
This is a convenience class used for passing around polar coordinates.
| Field Summary | |
static int |
LATITUDE
Pseudo-enum indices into vector form of LocationElements. |
static int |
LONGITUDE
Pseudo-enum indices into vector form of LocationElements. |
static int |
RADIUS
Pseudo-enum indices into vector form of LocationElements. |
static int |
X
|
static int |
Y
|
static int |
Z
|
| Constructor Summary | |
LocationElements()
Default constructor |
|
LocationElements(double[] vector)
Vector constructor |
|
LocationElements(Latitude lat,
Longitude lon,
double rad)
Explicit constructor |
|
| Method Summary | |
double[] |
get()
Get all values in this instance as a vector. |
double |
getLatitude()
Get the latitude |
double |
getLongitude()
Get the longitude |
double |
getRadius()
Get the radius |
double |
getX()
Get the X element |
double |
getY()
Get the Y element |
double |
getZ()
Get the Z element |
void |
invalidate()
Mark all members as invalid |
void |
set(double[] vector)
Set all members of this instance from a vector. |
void |
set(double lat,
double lon,
double rad)
Set all members of this instance individually |
void |
setLatitude(double d)
Set the latitude |
void |
setLongitude(double d)
Set the longitude |
void |
setRadius(double d)
Set the radius |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int LATITUDE
public static final int LONGITUDE
public static final int RADIUS
public static final int X
public static final int Y
public static final int Z
| Constructor Detail |
public LocationElements()
public LocationElements(Latitude lat,
Longitude lon,
double rad)
lat - latitudelon - longituderad - radiuspublic LocationElements(double[] vector)
vector - { lat, lon, rad }| Method Detail |
public void invalidate()
public double getLatitude()
public double getX()
public double getLongitude()
public double getY()
public double getRadius()
public double getZ()
public double[] get()
The vector is an array of three doubles, latitude, longitude, and radius, in that order.
public void setLatitude(double d)
d - The new latitude valuepublic void setLongitude(double d)
d - The new longitude valuepublic void setRadius(double d)
d - The new radius valuepublic void set(double[] vector)
The vector is an array of three doubles, latitude, longitude, and radius, in that order.
vector - v[0] = latitude, v[1] = longitude, v[2] = radius
public void set(double lat,
double lon,
double rad)
lat - The new latitudelon - The new longituderad - The new radius
|
mhuss AstroLib 1.1.4a | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||