NASA World Wind

gov.nasa.worldwind.globes
Interface Globe

All Superinterfaces:
AVList, EventListener, Extent, MessageListener, PropertyChangeListener, WWObject
All Known Implementing Classes:
Earth, EarthFlat, EllipsoidalGlobe, FlatGlobe, Mars, Moon

public interface Globe
extends WWObject, Extent


Method Summary
 Matrix computeModelCoordinateOriginTransform(Angle latitude, Angle longitude, double metersElevation)
           
 Matrix computeModelCoordinateOriginTransform(Position position)
           
 Vec4 computeNorthPointingTangentAtLocation(Angle latitude, Angle longitude)
           
 Vec4 computePointFromLocation(LatLon location)
           
 Vec4 computePointFromPosition(Angle latitude, Angle longitude, double metersElevation)
           
 Vec4 computePointFromPosition(LatLon latLon, double metersElevation)
           
 Vec4 computePointFromPosition(Position position)
           
 Position computePositionFromPoint(Vec4 point)
           
 Vec4 computeSurfaceNormalAtLocation(Angle latitude, Angle longitude)
           
 Vec4 computeSurfaceNormalAtPoint(Vec4 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).
 double getEccentricitySquared()
           
 double getElevation(Angle latitude, Angle longitude)
           
 ElevationModel getElevationModel()
          Indicates this globe's elevation model.
 double getElevations(Sector sector, List<? extends LatLon> latlons, double targetResolution, double[] elevations)
           
 double getEquatorialRadius()
           
 Extent getExtent()
           
 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.
 Position getIntersectionPosition(Line line)
           
 double getMaxElevation()
           
 double getMaximumRadius()
           
 double[] getMinAndMaxElevations(Angle latitude, Angle longitude)
          Returns the minimum and maximum elevations at a specified location on this Globe.
 double[] getMinAndMaxElevations(Sector sector)
          Returns the minimum and maximum elevations within a specified sector on this Globe.
 double getMinElevation()
           
 double getPolarRadius()
           
 double getRadiusAt(Angle latitude, Angle longitude)
           
 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.
 Tessellator getTessellator()
          Returns this globe's current tessellator.
 Intersection[] intersect(Line line, double altitude)
          Intersects a specified line with this globe.
 Intersection[] intersect(Triangle triangle, double altitude)
          Intersects a specified triangle with the globe.
 boolean isPointAboveElevation(Vec4 point, double elevation)
          Determines whether a point is above a given elevation.
 void setElevationModel(ElevationModel elevationModel)
          Specifies this globe's elevation model.
 void setTessellator(Tessellator tessellator)
          Specifies this globe's tessellator.
 SectorGeometryList tessellate(DrawContext dc)
          Tessellate this globe for the currently visible region.
 
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
 
Methods inherited from interface gov.nasa.worldwind.geom.Extent
getCenter, getDiameter, getEffectiveRadius, getProjectedArea, getRadius, intersect, intersects, intersects, intersects
 

Method Detail

computeModelCoordinateOriginTransform

Matrix computeModelCoordinateOriginTransform(Angle latitude,
                                             Angle longitude,
                                             double metersElevation)
See Also:
computeSurfaceOrientationAtPosition(gov.nasa.worldwind.geom.Angle, gov.nasa.worldwind.geom.Angle, double)

computeModelCoordinateOriginTransform

Matrix computeModelCoordinateOriginTransform(Position position)
See Also:
computeSurfaceOrientationAtPosition(gov.nasa.worldwind.geom.Position)

computeNorthPointingTangentAtLocation

Vec4 computeNorthPointingTangentAtLocation(Angle latitude,
                                           Angle longitude)

computePointFromLocation

Vec4 computePointFromLocation(LatLon location)

computePointFromPosition

Vec4 computePointFromPosition(Angle latitude,
                              Angle longitude,
                              double metersElevation)

computePointFromPosition

Vec4 computePointFromPosition(LatLon latLon,
                              double metersElevation)

computePointFromPosition

Vec4 computePointFromPosition(Position position)

computePositionFromPoint

Position computePositionFromPoint(Vec4 point)

computeSurfaceNormalAtLocation

Vec4 computeSurfaceNormalAtLocation(Angle latitude,
                                    Angle longitude)

computeSurfaceNormalAtPoint

Vec4 computeSurfaceNormalAtPoint(Vec4 point)

computeSurfaceOrientationAtPosition

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). They X axis is mapped to the vector tangent to the globe and pointing East. The Y axis is mapped to the vector tangent to the Globe and pointing to the North Pole. The Z axis is mapped to the Globe normal at (latitude, longitude, metersElevation). The origin is mapped to the cartesian position of (latitude, longitude, metersElevation).

Parameters:
latitude - the latitude of the position.
longitude - the longitude of the position.
metersElevation - the number of meters above or below mean sea level.
Returns:
the cartesian transform Matrix that maps model coordinates to the local coordinate system at the specified position.

computeSurfaceOrientationAtPosition

Matrix computeSurfaceOrientationAtPosition(Position position)
Returns the cartesian transform Matrix that maps model coordinates to a local coordinate system at (latitude, longitude, metersElevation). They X axis is mapped to the vector tangent to the globe and pointing East. The Y axis is mapped to the vector tangent to the Globe and pointing to the North Pole. The Z axis is mapped to the Globe normal at (latitude, longitude, metersElevation). The origin is mapped to the cartesian position of (latitude, longitude, metersElevation).

