|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.globes.EllipsoidalGlobe
gov.nasa.worldwind.globes.FlatGlobe
public class FlatGlobe
Defines a globe represented as a projection onto a plane. The projection type is modifiable. The default projection
is Mercator. New projections may be added by extending this class and overriding geodeticToCartesian
cartesianToGeodetic.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class gov.nasa.worldwind.globes.EllipsoidalGlobe |
|---|
EllipsoidalGlobe.StateKey |
| Field Summary | |
|---|---|
static String |
PROJECTION_LAT_LON
Latitude/Longitude projection. |
static String |
PROJECTION_MERCATOR
Mercator projection. |
static String |
PROJECTION_MODIFIED_SINUSOIDAL
|
static String |
PROJECTION_SINUSOIDAL
Sinusoidal projection. |
| Fields inherited from class gov.nasa.worldwind.globes.EllipsoidalGlobe |
|---|
egm96, equatorialRadius, es, polarRadius |
| Constructor Summary | |
|---|---|
FlatGlobe(double equatorialRadius,
double polarRadius,
double es,
ElevationModel em)
Create a new globe. |
|
| Method Summary | |
|---|---|
protected Position |
cartesianToGeodetic(Vec4 cart)
Compute the geographic position to corresponds to a Cartesian point. |
Vec4 |
computeNorthPointingTangentAtLocation(Angle latitude,
Angle longitude)
Computes a vector tangent to this globe and pointing toward the north pole. |
Vec4 |
computeSurfaceNormalAtLocation(Angle latitude,
Angle longitude)
Returns the normal to the Globe at the specified position. |
Vec4 |
computeSurfaceNormalAtPoint(Vec4 point)
Returns the normal to the Globe at the specified cartiesian point. |
Matrix |
computeSurfaceOrientationAtPosition(Angle latitude,
Angle longitude,
double metersElevation)
Returns the cartesian transform Matrix that maps model coordinates to a local coordinate system at (latitude, longitude, metersElevation). |
Matrix |
computeSurfaceOrientationAtPosition(Position position)
Returns the cartesian transform Matrix that maps model coordinates to a local coordinate system at (latitude, longitude, metersElevation). |
protected Vec4 |
geodeticToCartesian(Angle latitude,
Angle longitude,
double metersElevation)
Maps a position to a flat world Cartesian coordinates. |
double |
getElevation(Angle latitude,
Angle longitude)
Indicates the elevation at a specified location. |
GlobeStateKey |
getGlobeStateKey()
Returns a typed state key identifying this globe's current configuration. |
GlobeStateKey |
getGlobeStateKey(DrawContext dc)
Returns a typed state key identifying this globe's current configuration. |
String |
getProjection()
Indicates the projection used to project the globe onto a plane. |
double |
getRadiusAt(Angle latitude,
Angle longitude)
Indicates the radius of the globe at a location. |
double |
getRadiusAt(LatLon latLon)
Indicates this globe's radius at a specified location. |
Object |
getStateKey(DrawContext dc)
Returns a state key identifying this globe's current configuration. |
protected Intersection[] |
intersect(Line line,
double equRadius,
double polarRadius)
|
boolean |
intersects(Line line)
Determines whether or not line intersects this Extent. |
boolean |
intersects(Plane plane)
Calculate whether or not this Extent is intersected by plane. |
boolean |
isPointAboveElevation(Vec4 point,
double elevation)
Determines whether a point is above a given elevation |
void |
setProjection(String projection)
Set the projection used to project the globe onto a plane. |
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
onMessage, propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from interface java.beans.PropertyChangeListener |
|---|
propertyChange |
| Methods inherited from interface gov.nasa.worldwind.event.MessageListener |
|---|
onMessage |
| Field Detail |
|---|
public static final String PROJECTION_LAT_LON
public static final String PROJECTION_MERCATOR
public static final String PROJECTION_MODIFIED_SINUSOIDAL
public static final String PROJECTION_SINUSOIDAL
| Constructor Detail |
|---|
public FlatGlobe(double equatorialRadius,
double polarRadius,
double es,
ElevationModel em)
setProjection(String).
equatorialRadius - Radius of the globe at the equator.polarRadius - Radius of the globe at the poles.es - Square of the globe's eccentricity.em - Elevation model. May be null.| Method Detail |
|---|
protected Position cartesianToGeodetic(Vec4 cart)
EllipsoidalGlobe
cartesianToGeodetic in class EllipsoidalGlobecart - Cartesian point to convert to geographic.
cart.EllipsoidalGlobe.geodeticToCartesian(gov.nasa.worldwind.geom.Angle, gov.nasa.worldwind.geom.Angle, double)
public Vec4 computeNorthPointingTangentAtLocation(Angle latitude,
Angle longitude)
Globe
computeNorthPointingTangentAtLocation in interface GlobecomputeNorthPointingTangentAtLocation in class EllipsoidalGlobelatitude - Latitude of the location at which to compute the tangent vector.longitude - Longitude of the location at which to compute the tangent vector.
public Vec4 computeSurfaceNormalAtLocation(Angle latitude,
Angle longitude)
EllipsoidalGlobe
computeSurfaceNormalAtLocation in interface GlobecomputeSurfaceNormalAtLocation in class EllipsoidalGlobelatitude - the latitude of the position.longitude - the longitude of the position.
public Vec4 computeSurfaceNormalAtPoint(Vec4 point)
EllipsoidalGlobe
computeSurfaceNormalAtPoint in interface GlobecomputeSurfaceNormalAtPoint in class EllipsoidalGlobepoint - the cartesian point.
public Matrix computeSurfaceOrientationAtPosition(Angle latitude,
Angle longitude,
double metersElevation)
EllipsoidalGlobe
computeSurfaceOrientationAtPosition in interface GlobecomputeSurfaceOrientationAtPosition in class EllipsoidalGlobelatitude - the latitude of the position.longitude - the longitude of the position.metersElevation - the number of meters above or below mean sea level.
public Matrix computeSurfaceOrientationAtPosition(Position position)
EllipsoidalGlobe
computeSurfaceOrientationAtPosition in interface GlobecomputeSurfaceOrientationAtPosition in class EllipsoidalGlobeposition - the latitude, longitude, and number of meters above or below mean sea level.
protected Vec4 geodeticToCartesian(Angle latitude,
Angle longitude,
double metersElevation)
geodeticToCartesian in class EllipsoidalGlobelatitude - the latitude of the position.longitude - the longitude of the position.metersElevation - the number of meters above or below mean sea level.
public double getElevation(Angle latitude,
Angle longitude)
Globe
getElevation in interface GlobegetElevation in class EllipsoidalGlobelatitude - the latitude of the location at which to determine elevation.longitude - the longitude of the location at which to determine elevation.
Globe.getElevationModel()public GlobeStateKey getGlobeStateKey()
Globe
getGlobeStateKey in interface GlobegetGlobeStateKey in class EllipsoidalGlobepublic GlobeStateKey getGlobeStateKey(DrawContext dc)
Globe
getGlobeStateKey in interface GlobegetGlobeStateKey in class EllipsoidalGlobedc - the current draw context.
public String getProjection()
setProjection(String)
public double getRadiusAt(Angle latitude,
Angle longitude)
Globe
getRadiusAt in interface GlobegetRadiusAt in class EllipsoidalGlobelatitude - Latitude of the location at which to determine radius.longitude - Longitude of the location at which to determine radius.
public double getRadiusAt(LatLon latLon)
Globe
getRadiusAt in interface GlobegetRadiusAt in class EllipsoidalGlobelatLon - the location of interest.
public Object getStateKey(DrawContext dc)
Globe
getStateKey in interface GlobegetStateKey in class EllipsoidalGlobedc - the current draw context.
protected Intersection[] intersect(Line line,
double equRadius,
double polarRadius)
intersect in class EllipsoidalGlobepublic boolean intersects(Line line)
Extentline intersects this Extent. This method may be faster than
checking the size of the array returned by intersect(Line). Implementing methods must ensure that
this method returns true if and only if intersect(Line) returns a non-null array containing at least
one element.
intersects in interface Extentintersects in class EllipsoidalGlobeline - the Line with which to test for intersection.
public boolean intersects(Plane plane)
ExtentExtent is intersected by plane.
intersects in interface Extentintersects in class EllipsoidalGlobeplane - the Plane with which to test for intersection.
plane is found to intersect this Extent.
public boolean isPointAboveElevation(Vec4 point,
double elevation)
isPointAboveElevation in interface GlobeisPointAboveElevation in class EllipsoidalGlobepoint - the Vec4 point to test.elevation - the elevation to test for.
public void setProjection(String projection)
projection - New projection. One of PROJECTION_LAT_LON, PROJECTION_MERCATOR, PROJECTION_SINUSOIDAL, or PROJECTION_MODIFIED_SINUSOIDAL.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||