gov.nasa.worldwind.globes
Class FlatGlobe
java.lang.Object
gov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.globes.FlatGlobe
- All Implemented Interfaces:
- AVList, Extent, Globe, WWObject, PropertyChangeListener, EventListener
- Direct Known Subclasses:
- EarthFlat
public class FlatGlobe
- extends WWObjectImpl
- implements Globe
Flat globe.
See Flat World Notes inline comments for difference from EllipsoidalGlobe.
| 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 |
PROJECTION_LAT_LON
public static final String PROJECTION_LAT_LON
- See Also:
- Constant Field Values
PROJECTION_MERCATOR
public static final String PROJECTION_MERCATOR
- See Also:
- Constant Field Values
PROJECTION_MODIFIED_SINUSOIDAL
public static final String PROJECTION_MODIFIED_SINUSOIDAL
- See Also:
- Constant Field Values
PROJECTION_SINUSOIDAL
public static final String PROJECTION_SINUSOIDAL
- See Also:
- Constant Field Values
FlatGlobe
public FlatGlobe(double equatorialRadius,
double polarRadius,
double es,
ElevationModel em)
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:
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 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 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
getProjection
public String getProjection()
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 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
setProjection
public void setProjection(String projection)
setTessellator
public void setTessellator(Tessellator tessellator)
- Specified by:
setTessellator in interface Globe
tessellate
public SectorGeometryList tessellate(DrawContext dc)
- Specified by:
tessellate in interface Globe