Parameters:
position - the latitude, longitude, and number of meters above or below mean sea level.
Returns:
the cartesian transform Matrix that maps model coordinates to the local coordinate system at the specified position.

getEccentricitySquared

double getEccentricitySquared()

getElevation

double getElevation(Angle latitude,
                    Angle longitude)

getElevationModel

ElevationModel getElevationModel()
Indicates this globe's elevation model.

Returns:
this globe's elevation model.

getElevations

double getElevations(Sector sector,
                     List<? extends LatLon> latlons,
                     double targetResolution,
                     double[] elevations)

getEquatorialRadius

double getEquatorialRadius()

getExtent

Extent getExtent()

getGlobeStateKey

GlobeStateKey getGlobeStateKey()
Returns a typed state key identifying this globe's current configuration. Can be used to subsequently determine whether the globe's configuration has changed.

Returns:
a state key for the globe's current configuration.
Throws:
IllegalArgumentException - if the draw context is null.

getGlobeStateKey

GlobeStateKey getGlobeStateKey(DrawContext dc)
Returns a typed state key identifying this globe's current configuration. Can be used to subsequently determine whether the globe's configuration has changed.

Parameters:
dc - the current draw context.
Returns:
a state key for the globe's current configuration.
Throws:
IllegalArgumentException - if the draw context is null.

getIntersectionPosition

Position getIntersectionPosition(Line line)

getMaxElevation

double getMaxElevation()

getMaximumRadius

double getMaximumRadius()

getMinAndMaxElevations

double[] getMinAndMaxElevations(Angle latitude,
                                Angle longitude)
Returns the minimum and maximum elevations at a specified location on this Globe. This returns a two-element array filled with zero if this Globe has no elevation model.

Parameters:
latitude - the latitude of the location in question.
longitude - the longitude of the location in question.
Returns:
A two-element double array indicating the minimum and maximum elevations at the specified location, respectively. These values are the global minimum and maximum if the local minimum and maximum values are currently unknown, or zero if this Globe has no elevation model.

getMinAndMaxElevations

double[] getMinAndMaxElevations(Sector sector)
Returns the minimum and maximum elevations within a specified sector on this Globe. This returns a two-element array filled with zero if this Globe has no elevation model.

Parameters:
sector - the sector in question.
Returns:
A two-element double array indicating the sector's minimum and maximum elevations, respectively. These elements are the global minimum and maximum if the local minimum and maximum values are currently unknown, or zero if this Globe has no elevation model.

getMinElevation

double getMinElevation()

getPolarRadius

double getPolarRadius()

getRadiusAt

double getRadiusAt(Angle latitude,
                   Angle longitude)

getRadiusAt

double getRadiusAt(LatLon latLon)
Indicates this globe's radius at a specified location.

Parameters:
latLon - the location of interest.
Returns:
the globe's radius at that location.

getStateKey

Object getStateKey(DrawContext dc)
Returns a state key identifying this globe's current configuration. Can be used to subsequently determine whether the globe's configuration has changed.

Parameters:
dc - the current draw context.
Returns:
a state key for the globe's current configuration.
Throws:
IllegalArgumentException - if the draw context is null.

getTessellator

Tessellator getTessellator()
Returns this globe's current tessellator.

Returns:
the globe's current tessellator.

intersect

Intersection[] intersect(Line line,
                         double altitude)
Intersects a specified line with this globe. Only the ellipsoid itself is considered; terrain elevations are not incorporated.

Parameters:
line - the line to intersect.
altitude - a distance in meters to expand the globe's equatorial and polar radii prior to performing the intersection.
Returns:
the intersection points, or null if no intersection occurs or the line is null.

intersect

Intersection[] intersect(Triangle triangle,
                         double altitude)
Intersects a specified triangle with the globe. Only the ellipsoid itself is considered; terrain elevations are not incorporated.

Parameters:
triangle - the triangle to intersect.
altitude - a distance in meters to expand the globe's equatorial and polar radii prior to performing the intersection.
Returns:
the intersection points, or null if no intersection occurs or triangle is null.

isPointAboveElevation

boolean isPointAboveElevation(Vec4 point,
                              double elevation)
Determines whether a point is above a given elevation.

Parameters:
point - the Vec4 point to test. If null, this method returns false.
elevation - the elevation to test for.
Returns:
true if the given point is above the given elevation, otherwise false.

setElevationModel

void setElevationModel(ElevationModel elevationModel)
Specifies this globe's elevation model.

Parameters:
elevationModel - this globe's elevation model. May be null to indicate no elevation model.

setTessellator

void setTessellator(Tessellator tessellator)
Specifies this globe's tessellator.

Parameters:
tessellator - the new tessellator. Specify null to use the default tessellator.

tessellate

SectorGeometryList tessellate(DrawContext dc)
Tessellate this globe for the currently visible region.

Parameters:
dc - the current draw context.
Returns:
the tessellation, or null if the tessellation failed or the draw context identifies no visible region.
Throws:
IllegalStateException - if the globe has no tessellator and a default tessellator cannot be created.

NASA World Wind