NASA World Wind

gov.nasa.worldwind.globes
Class EllipsoidalGlobe

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.globes.EllipsoidalGlobe
All Implemented Interfaces:
AVList, Extent, Globe, WWObject, java.beans.PropertyChangeListener, java.util.EventListener
Direct Known Subclasses:
Earth, Mars, Moon

public class EllipsoidalGlobe
extends WWObjectImpl
implements Globe


Field Summary
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Constructor Summary
EllipsoidalGlobe(double equatorialRadius, double polarRadius, double es, ElevationModel em)
           
 
Method Summary
 Cylinder computeBoundingCylinder(double verticalExaggeration, Sector sector)
          Returns a cylinder that minimally surrounds the sector at a specified vertical exaggeration.
 Vec4 computePointFromPosition(Angle latitude, Angle longitude, double metersElevation)
           
 Vec4 computePointFromPosition(Position position)
           
 Position computePositionFromPoint(Vec4 point)
           
 Vec4 computeSurfaceNormalAtPoint(Vec4 p)
           
 java.lang.Double getBestElevation(Angle latitude, Angle longitude)
           
 Vec4 getCenter()
           
 double getDiameter()
           
 double getEccentricitySquared()
           
 double getElevation(Angle latitude, Angle longitude)
           
 java.lang.Double getElevationAtResolution(Angle latitude, Angle longitude, double resolution)
           
 ElevationModel getElevationModel()
           
 double getEquatorialRadius()
           
 Extent getExtent()
           
 Position getIntersectionPosition(Line line)
           
 double getMaxElevation()
           
 double getMaximumRadius()
           
 double[] getMinAndMaxElevations(Sector sector)
           
 double getMinElevation()
           
 double getPolarRadius()
           
 double getRadius()
           
 double getRadiusAt(Angle latitude, Angle longitude)
           
 double getRadiusAt(LatLon latLon)
           
 java.lang.Object getStateKey()
           
 Tessellator getTessellator()
           
 Intersection[] intersect(Line line)
          Obtain the intersections of this extent with line.
 Intersection[] intersect(Line line, double altitude)
           
 boolean intersects(Frustum frustum)
          Tests whether or not this Extent intersects frustum.
 boolean intersects(Line line)
          Calculate whether or not line intersects this Extent.
 boolean intersects(Plane plane)
          Calculate whether or not this Extent is intersected by plane.
 void setTessellator(Tessellator tessellator)
           
 SectorGeometryList tessellate(DrawContext dc)
           
 
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
propertyChange
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, 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
 

Constructor Detail

EllipsoidalGlobe

public EllipsoidalGlobe(double equatorialRadius,
                        double polarRadius,
                        double es,
                        ElevationModel em)
Method Detail

computeBoundingCylinder

public Cylinder computeBoundingCylinder(double verticalExaggeration,
                                        Sector sector)
Returns a cylinder that minimally surrounds the sector at a specified vertical exaggeration.

Specified by:
computeBoundingCylinder in interface Globe
Parameters:
verticalExaggeration - the vertical exaggeration to apply to the globe's elevations when computing the cylinder.
sector - the sector to return the bounding cylinder for.
Returns:
The minimal bounding cylinder in Cartesian coordinates.
Throws:
java.lang.IllegalArgumentException - if globe or sector is null

computePointFromPosition

public final Vec4 computePointFromPosition(Angle latitude,
                                           Angle longitude,
                                           double metersElevation)
Specified by:
computePointFromPosition in interface Globe

computePointFromPosition

public final Vec4 computePointFromPosition(Position position)
Specified by:
computePointFromPosition in interface Globe

computePositionFromPoint

public final Position computePositionFromPoint(Vec4 point)
Specified by:
computePositionFromPoint in interface Globe

computeSurfaceNormalAtPoint

public Vec4 computeSurfaceNormalAtPoint(Vec4 p)
Specified by:
computeSurfaceNormalAtPoint in interface Globe

getBestElevation

