public class GlobeDisplay extends NavigatedDisplay
NavigatedDisplay.VerticalMapSet| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BOTTOM_VIEW_NAME
Bottom View name
|
static double |
EARTH_RADIUS
Earth Radius (m)
|
static java.lang.String |
EAST_VIEW_NAME
East View name
|
static java.lang.String |
NORTH_VIEW_NAME
North View name
|
static java.lang.String |
SOUTH_VIEW_NAME
South View name
|
static java.lang.String |
TOP_VIEW_NAME
Top View name
|
static java.lang.String |
WEST_VIEW_NAME
West View name
|
BOTTOM_VIEW, CLIP_BACK_DEFAULT, CLIP_BACK_PERSPECTIVE, CLIP_FRONT_DEFAULT, CLIP_FRONT_PERSPECTIVE, CURSOR_ALTITUDE, CURSOR_LATITUDE, CURSOR_LONGITUDE, EAST_VIEW, MODE_2D, MODE_2Din3D, MODE_3D, NORTH_VIEW, SOUTH_VIEW, TOP_VIEW, WEST_VIEWbehavior, defaultMouseFunctions, log_, POINT_MODE| Constructor and Description |
|---|
GlobeDisplay()
Constructs a new GlobeDisplay.
|
GlobeDisplay(boolean offscreen,
java.awt.Dimension dimension,
java.awt.GraphicsDevice screen)
Constructs a new GlobeDisplay.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyboardBehavior(visad.KeyboardBehavior behavior)
Add a keyboard behavior for this display
|
void |
addVerticalMap(visad.RealType newVertType)
Add a new mapping of this type to the vertical coordinate
|
void |
centerAndZoom(visad.georef.EarthLocation el,
visad.Real altitude,
double zoomFactor,
boolean animated,
boolean northUp)
Center and zoom to a particular point
|
void |
checkClipDistance()
If we are in perspective view then set the clip distance shorter
|
protected void |
cursorChange()
Handles a change to the cursor position.
|
protected void |
cursorMoved()
Handles a change to the cursor position.
|
void |
enableClipping(boolean clip)
Enable clipping of data at the box edges
|
protected visad.ScalarMap |
getAltitudeMap()
Accessor method for the ScalarMap for Altitude
|
java.lang.String |
getBottomViewName()
Accessor method.
|
visad.DisplayRealType |
getDisplayAltitudeType()
Accessor method for the DisplayAltitudeType
|
visad.CoordinateSystem |
getDisplayCoordinateSystem()
Get the display coordinate system that turns lat/lon/alt to
x/y/z
|
visad.DisplayRealType |
getDisplayLatitudeType()
Accessor method for the DisplayLatitudeType
|
visad.DisplayRealType |
getDisplayLongitudeType()
Accessor method for the DisplayLongitudeType
|
visad.DisplayTupleType |
getDisplayTupleType()
Accessor method for the DisplayTupleType.
|
visad.georef.EarthLocation |
getEarthLocation(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
Get the EarthLocation of a point in XYZ space
|
java.lang.String |
getEastViewName()
Accessor method.
|
java.awt.geom.Rectangle2D.Double |
getLatLonBox()
Get the latlon box of the displayed area.
|
java.lang.String |
getNorthViewName()
Accessor method.
|
java.lang.String |
getSouthViewName()
Accessor method.
|
visad.RealTuple |
getSpatialCoordinates(visad.georef.EarthLocation el)
Returns the spatial (XYZ) coordinates of the particular EarthLocation
|
double[] |
getSpatialCoordinates(visad.georef.EarthLocation el,
double[] xyz,
double altitude)
Returns the spatial (XYZ) coordinates of the particular EarthLocation
|
double[] |
getSpatialCoordinatesFromScreen(int x,
int y,
double zDepth)
Get spatial coordinates from screen
|
boolean |
getStereoAvailable()
Determine if this MapDisplay can do stereo.
|
java.lang.String |
getTopViewName()
Accessor method.
|
javax.media.j3d.View |
getView()
Get the View
|
visad.georef.EarthLocation |
getViewPointEarthLocation()
Get the viewpoint earth location
|
java.lang.String |
getWestViewName()
Accessor method.
|
protected void |
initializeClass()
Initialize the class.
|
static void |
main(java.lang.String[] args)
test by running java ucar.unidata.view.geoloc.NavigatedDisplay
|
protected void |
pointerMoved(int x,
int y)
Handles a change in the position of the mouse-pointer.
|
void |
removeVerticalMap(visad.RealType vertType)
Remove a new mapping of this type to the vertical coordinate
|
void |
resetScaleTranslate()
Reset the scale translate
|
visad.georef.EarthLocation |
screenToEarthLocation(int x,
int y)
Get the earth coordinates from the screen coordinates
|
void |
setClipDistanceFront(double value)
Set the front clip distance
|
void |
setEyePosition(double position)
Method for setting the eye position for a 3D stereo view.
|
void |
setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea)
Set the map area to be displayed in the box.
|
void |
setMapProjection(visad.georef.MapProjection mapProjection)
Define the map projection using a MapProjection type CoordinateSystem.
|
void |
setPerspectiveView(boolean perspectiveView)
Set the view to perspective or parallel if this is a 3D display.
|
void |
setVerticalRange(double min,
double max)
Set the range of the vertical coordinate
|
void |
setVerticalRangeUnit(visad.Unit newUnit)
Set the Unit of the vertical range
|
void |
setView(int view)
Set the view for 3D.
|
animateMatrix, animateMatrix, animateMatrix, animateMatrix, applyRotation, center, center, center, center, centerAndZoom, destroy, enableRubberBanding, getAnimationStringOn, getAutoRotate, getBoxVisible, getCenterPoint, getClipDistanceBack, getClipDistanceFront, getCursorAltitude, getCursorLatitude, getCursorLongitude, getDisplayMode, getEarthLocation, getEarthLocation, getEarthLocation, getIsAnimating, getLatLonBox, getLatLonRect, getNavigationToolBar, getNavigationToolBar, getRay, getRayDirection, getRayPositionAtZ, getRotation, getRubberBandBox, getScaledValue, getScalesVisible, getScreenCenter, getScreenCenterBottom, getScreenCenterLeft, getScreenCenterRight, getScreenCenterTop, getScreenCoordinates, getScreenCoordinates, getScreenLowerLeft, getScreenLowerRight, getScreenSidesCoordinates, getScreenUpperLeft, getScreenUpperRight, getSpatialCoordinates, getSpatialCoordinatesFromScreen, getVerticalRange, getVerticalRangeUnit, getVerticalRangeVisible, getVisadBox, init, isClippingEnabled, isPerspectiveView, moveToScreen, moveToScreen, moveToScreen, rotateFaster, rotateSlower, rotateView, rotateView, setAnimationStringOn, setAutoRotate, setBoxVisible, setClipDistanceBack, setCursorAltitude, setCursorLatitude, setCursorLongitude, setCursorStringOn, setForeground, setMapProjection, setPolygonOffset, setPolygonOffsetFactor, setRotateDelay, setRotationMultiplierMatrix, setRubberBandBox, setScalesVisible, setVerticalMapUnit, setVerticalRangeVisible, setView, updateLocationaddDisplayable, addDisplayListener, addPropertyChangeListener, addPropertyChangeListener, addScalarMap, addScalarMaps, addVetoableChangeListener, addVetoableChangeListener, buildAnimationSet, dataChange, draw, ensureInactive, equals, finalize, firePropertyChange, firePropertyChange, getAnimationSetFromDisplayables, getAnimationStringVisible, getBackground, getComponent, getDestroyed, getDisplay, getDisplayableCount, getDisplayables, getDisplayables, getDisplayAspect, getDisplayComponent, getDisplayScale, getForeground, getImage, getMouseBehavior, getMouseFunctionMap, getOffscreenDimension, getProjectionMatrix, getSavedProjectionMatrix, getScale, getScreenBounds, getWaitMessageVisible, handleMouseWheelMoved, hashCode, indexOf, init, is3D, isActive, isPointMode, printMatrix, printMe, rebuild, rebuildDisplay, reDisplayAll, removeDisplayable, removeDisplayables, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, removeScalarMaps, removeVetoableChangeListener, removeVetoableChangeListener, replaceScalarMap, reScale, resetMouseFunctions, resetProjection, rotate, rotateX, rotateY, rotateZ, saveCurrentDisplay, saveCurrentDisplay, saveCurrentDisplay, saveProjection, setActive, setAnimation, setAnimationStringVisible, setBackground, setDefaultMouseFunctions, setDisplayables, setDisplayables, setDisplayActive, setDisplayAspect, setDisplayInactive, setKeyboardBehavior, setKeyboardEventMap, setKeyboardEventMap, setMouseFunctions, setOffscreenDimension, setPointMode, setProjectionMatrix, setRebuildNecessary, setWaitMessageVisible, setWheelEventMap, translate, zoom, zoompublic static java.lang.String BOTTOM_VIEW_NAME
public static java.lang.String NORTH_VIEW_NAME
public static java.lang.String EAST_VIEW_NAME
public static java.lang.String TOP_VIEW_NAME
public static java.lang.String SOUTH_VIEW_NAME
public static java.lang.String WEST_VIEW_NAME
public static final double EARTH_RADIUS
public GlobeDisplay()
throws visad.VisADException,
java.rmi.RemoteException
visad.VisADException - Couldn't create necessary VisAD objectjava.rmi.RemoteException - Couldn't create a remote objectpublic GlobeDisplay(boolean offscreen,
java.awt.Dimension dimension,
java.awt.GraphicsDevice screen)
throws visad.VisADException,
java.rmi.RemoteException
offscreen - true for an offscreen displaydimension - size of the displayscreen - screen devicevisad.VisADException - Couldn't create necessary VisAD objectjava.rmi.RemoteException - Couldn't create a remote objectprotected void initializeClass()
throws visad.VisADException,
java.rmi.RemoteException
initializeClass in class NavigatedDisplayjava.rmi.RemoteException - Java RMI problemvisad.VisADException - VisAD problempublic java.lang.String getTopViewName()
getTopViewName in class NavigatedDisplaypublic java.lang.String getBottomViewName()
getBottomViewName in class NavigatedDisplaypublic java.lang.String getNorthViewName()
getNorthViewName in class NavigatedDisplaypublic java.lang.String getEastViewName()
getEastViewName in class NavigatedDisplaypublic java.lang.String getSouthViewName()
getSouthViewName in class NavigatedDisplaypublic java.lang.String getWestViewName()
getWestViewName in class NavigatedDisplaypublic void addKeyboardBehavior(visad.KeyboardBehavior behavior)
addKeyboardBehavior in class DisplayMasterbehavior - behavior to addprotected void cursorMoved()
throws visad.VisADException,
java.rmi.RemoteException
cursorMoved in class NavigatedDisplayvisad.VisADException - VisAD failure.java.rmi.RemoteException - Java RMI failure.public visad.georef.EarthLocation screenToEarthLocation(int x,
int y)
throws visad.VisADException
screenToEarthLocation in class NavigatedDisplayx - screen x positiony - screen y positionvisad.VisADException - problem getting coordinatesprotected void pointerMoved(int x,
int y)
throws visad.UnitException,
visad.VisADException,
java.rmi.RemoteException
pointerMoved in class NavigatedDisplayx - x mouse locationy - y mouse locationjava.rmi.RemoteException - Java RMI problemvisad.UnitException - Unit conversion problemvisad.VisADException - VisAD problempublic void setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea)
throws visad.VisADException,
java.rmi.RemoteException
setMapArea in class NavigatedDisplaymapArea - ProjectionRect describing the map area to be displayedvisad.VisADException - invalid navigation or VisAD errorjava.rmi.RemoteException - Couldn't create a remote objectpublic void setMapProjection(visad.georef.MapProjection mapProjection)
throws visad.VisADException,
java.rmi.RemoteException
setMapProjection in class NavigatedDisplaymapProjection - map projection coordinate systemvisad.VisADException - Couldn't create necessary VisAD objectjava.rmi.RemoteException - Couldn't create a remote objectpublic visad.DisplayRealType getDisplayLatitudeType()
getDisplayLatitudeType in class NavigatedDisplaypublic visad.DisplayRealType getDisplayLongitudeType()
getDisplayLongitudeType in class NavigatedDisplaypublic visad.DisplayRealType getDisplayAltitudeType()
getDisplayAltitudeType in class NavigatedDisplaypublic visad.DisplayTupleType getDisplayTupleType()
protected visad.ScalarMap getAltitudeMap()
getAltitudeMap in class NavigatedDisplayprotected void cursorChange()
throws visad.VisADException,
java.rmi.RemoteException
visad.VisADException - VisAD failure.java.rmi.RemoteException - Java RMI failure.public void resetScaleTranslate()
throws visad.VisADException,
java.rmi.RemoteException
resetScaleTranslate in class NavigatedDisplayjava.rmi.RemoteException - Java RMI problemvisad.VisADException - matrix problempublic void setView(int view)
NORTH
_________
W | | E
E | TOP | A
S | MOTTOB| S
T |_______| T
SOUTH
setView in class NavigatedDisplayview - one of the static view fields (NORTH_VIEW, SOUTH_VIEW, ..
etc). In this display, NORTH is the Western Hemisphere,
SOUTH is the Eastern Hemisphere, EAST is the Pacific
region and WEST is the Atlantic Regionpublic void enableClipping(boolean clip)
enableClipping in class NavigatedDisplayclip - true to turn clipping on, otherwise offpublic javax.media.j3d.View getView()
getView in class NavigatedDisplaypublic void setPerspectiveView(boolean perspectiveView)
setPerspectiveView in class NavigatedDisplayperspectiveView - true for perspective viewpublic visad.georef.EarthLocation getEarthLocation(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
getEarthLocation in class NavigatedDisplayx - x coord.y - y coord.z - z coord.setZToZeroIfOverhead - If in the overhead view then set Z to 0public void centerAndZoom(visad.georef.EarthLocation el,
visad.Real altitude,
double zoomFactor,
boolean animated,
boolean northUp)
throws visad.VisADException,
java.rmi.RemoteException
centerAndZoom in class NavigatedDisplayel - the earth locationaltitude - the altitudezoomFactor - zoom factoranimated - true to animatenorthUp - rotate so north is upjava.rmi.RemoteException - Couldn't create a remote objectvisad.VisADException - Couldn't create necessary VisAD objectpublic double[] getSpatialCoordinatesFromScreen(int x,
int y,
double zDepth)
getSpatialCoordinatesFromScreen in class NavigatedDisplayx - screen Xy - screen YzDepth - the z depthpublic visad.RealTuple getSpatialCoordinates(visad.georef.EarthLocation el)
getSpatialCoordinates in class NavigatedDisplayel - earth location (lat/lon/alt) to translatepublic double[] getSpatialCoordinates(visad.georef.EarthLocation el,
double[] xyz,
double altitude)
throws visad.VisADException,
java.rmi.RemoteException
getSpatialCoordinates in class NavigatedDisplayel - earth location (lat/lon/alt) to translatexyz - Where to put the valuealtitude - the altitudejava.rmi.RemoteException - On badnessvisad.VisADException - On badnesspublic void addVerticalMap(visad.RealType newVertType)
throws visad.VisADException,
java.rmi.RemoteException
addVerticalMap in class NavigatedDisplaynewVertType - RealType of mapjava.rmi.RemoteException - Java RMI problemvisad.VisADException - VisAD problempublic void removeVerticalMap(visad.RealType vertType)
throws visad.VisADException,
java.rmi.RemoteException
removeVerticalMap in class NavigatedDisplayvertType - RealType of mapjava.rmi.RemoteException - Java RMI problemvisad.VisADException - VisAD problempublic void setVerticalRangeUnit(visad.Unit newUnit)
throws visad.VisADException,
java.rmi.RemoteException
setVerticalRangeUnit in class NavigatedDisplaynewUnit - unit of rangejava.rmi.RemoteException - Java RMI problemvisad.VisADException - VisAD problempublic void setVerticalRange(double min,
double max)
throws visad.VisADException,
java.rmi.RemoteException
setVerticalRange in class NavigatedDisplaymin - minimum value for vertical axismax - maximum value for vertical axisjava.rmi.RemoteException - Java RMI problemvisad.VisADException - VisAD problempublic boolean getStereoAvailable()
getStereoAvailable in class DisplayMasterpublic void setEyePosition(double position)
setEyePosition in class DisplayMasterposition - x position of each eye (left negative, right positive).public java.awt.geom.Rectangle2D.Double getLatLonBox()
throws visad.VisADException,
java.rmi.RemoteException
getLatLonBox in class NavigatedDisplayjava.rmi.RemoteException - On badnessvisad.VisADException - On badnesspublic visad.CoordinateSystem getDisplayCoordinateSystem()
getDisplayCoordinateSystem in class NavigatedDisplaypublic visad.georef.EarthLocation getViewPointEarthLocation()
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - not usedjava.lang.Exception - problem creating the displaypublic void setClipDistanceFront(double value)
setClipDistanceFront in class NavigatedDisplayvalue - clip distancepublic void checkClipDistance()