Package ucar.unidata.view.geoloc
Class NavigatedDisplay
java.lang.Object
ucar.visad.display.DisplayMaster
ucar.unidata.view.geoloc.NavigatedDisplay
- Direct Known Subclasses:
GlobeDisplay
,MapProjectionDisplay
,TransectDisplay
Provides support for a navigated VisAD DisplayImplJ3D for
meteorological data.
Any displayable data must be able to map to RealType.Latitude, RealType.Longitude and/or RealType.Altitude.
- Version:
- $Revision: 1.100 $ $Date: 2007/04/24 14:00:56 $
- Author:
- Don Murray
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
A specialized ScalarMapSet for the set of Vertical maps -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Bottom Viewstatic String
Bottom View namestatic double
default back clip valuestatic double
default back clip perspectivestatic double
default front clip valuestatic double
default front clip perspectivestatic final String
The name of the altitude property.static final String
The name of the latitude property.static final String
The name of the longitude property.protected double
protected double
static final int
East Viewstatic String
East View namestatic final int
Field for a 2D mode in Java2Dstatic final int
Field for a 2D mode in Java3Dstatic final int
Field for a 3D modestatic final int
North Viewstatic String
North View namestatic final int
South Viewstatic String
South View namestatic final int
Top Viewstatic String
Top View namestatic final int
West Viewstatic String
West View nameFields inherited from class ucar.visad.display.DisplayMaster
behavior, defaultMouseFunctions, log_, POINT_MODE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Default Constructorprotected
NavigatedDisplay
(DisplayImpl display) Construct a NavigatedDisplay with the specified VisAD display -
Method Summary
Modifier and TypeMethodDescriptionvoid
addVerticalMap
(RealType verticalType) Method to add a new ScalarMap to the vertical coordinate (i.e., getDisplayAltitudeType is mapped to)..void
animateMatrix
(double[] to) Animate the matrixvoid
animateMatrix
(double[] to, long sleepTime) Animate matrixvoid
animateMatrix
(int myTimeStamp, double[] from, double[] to, EarthLocation finalLocation) Animate the matrix changes.void
animateMatrix
(int myTimeStamp, double[] from, double[] to, EarthLocation finalLocation, long sleepTime) Animate the matrixvoid
applyRotation
(javax.vecmath.Point3d p) Apply the rotationvoid
center
(double x, double y) Center to x yvoid
center
(double x, double y, boolean animated) Center to x yvoid
center
(EarthLocation el) Move the center to the given earth locationvoid
center
(EarthLocation el, boolean animated) Move the center to the given earth locationvoid
centerAndZoom
(EarthLocation el, boolean animated, double zoomFactor) Move the center to the given earth location and zoom invoid
centerAndZoom
(EarthLocation el, Real altitude, double zoomFactor, boolean animated, boolean northUp) Move the center to the given earth location and zoom inprotected void
Does nothing when the cursor changes.void
destroy()
Clean upvoid
enableClipping
(boolean clip) Enable clipping of data at the box edges.void
enableRubberBanding
(boolean on) Toggle the use of RubberBandBoxing.protected abstract ScalarMap
Accessor method for the altitude ScalarMap (i.e., (RealType.Altitude -> getDisplayAltitudeType).boolean
Return whether the animation string is visible or not.boolean
Get the autorotation.Accessor method.boolean
Get the box visibility.Get the center lat/lon/alt of the projection.double
Get the ClipDistanceBack property.double
Get the ClipDistanceFront property.Gets the cursor altitude property.Gets the cursor latitude property.Gets the cursor longitude property.abstract DisplayRealType
Accessor method for the DisplayAltitudeType (i.e., what RealType.Altitude is mapped to)..Get the display coordinate system that turns lat/lon/alt to x/y/zabstract DisplayRealType
Accessor method for the DisplayLatitudeType (i.e., what RealType.Latitude is mapped to)..abstract DisplayRealType
Accessor method for the DisplayLongitudeType (i.e., what RealType.Longitude is mapped to)..int
See if this is a 2D or 3D display.getEarthLocation
(double[] xyz) Get the EarthLocation of a point in XYZ spacegetEarthLocation
(double x, double y, double z) Get the EarthLocation of a point in XYZ spaceabstract EarthLocation
getEarthLocation
(double x, double y, double z, boolean setZToZeroIfOverhead) Get the EarthLocation of a point in XYZ spaceGet the EarthLocation of a point in XYZ spaceAccessor method.boolean
See if this display is animating.Get the latlon box of the displayed areagetLatLonBox
(boolean padSamples, boolean normalizeLon) Get the latlon box of the displayed areaucar.unidata.geoloc.LatLonRect
Get the latlon box of the displayed areaReturn a toolbar that can be used to move around in the display (zoom, pan, reset).getNavigationToolBar
(int orientation, boolean floatable) Get the navigation toolbar for this NavigatedDisplayAccessor method.getRay
(int screenX, int screenY) Convert the screen coordinates to the raydouble[]
getRayDirection
(int screenX, int screenY) Convert the screen coordinates to the directiondouble[]
getRayPositionAtZ
(VisADRay ray, double zValue) Get the position of the ray at a particular Z value.double[]
Get the rotation matrixRetrieve the RubberBandBox being used in this component.protected float
getScaledValue
(ScalarMap map, float value) Return the real altitude from a ZAxis (or displayAltitudeType) valueboolean
Get the box visibility.double[]
Get the x/y position of the center of the screendouble[]
_more_double[]
_more_double[]
_more_double[]
_more_Get the screen coordinatesint[]
getScreenCoordinates
(double[] position) Get the screen coordinates for the xyz locationdouble[]
Get the x/y position of the right/center of the screendouble[]
Get the x/y position of the right/center of the screen_more_double[]
Get the x/y position of the left/center of the screendouble[]
Get the x/y position of the right/center of the screenAccessor method.abstract RealTuple
Returns the spatial (XYZ) coordinates of the particular EarthLocationdouble[]
getSpatialCoordinates
(EarthLocation el, double[] xyz) Returns the spatial (XYZ) coordinates of the particular EarthLocationabstract double[]
getSpatialCoordinates
(EarthLocation el, double[] xyz, double altitude) Returns the spatial (XYZ) coordinates of the particular EarthLocationdouble[]
getSpatialCoordinatesFromScreen
(int screenX, int screenY) Convert the screen coordinates to visad coordinates at the given depth.double[]
getSpatialCoordinatesFromScreen
(int screenX, int screenY, double zDepth) Convert the screen coordinates to visad coordinates.Accessor method.double[]
Get the range of the vertical coordinate (Altitude)Get the Unit of the vertical rangeboolean
Gets the vertical range visible.javax.media.j3d.View
getView()
Get the ViewGet the visad box of the displayed areaAccessor method.protected void
init
(DisplayImpl display) Construct a NavigatedDisplay with the specified VisAD displayprotected void
Set up the display.boolean
Check to see if clipping is enabled..boolean
Get the view to perspective or parallel..void
moveToScreen
(double x, double y, int sx, int sy) Move the x/y point to the x/y point of the the given screen coordsvoid
moveToScreen
(double x, double y, int sx, int sy, boolean animated) Move the x/y point to the x/y point of the the given screen coordsvoid
moveToScreen
(double x, double y, int sx, int sy, int times) Move the x/y point to the x/y point of the the given screen coordsprotected void
pointerMoved
(int x, int y) Does nothing when the pointer moves.void
removeVerticalMap
(RealType verticalType) Method to remove a new ScalarMap to the vertical coordinate (i.e., getDisplayAltitudeType is mapped to)..void
resetClipDistance
(double scale) Zoom in on the displayvoid
Reset the scale and translationvoid
Rotate fastervoid
rotate slowervoid
rotateView
(double[] matrix, double azimuth, double decAngle) Change point of view of a 3D display from the matrix supplied, using input angles (unit = degree): For example, a view from the southwest has azimuth of 225 and decAngle say 20 to 70 or so.void
rotateView
(double azimuth, double decAngle) Change point of view of a 3D VisAD display, using input angles (unit = degree): For example, a view from the southwest has azimuth of 225 and decAngle say 20 to 70 or so.screenToEarthLocation
(int x, int y) Translate from screen to earth coordinatesvoid
setAnimationStringOn
(boolean visible) Toggle the animation string visibility..void
setAutoRotate
(boolean rotate) Set the autorotation.void
setBoxVisible
(boolean on) Set the visibility of a surrounding box.void
setClipDistanceBack
(double value) Set the ClipDistanceBack property.void
setClipDistanceFront
(double value) Set the ClipDistanceFront property.protected void
setCursorAltitude
(Real altitude) Sets the cursor altitude property.protected void
setCursorLatitude
(Real latitude) Sets the cursor latitude property.protected void
setCursorLongitude
(Real longitude) Sets the cursor longitude property.void
setCursorStringOn
(boolean on) Toggle the cursor display readout on/off.void
setForeground
(Color color) Local implementation to set rubber band box color alsovoid
setMapArea
(ucar.unidata.geoloc.ProjectionRect mapArea) Set the map area to be displayed in the box.void
setMapProjection
(ucar.unidata.geoloc.ProjectionImpl projection) Define the map projection using a Projection interfaceabstract void
setMapProjection
(MapProjection mapProjection) Define the map projection using a MapProjection type CoordinateSystem.void
setPerspectiveView
(boolean perspective) Set the view to perspective or parallel if this is a 3D display..void
setPolygonOffset
(int offset) Set the GraphicsModeControl.polygonOffsetFactorvoid
setPolygonOffsetFactor
(int offset) Set the GraphicsModeControl.polygonOffsetFactorvoid
setRotateDelay
(long millis) Set the rotation delayvoid
setRotationMultiplierMatrix
(double rotx, double roty, double rotz) Set the rotation multiplier matrixvoid
Set the RubberBandBox being used in this component.void
setScalesVisible
(boolean on) Set the visibility of the axis scales.protected void
setVerticalMapUnit
(ScalarMap vertMap, Unit u) Set the vertical map unitvoid
setVerticalRange
(double min, double max) Set the range of the vertical coordinatevoid
setVerticalRangeUnit
(Unit newUnit) Set the Unit of the vertical rangevoid
setVerticalRangeVisible
(boolean visible) Sets the vertical range visible.abstract void
setView
(int view) Set the view for 3D.void
Set the view from the name of a viewprotected void
Update lat/lon/alt properties with the EarthLocation.Methods inherited from class ucar.visad.display.DisplayMaster
addDisplayable, addDisplayListener, addKeyboardBehavior, addPropertyChangeListener, addPropertyChangeListener, addScalarMap, addScalarMaps, addVetoableChangeListener, addVetoableChangeListener, buildAnimationSet, dataChange, draw, ensureInactive, equals, firePropertyChange, firePropertyChange, getAnimationSetFromDisplayables, getAnimationStringVisible, getBackground, getComponent, getDestroyed, getDisplay, getDisplayableCount, getDisplayables, getDisplayables, getDisplayAspect, getDisplayComponent, getDisplayScale, getForeground, getImage, getMouseBehavior, getMouseFunctionMap, getOffscreenDimension, getProjectionMatrix, getSavedProjectionMatrix, getScale, getScreenBounds, getStereoAvailable, 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, setEyePosition, setKeyboardBehavior, setKeyboardEventMap, setKeyboardEventMap, setMouseFunctions, setOffscreenDimension, setPointMode, setProjectionMatrix, setRebuildNecessary, setWaitMessageVisible, setWheelEventMap, translate, zoom, zoom
-
Field Details
-
BOTTOM_VIEW
public static final int BOTTOM_VIEWBottom View- See Also:
-
BOTTOM_VIEW_NAME
Bottom View name -
CLIP_BACK_DEFAULT
public static double CLIP_BACK_DEFAULTdefault back clip value -
CLIP_BACK_PERSPECTIVE
public static double CLIP_BACK_PERSPECTIVEdefault back clip perspective -
CLIP_FRONT_DEFAULT
public static double CLIP_FRONT_DEFAULTdefault front clip value -
CLIP_FRONT_PERSPECTIVE
public static double CLIP_FRONT_PERSPECTIVEdefault front clip perspective -
CURSOR_ALTITUDE
The name of the altitude property.- See Also:
-
CURSOR_LATITUDE
The name of the latitude property.- See Also:
-
CURSOR_LONGITUDE
The name of the longitude property.- See Also:
-
EAST_VIEW
public static final int EAST_VIEWEast View- See Also:
-
EAST_VIEW_NAME
East View name -
MODE_2D
public static final int MODE_2DField for a 2D mode in Java2D- See Also:
-
MODE_2Din3D
public static final int MODE_2Din3DField for a 2D mode in Java3D- See Also:
-
MODE_3D
public static final int MODE_3DField for a 3D mode- See Also:
-
NORTH_VIEW
public static final int NORTH_VIEWNorth View- See Also:
-
NORTH_VIEW_NAME
North View name -
SOUTH_VIEW
public static final int SOUTH_VIEWSouth View- See Also:
-
SOUTH_VIEW_NAME
South View name -
TOP_VIEW
public static final int TOP_VIEWTop View- See Also:
-
TOP_VIEW_NAME
Top View name -
WEST_VIEW
public static final int WEST_VIEWWest View- See Also:
-
WEST_VIEW_NAME
West View name -
defaultClipDistanceBack
protected double defaultClipDistanceBack -
defaultClipDistanceFront
protected double defaultClipDistanceFront
-
-
Constructor Details
-
NavigatedDisplay
protected NavigatedDisplay()Default Constructor -
NavigatedDisplay
Construct a NavigatedDisplay with the specified VisAD display- Parameters:
display
- VisAD display for this NavigatedDisplay- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
-
Method Details
-
init
Construct a NavigatedDisplay with the specified VisAD display- Parameters:
display
- VisAD display for this NavigatedDisplay- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
initializeClass
Set up the display. Any additional work should be done in a subclass's intializeClass() method, which should call super.initializeClass() first.- Throws:
RemoteException
- Java RMI problemVisADException
- Unable to create the display
-
setPolygonOffsetFactor
Set the GraphicsModeControl.polygonOffsetFactor- Parameters:
offset
- offset value- Throws:
RemoteException
- on badnessVisADException
- on badness
-
setPolygonOffset
Set the GraphicsModeControl.polygonOffsetFactor- Parameters:
offset
- offset value- Throws:
RemoteException
- on badnessVisADException
- on badness
-
setRotationMultiplierMatrix
public void setRotationMultiplierMatrix(double rotx, double roty, double rotz) Set the rotation multiplier matrix- Parameters:
rotx
- x rotationroty
- y rotationrotz
- z rotation
-
getTopViewName
Accessor method.- Returns:
- name for this view
-
getBottomViewName
Accessor method.- Returns:
- name for this view
-
getNorthViewName
Accessor method.- Returns:
- name for this view
-
getEastViewName
Accessor method.- Returns:
- name for this view
-
getSouthViewName
Accessor method.- Returns:
- name for this view
-
getWestViewName
Accessor method.- Returns:
- name for this view
-
getSpatialCoordinatesFromScreen
public double[] getSpatialCoordinatesFromScreen(int screenX, int screenY) Convert the screen coordinates to visad coordinates at the given depth.- Parameters:
screenX
- Screen x coordinatescreenY
- Screen y coordinate- Returns:
- visad coordinates.
-
getSpatialCoordinatesFromScreen
public double[] getSpatialCoordinatesFromScreen(int screenX, int screenY, double zDepth) Convert the screen coordinates to visad coordinates.- Parameters:
screenX
- Screen x coordinatescreenY
- Screen y coordinatezDepth
- depth in the zbox- Returns:
- visad coordinates.
-
getRayDirection
public double[] getRayDirection(int screenX, int screenY) Convert the screen coordinates to the direction- Parameters:
screenX
- Screen x coordinatescreenY
- Screen y coordinate- Returns:
- direction vector
-
getRay
Convert the screen coordinates to the ray- Parameters:
screenX
- Screen x coordinatescreenY
- Screen y coordinate- Returns:
- the ray
-
getScreenCoordinates
public int[] getScreenCoordinates(double[] position) Get the screen coordinates for the xyz location- Parameters:
position
- xyz location- Returns:
- screen (x,y) coordinates
-
getDisplayMode
public int getDisplayMode()See if this is a 2D or 3D display.- Returns:
- display mode for this display (MODE_3D, MODE_2D, MODE_2Din3D)
-
setCursorStringOn
public void setCursorStringOn(boolean on) Toggle the cursor display readout on/off. By default, the display is toggled off at construction. Lat/Lon/Altitude values are displayed with the NavigatedDisplayCursorReadout component..- Parameters:
on
- true will display cursor position on the VisAD display (might be useful for debugging).- See Also:
-
setAnimationStringOn
public void setAnimationStringOn(boolean visible) Toggle the animation string visibility..- Parameters:
visible
- true to make it visible deprecated use #setAnimationStringVisible(boolean)
-
getAnimationStringOn
public boolean getAnimationStringOn()Return whether the animation string is visible or not.- Returns:
- true if visible deprecated use #getAnimationStringVisible()
-
getDisplayLatitudeType
Accessor method for the DisplayLatitudeType (i.e., what RealType.Latitude is mapped to)..- Returns:
- the DisplayRealType that RealType.Latitude is mapped to
-
getDisplayLongitudeType
Accessor method for the DisplayLongitudeType (i.e., what RealType.Longitude is mapped to)..- Returns:
- the DisplayRealType that RealType.Longitude is mapped to
-
getDisplayAltitudeType
Accessor method for the DisplayAltitudeType (i.e., what RealType.Altitude is mapped to)..- Returns:
- the DisplayRealType that RealType.Altitude is mapped to
-
enableClipping
public void enableClipping(boolean clip) Enable clipping of data at the box edges. Work is done in subclasses, but these should call super.enableClipping(clip) at the end..- Parameters:
clip
- true to turn clipping on, otherwise off
-
isClippingEnabled
public boolean isClippingEnabled()Check to see if clipping is enabled..- Returns:
- true if clipping on, otherwise false
-
setMapProjection
public void setMapProjection(ucar.unidata.geoloc.ProjectionImpl projection) throws VisADException, RemoteException Define the map projection using a Projection interface- Parameters:
projection
- Projection to use- Throws:
VisADException
- Couldn't create necessary VisAD objectRemoteException
- Couldn't create a remote object
-
setMapProjection
public abstract void setMapProjection(MapProjection mapProjection) throws VisADException, RemoteException Define the map projection using a MapProjection type CoordinateSystem. Implementation will be subclass dependent.- Parameters:
mapProjection
- map projection coordinate system- Throws:
VisADException
- Couldn't create necessary VisAD objectRemoteException
- Couldn't create a remote object
-
setMapArea
public void setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea) throws VisADException, RemoteException Set the map area to be displayed in the box. Subclasses should implement this if they want this functionality. This implementation does nothing.- Parameters:
mapArea
- ProjectionRect describing the map area to be displayed.- Throws:
VisADException
- invalid navigation or VisAD errorRemoteException
- Couldn't create a remote object
-
getAltitudeMap
Accessor method for the altitude ScalarMap (i.e., (RealType.Altitude -> getDisplayAltitudeType).- Returns:
- the ScalarMap that Altitude is mapped to
-
addVerticalMap
Method to add a new ScalarMap to the vertical coordinate (i.e., getDisplayAltitudeType is mapped to).. Subclasses should override if they want to implement this. This implementation does nothing.- Parameters:
verticalType
- RealType of the new vertical map- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
removeVerticalMap
Method to remove a new ScalarMap to the vertical coordinate (i.e., getDisplayAltitudeType is mapped to).. Subclasses should override if they want to implement this. This implementation does nothing.- Parameters:
verticalType
- RealType of the new vertical map- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
setView
public abstract void setView(int view) Set the view for 3D. The views are subject to each subclass-s implementation.- Parameters:
view
- one of the static view fields (NORTH_VIEW, SOUTH_VIEW, .. etc).
-
setView
Set the view from the name of a view- Parameters:
view
- the view name
-
setPerspectiveView
public void setPerspectiveView(boolean perspective) Set the view to perspective or parallel if this is a 3D display..- Parameters:
perspective
- true for perspective view
-
isPerspectiveView
public boolean isPerspectiveView()Get the view to perspective or parallel..- Returns:
- true if perpsective view
-
setRubberBandBox
Set the RubberBandBox being used in this component. To be used by subclasses that support rubberbanding.- Parameters:
box
- RubberBandBox to use
-
getRubberBandBox
Retrieve the RubberBandBox being used in this component.- Returns:
- RubberBandBox being used. Return null if display doesn't support rubberbanding.
-
enableRubberBanding
Toggle the use of RubberBandBoxing. Use the direct manipulation mouse button (usually MB3) plus the CTRL key to draw the rubber band box. This will automagically translate and zoom the display to the region selected.- Parameters:
on
- true to enable rubberbanding (on by default);- Throws:
RemoteException
- Java RMI problemVisADException
- unable to toggle the rubber banding function
-
setVerticalRangeUnit
Set the Unit of the vertical range- Parameters:
newUnit
- unit of range- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getVerticalRangeUnit
Get the Unit of the vertical range- Returns:
- unit of range
-
setVerticalRange
Set the range of the vertical coordinate- Parameters:
min
- minimum value for vertical axismax
- maximum value for vertical axis- Throws:
RemoteException
- Java RMI problemVisADException
- Unable to create the display
-
getVerticalRange
public double[] getVerticalRange()Get the range of the vertical coordinate (Altitude)- Returns:
- array of {min, max} range.
-
setForeground
Local implementation to set rubber band box color also- Overrides:
setForeground
in classDisplayMaster
- Parameters:
color
- color for foreground
-
setBoxVisible
Set the visibility of a surrounding box. At construction, the box is set to be invisible if mode = 2D.- Parameters:
on
- true if the box should be visible- Throws:
VisADException
- Couldn't create the necessary VisAD objectRemoteException
- If there was a problem making this change in a remote collaborative display.
-
getBoxVisible
public boolean getBoxVisible()Get the box visibility.- Returns:
- true if box is visible, otherwise false.
-
setScalesVisible
Set the visibility of the axis scales. Subclasses should override this if they don't support scales.- Parameters:
on
- true if the box should be visible- Throws:
VisADException
- Couldn't create the necessary VisAD objectRemoteException
- If there was a problem making this change in a remote collaborative display.
-
getScalesVisible
public boolean getScalesVisible()Get the box visibility.- Returns:
- true if box is visible, otherwise false.
-
getCenterPoint
Get the center lat/lon/alt of the projection.- Returns:
- center location
-
getEarthLocation
Get the EarthLocation of a point in XYZ space- Parameters:
xyz
- RealTuple with MathType RealTupleType.SpatialCartesian3DTuple)- Returns:
- point in lat/lon/alt space.
-
getEarthLocation
Get the EarthLocation of a point in XYZ space- Parameters:
xyz
- double[3] of x,y,z coords.- Returns:
- point in lat/lon/alt space.
-
getEarthLocation
Get the EarthLocation of a point in XYZ space- Parameters:
x
- x coord.y
- y coord.z
- z coord.- Returns:
- point in lat/lon/alt space.
-
getEarthLocation
public abstract EarthLocation getEarthLocation(double x, double y, double z, boolean setZToZeroIfOverhead) Get the EarthLocation of a point in XYZ space- Parameters:
x
- x coord.y
- y coord.z
- z coord.setZToZeroIfOverhead
- If in the overhead view then set Z to 0- Returns:
- point in lat/lon/alt space.
-
getSpatialCoordinates
Returns the spatial (XYZ) coordinates of the particular EarthLocation- Parameters:
el
- earth location to translate- Returns:
- RealTuple of display coordinates.
-
getSpatialCoordinates
public double[] getSpatialCoordinates(EarthLocation el, double[] xyz) throws VisADException, RemoteException Returns the spatial (XYZ) coordinates of the particular EarthLocation- Parameters:
el
- earth location to translatexyz
- buffer to put value in- Returns:
- xyz
- Throws:
RemoteException
- If there was a problem making this change in a remote collaborative display.VisADException
- Couldn't create the necessary VisAD object
-
getSpatialCoordinates
public abstract double[] getSpatialCoordinates(EarthLocation el, double[] xyz, double altitude) throws VisADException, RemoteException Returns the spatial (XYZ) coordinates of the particular EarthLocation- Parameters:
el
- earth location to translatexyz
- buffer to put value inaltitude
- the altitude- Returns:
- xyz
- Throws:
RemoteException
- If there was a problem making this change in a remote collaborative display.VisADException
- Couldn't create the necessary VisAD object
-
getScaledValue
Return the real altitude from a ZAxis (or displayAltitudeType) value- Parameters:
map
- map for scalingvalue
- value to scale- Returns:
- scaled value
-
setCursorLatitude
Sets the cursor latitude property. Called by subclasses.- Parameters:
latitude
- The cursor latitude.- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getCursorLatitude
Gets the cursor latitude property.- Returns:
- The currently-selected latitude. May be
null
.
-
setCursorLongitude
Sets the cursor longitude property. Called by subclasses.- Parameters:
longitude
- The cursor longitude.- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getCursorLongitude
Gets the cursor longitude property.- Returns:
- The currently-selected longitude. May be
null
.
-
setCursorAltitude
Sets the cursor altitude property. Called by subclasses.- Parameters:
altitude
- The cursor altitude.- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getCursorAltitude
Gets the cursor altitude property.- Returns:
- The currently-selected altitude. May be
null
.
-
getIsAnimating
public boolean getIsAnimating()See if this display is animating.- Returns:
- true if animating
-
animateMatrix
public void animateMatrix(double[] to) Animate the matrix- Parameters:
to
- matrix to animate to
-
animateMatrix
public void animateMatrix(double[] to, long sleepTime) Animate matrix- Parameters:
to
- where to gosleepTime
- sleep time
-
animateMatrix
Animate the matrix changes. Go through N steps, and set the projection matrix to be step/N percent between the from and to values.- Parameters:
myTimeStamp
- So we only have one runningfrom
- The original matrixto
- The dest matrixfinalLocation
- final location to animate to
-
applyRotation
public void applyRotation(javax.vecmath.Point3d p) Apply the rotation- Parameters:
p
- the point to rotate to
-
animateMatrix
public void animateMatrix(int myTimeStamp, double[] from, double[] to, EarthLocation finalLocation, long sleepTime) Animate the matrix- Parameters:
myTimeStamp
- my timefrom
- where we came fromto
- where we are going tofinalLocation
- the final locationsleepTime
- sleepy time
-
getScreenCenter
Get the x/y position of the center of the screen- Returns:
- x/y of screen center
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getScreenCoordinates
Get the screen coordinates- Returns:
- screen coords
- Throws:
RemoteException
- Java RMI issueVisADException
- VisAD issue
-
getScreenSidesCoordinates
_more_- Returns:
- _more_
- Throws:
RemoteException
- _more_VisADException
- _more_
-
getScreenUpperLeft
Get the x/y position of the left/center of the screen- Returns:
- x/y of screen left
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getScreenUpperRight
Get the x/y position of the right/center of the screen- Returns:
- x/y of screen right
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getScreenLowerLeft
Get the x/y position of the right/center of the screen- Returns:
- x/y of screen right
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getScreenLowerRight
Get the x/y position of the right/center of the screen- Returns:
- x/y of screen right
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getScreenCenterTop
_more_- Returns:
- _more_
- Throws:
RemoteException
- _more_VisADException
- _more_
-
getScreenCenterBottom
_more_- Returns:
- _more_
- Throws:
RemoteException
- _more_VisADException
- _more_
-
getScreenCenterLeft
_more_- Returns:
- _more_
- Throws:
RemoteException
- _more_VisADException
- _more_
-
getScreenCenterRight
_more_- Returns:
- _more_
- Throws:
RemoteException
- _more_VisADException
- _more_
-
getLatLonBox
Get the latlon box of the displayed area- Returns:
- lat lon box or null if it can't be determined
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getLatLonBox
public Rectangle2D.Double getLatLonBox(boolean padSamples, boolean normalizeLon) throws VisADException, RemoteException Get the latlon box of the displayed area- Parameters:
padSamples
- should we pad somenormalizeLon
- true to normalize longitudes to -180 to 180- Returns:
- lat lon box or null if it can't be determined
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
screenToEarthLocation
Translate from screen to earth coordinates- Parameters:
x
- screen xy
- screen y- Returns:
- the corresponding earth location
- Throws:
VisADException
- problem accessing data
-
getLatLonRect
Get the latlon box of the displayed area- Returns:
- lat lon box or null if it can't be determined
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getVisadBox
Get the visad box of the displayed area- Returns:
- visad box
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
center
public void center(double x, double y) Center to x y- Parameters:
x
- Xy
- Y
-
center
public void center(double x, double y, boolean animated) Center to x y- Parameters:
x
- Xy
- Yanimated
- Should animate the move
-
moveToScreen
public void moveToScreen(double x, double y, int sx, int sy, int times) Move the x/y point to the x/y point of the the given screen coords- Parameters:
x
- xy
- ysx
- screen xsy
- screen ytimes
- How many time should we iterate on the move deprecated dropped the times parameter.
-
moveToScreen
public void moveToScreen(double x, double y, int sx, int sy) Move the x/y point to the x/y point of the the given screen coords- Parameters:
x
- xy
- ysx
- screen xsy
- screen y
-
moveToScreen
public void moveToScreen(double x, double y, int sx, int sy, boolean animated) Move the x/y point to the x/y point of the the given screen coords- Parameters:
x
- xy
- ysx
- screen xsy
- screen yanimated
- Animate the move
-
getView
public javax.media.j3d.View getView()Get the View- Returns:
- the View
-
center
Move the center to the given earth location- Parameters:
el
- el to center on- Throws:
RemoteException
- On badnessVisADException
- On badness
-
center
Move the center to the given earth location- Parameters:
el
- el to center onanimated
- animate the move- Throws:
RemoteException
- On badnessVisADException
- On badness
-
centerAndZoom
public void centerAndZoom(EarthLocation el, boolean animated, double zoomFactor) throws VisADException, RemoteException Move the center to the given earth location and zoom in- Parameters:
el
- el to center onanimated
- animate the movezoomFactor
- factor to zoom- Throws:
RemoteException
- On badnessVisADException
- On badness
-
centerAndZoom
public void centerAndZoom(EarthLocation el, Real altitude, double zoomFactor, boolean animated, boolean northUp) throws VisADException, RemoteException Move the center to the given earth location and zoom in- Parameters:
el
- el to center onaltitude
- the altitude of the pointzoomFactor
- factor to zoomanimated
- animate the movenorthUp
- put north up- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getRotation
public double[] getRotation()Get the rotation matrix- Overrides:
getRotation
in classDisplayMaster
- Returns:
- rotation matrix
-
rotateView
public void rotateView(double azimuth, double decAngle) Change point of view of a 3D VisAD display, using input angles (unit = degree): For example, a view from the southwest has azimuth of 225 and decAngle say 20 to 70 or so. Preserves initial scaling and aspect ratios.- Parameters:
azimuth
- azimuth from "north," clockwise, 0 to 360decAngle
- tilt angle down from upward vertical. 0-180
-
rotateView
public void rotateView(double[] matrix, double azimuth, double decAngle) Change point of view of a 3D display from the matrix supplied, using input angles (unit = degree): For example, a view from the southwest has azimuth of 225 and decAngle say 20 to 70 or so.- Parameters:
matrix
- matrix to rotate fromazimuth
- azimuth from "north," clockwise, 0 to 360decAngle
- tilt angle down from upward vertical. 0-180
-
destroy
public void destroy()Clean up- Overrides:
destroy
in classDisplayMaster
-
cursorMoved
Does nothing when the cursor changes. This method is called when the mouse button controlling the cursor readout is pressed. Override where necessary.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
pointerMoved
Does nothing when the pointer moves. This method is called when the mouse moves over the display. Override where necessary.- Parameters:
x
- pointer's x locationy
- pointer's y location- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
updateLocation
Update lat/lon/alt properties with the EarthLocation.- Parameters:
el
- EarthLocation to use.- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
getRayPositionAtZ
Get the position of the ray at a particular Z value.- Parameters:
ray
- ray to usezValue
- Z value- Returns:
- coordinates at Z value
-
getDisplayCoordinateSystem
Get the display coordinate system that turns lat/lon/alt to x/y/z- Returns:
- the coordinate system (may be null)
-
setVerticalMapUnit
Set the vertical map unit- Parameters:
vertMap
- vertical mapu
- unit to set- Throws:
RemoteException
- Java RMI problemVisADException
- problem setting unit
-
setRotateDelay
public void setRotateDelay(long millis) Set the rotation delay- Parameters:
millis
- number of milliseconds between rotation events
-
rotateFaster
public void rotateFaster()Rotate faster -
rotateSlower
public void rotateSlower()rotate slower -
setAutoRotate
public void setAutoRotate(boolean rotate) Set the autorotation.- Parameters:
rotate
- true to auto-rotate
-
resetScaleTranslate
Reset the scale and translation- Throws:
RemoteException
- Java RMI ExceptionVisADException
- VisAD problem
-
getAutoRotate
public boolean getAutoRotate()Get the autorotation.- Returns:
- true for auto-rotate
-
setClipDistanceBack
public void setClipDistanceBack(double value) Set the ClipDistanceBack property.- Parameters:
value
- The new value for ClipDistanceBack
-
getClipDistanceBack
public double getClipDistanceBack()Get the ClipDistanceBack property.- Returns:
- The ClipDistanceBack
-
setClipDistanceFront
public void setClipDistanceFront(double value) Set the ClipDistanceFront property.- Parameters:
value
- The new value for ClipDistanceFront
-
getClipDistanceFront
public double getClipDistanceFront()Get the ClipDistanceFront property.- Returns:
- The ClipDistanceFront
-
setVerticalRangeVisible
public void setVerticalRangeVisible(boolean visible) Sets the vertical range visible.- Parameters:
visible
- the new vertical range visible
-
getVerticalRangeVisible
public boolean getVerticalRangeVisible()Gets the vertical range visible.- Returns:
- the vertical range visible
-
resetClipDistance
public void resetClipDistance(double scale) Zoom in on the display- Overrides:
resetClipDistance
in classDisplayMaster
- Parameters:
scale
- x zoom factor ( > 1 = zoom in, 1 > zoom > 0 = zoom out). using 2.0 and .5 seems to work well.
-