public final java.lang.Double getBestElevation(Angle latitude,
                                               Angle longitude)
Specified by:
getBestElevation in interface Globe

getCenter

public final Vec4 getCenter()
Specified by:
getCenter in interface Extent

getDiameter

public final double getDiameter()
Specified by:
getDiameter in interface Extent

getEccentricitySquared

public double getEccentricitySquared()
Specified by:
getEccentricitySquared in interface Globe

getElevation

public final double getElevation(Angle latitude,
                                 Angle longitude)
Specified by:
getElevation in interface Globe

getElevationAtResolution

public final java.lang.Double getElevationAtResolution(Angle latitude,
                                                       Angle longitude,
                                                       double resolution)
Specified by:
getElevationAtResolution in interface Globe

getElevationModel

public final ElevationModel getElevationModel()
Specified by:
getElevationModel in interface Globe

getEquatorialRadius

public final double getEquatorialRadius()
Specified by:
getEquatorialRadius in interface Globe

getExtent

public final Extent getExtent()
Specified by:
getExtent in interface Globe

getIntersectionPosition

public final Position getIntersectionPosition(Line line)
Specified by:
getIntersectionPosition in interface Globe

getMaxElevation

public double getMaxElevation()
Specified by:
getMaxElevation in interface Globe

getMaximumRadius

public double getMaximumRadius()
Specified by:
getMaximumRadius in interface Globe

getMinAndMaxElevations

public double[] getMinAndMaxElevations(Sector sector)
Specified by:
getMinAndMaxElevations in interface Globe

getMinElevation

public double getMinElevation()
Specified by:
getMinElevation in interface Globe

getPolarRadius

public final double getPolarRadius()
Specified by:
getPolarRadius in interface Globe

getRadius

public final double getRadius()
Specified by:
getRadius in interface Extent

getRadiusAt

public double getRadiusAt(Angle latitude,
                          Angle longitude)
Specified by:
getRadiusAt in interface Globe

getRadiusAt

public double getRadiusAt(LatLon latLon)
Specified by:
getRadiusAt in interface Globe

getStateKey

public java.lang.Object getStateKey()
Specified by:
getStateKey in interface Globe

getTessellator

public Tessellator getTessellator()
Specified by:
getTessellator in interface Globe

intersect

public Intersection[] intersect(Line line)
Description copied from interface: Extent
Obtain the intersections of this extent with line. The returned array may be either null or of zero length if no intersections are discovered. It does not contain null elements. Tangential intersections are marked as such. line is considered to have infinite length in both directions.

Specified by:
intersect in interface Extent
Parameters:
line - the Line with which to intersect this Extent
Returns:
an array of intersections representing all the points where line enters or leave this Extent

intersect

public Intersection[] intersect(Line line,
                                double altitude)
Specified by:
intersect in interface Globe

intersects

public boolean intersects(Frustum frustum)
Description copied from interface: Extent
Tests whether or not this Extent intersects frustum. Returns true if any part of these two objects intersect, including the case where either object wholly contains the other, false otherwise.

Specified by:
intersects in interface Extent
Parameters:
frustum - the Frustum with which to test for intersection
Returns:
true if there is an intersection, false otherwise

intersects

public boolean intersects(Line line)
Description copied from interface: Extent
Calculate whether or not line intersects this Extent. This method may be faster than checking the size of the arary 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.

Specified by:
intersects in interface Extent
Parameters:
line - the Line with which to test for intersection
Returns:
true if an intersection is found, false otherwise

intersects

public boolean intersects(Plane plane)
Description copied from interface: Extent
Calculate whether or not this Extent is intersected by plane.

Specified by:
intersects in interface Extent
Parameters:
plane - the Plane with which to test for intersection
Returns:
true if plane is found to intersect this Extent

setTessellator

public void setTessellator(Tessellator tessellator)
Specified by:
setTessellator in interface Globe

tessellate

public SectorGeometryList tessellate(DrawContext dc)
Specified by:
tessellate in interface Globe

NASA World Wind