Class NavigatedDisplay

java.lang.Object
ucar.visad.display.DisplayMaster
ucar.unidata.view.geoloc.NavigatedDisplay
Direct Known Subclasses:
GlobeDisplay, MapProjectionDisplay, TransectDisplay

public abstract class NavigatedDisplay extends DisplayMaster
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
  • Field Details

    • BOTTOM_VIEW

      public static final int BOTTOM_VIEW
      Bottom View
      See Also:
    • BOTTOM_VIEW_NAME

      public static String BOTTOM_VIEW_NAME
      Bottom View name
    • CLIP_BACK_DEFAULT

      public static double CLIP_BACK_DEFAULT
      default back clip value
    • CLIP_BACK_PERSPECTIVE

      public static double CLIP_BACK_PERSPECTIVE
      default back clip perspective
    • CLIP_FRONT_DEFAULT

      public static double CLIP_FRONT_DEFAULT
      default front clip value
    • CLIP_FRONT_PERSPECTIVE

      public static double CLIP_FRONT_PERSPECTIVE
      default front clip perspective
    • CURSOR_ALTITUDE

      public static final String CURSOR_ALTITUDE
      The name of the altitude property.
      See Also:
    • CURSOR_LATITUDE

      public static final String CURSOR_LATITUDE
      The name of the latitude property.
      See Also:
    • CURSOR_LONGITUDE

      public static final String CURSOR_LONGITUDE
      The name of the longitude property.
      See Also:
    • EAST_VIEW

      public static final int EAST_VIEW
      East View
      See Also:
    • EAST_VIEW_NAME

      public static String EAST_VIEW_NAME
      East View name
    • MODE_2D

      public static final int MODE_2D
      Field for a 2D mode in Java2D
      See Also:
    • MODE_2Din3D

      public static final int MODE_2Din3D
      Field for a 2D mode in Java3D
      See Also:
    • MODE_3D

      public static final int MODE_3D
      Field for a 3D mode
      See Also:
    • NORTH_VIEW

      public static final int NORTH_VIEW
      North View
      See Also:
    • NORTH_VIEW_NAME

      public static String NORTH_VIEW_NAME
      North View name
    • SOUTH_VIEW

      public static final int SOUTH_VIEW
      South View
      See Also:
    • SOUTH_VIEW_NAME

      public static String SOUTH_VIEW_NAME
      South View name
    • TOP_VIEW

      public static final int TOP_VIEW
      Top View
      See Also:
    • TOP_VIEW_NAME

      public static String TOP_VIEW_NAME
      Top View name
    • WEST_VIEW

      public static final int WEST_VIEW
      West View
      See Also:
    • WEST_VIEW_NAME

      public static String WEST_VIEW_NAME
      West View name
    • defaultClipDistanceBack

      protected double defaultClipDistanceBack
    • defaultClipDistanceFront

      protected double defaultClipDistanceFront
  • Constructor Details

    • NavigatedDisplay

      protected NavigatedDisplay()
      Default Constructor
    • NavigatedDisplay

      protected NavigatedDisplay(DisplayImpl display) throws VisADException, RemoteException
      Construct a NavigatedDisplay with the specified VisAD display
      Parameters:
      display - VisAD display for this NavigatedDisplay
      Throws:
      VisADException - VisAD error
      RemoteException - remote error
  • Method Details

    • init

      protected void init(DisplayImpl display) throws VisADException, RemoteException
      Construct a NavigatedDisplay with the specified VisAD display
      Parameters:
      display - VisAD display for this NavigatedDisplay
      Throws:
      VisADException - VisAD error
      RemoteException - remote error
    • initializeClass

      protected void initializeClass() throws VisADException, RemoteException
      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 problem
      VisADException - Unable to create the display
    • setPolygonOffsetFactor

      public void setPolygonOffsetFactor(int offset) throws VisADException, RemoteException
      Set the GraphicsModeControl.polygonOffsetFactor
      Parameters:
      offset - offset value
      Throws:
      RemoteException - on badness
      VisADException - on badness
    • setPolygonOffset

      public void setPolygonOffset(int offset) throws VisADException, RemoteException
      Set the GraphicsModeControl.polygonOffsetFactor
      Parameters:
      offset - offset value
      Throws:
      RemoteException - on badness
      VisADException - on badness
    • setRotationMultiplierMatrix

      public void setRotationMultiplierMatrix(double rotx, double roty, double rotz)
      Set the rotation multiplier matrix
      Parameters:
      rotx - x rotation
      roty - y rotation
      rotz - z rotation
    • getTopViewName

      public String getTopViewName()
      Accessor method.
      Returns:
      name for this view
    • getBottomViewName

      public String getBottomViewName()
      Accessor method.
      Returns:
      name for this view
    • getNorthViewName

      public String getNorthViewName()
      Accessor method.
      Returns:
      name for this view
    • getEastViewName

      public String getEastViewName()
      Accessor method.
      Returns:
      name for this view
    • getSouthViewName

      public String getSouthViewName()
      Accessor method.
      Returns:
      name for this view
    • getWestViewName

      public String 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 coordinate
      screenY - 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 coordinate
      screenY - Screen y coordinate
      zDepth - 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 coordinate
      screenY - Screen y coordinate
      Returns:
      direction vector
    • getRay

      public VisADRay getRay(int screenX, int screenY)
      Convert the screen coordinates to the ray
      Parameters:
      screenX - Screen x coordinate
      screenY - 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

      public abstract DisplayRealType getDisplayLatitudeType()
      Accessor method for the DisplayLatitudeType (i.e., what RealType.Latitude is mapped to)..
      Returns:
      the DisplayRealType that RealType.Latitude is mapped to
    • getDisplayLongitudeType

      public abstract DisplayRealType getDisplayLongitudeType()
      Accessor method for the DisplayLongitudeType (i.e., what RealType.Longitude is mapped to)..
      Returns:
      the DisplayRealType that RealType.Longitude is mapped to
    • getDisplayAltitudeType

      public abstract DisplayRealType 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 object
      RemoteException - 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 object
      RemoteException - 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 error
      RemoteException - Couldn't create a remote object
    • getAltitudeMap

      protected abstract ScalarMap getAltitudeMap()
      Accessor method for the altitude ScalarMap (i.e., (RealType.Altitude -> getDisplayAltitudeType).
      Returns:
      the ScalarMap that Altitude is mapped to
    • addVerticalMap

      public void addVerticalMap(RealType verticalType) throws VisADException, RemoteException
      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 problem
      VisADException - VisAD problem
    • removeVerticalMap

      public void removeVerticalMap(RealType verticalType) throws VisADException, RemoteException
      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 problem
      VisADException - 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

      public void setView(String view)
      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

      public void setRubberBandBox(RubberBandBox box)
      Set the RubberBandBox being used in this component. To be used by subclasses that support rubberbanding.
      Parameters:
      box - RubberBandBox to use
    • getRubberBandBox

      public RubberBandBox getRubberBandBox()
      Retrieve the RubberBandBox being used in this component.
      Returns:
      RubberBandBox being used. Return null if display doesn't support rubberbanding.
    • enableRubberBanding

      public void enableRubberBanding(boolean on) throws VisADException, RemoteException
      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 problem
      VisADException - unable to toggle the rubber banding function
    • setVerticalRangeUnit

      public void setVerticalRangeUnit(Unit newUnit) throws VisADException, RemoteException
      Set the Unit of the vertical range
      Parameters:
      newUnit - unit of range
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getVerticalRangeUnit

      public Unit getVerticalRangeUnit()
      Get the Unit of the vertical range
      Returns:
      unit of range
    • setVerticalRange

      public void setVerticalRange(double min, double max) throws VisADException, RemoteException
      Set the range of the vertical coordinate
      Parameters:
      min - minimum value for vertical axis
      max - maximum value for vertical axis
      Throws:
      RemoteException - Java RMI problem
      VisADException - Unable to create the display
    • getVerticalRange

      public double[] getVerticalRange()
      Get the range of the vertical coordinate (Altitude)
      Returns:
      array of {min, max} range.
    • setForeground

      public void setForeground(Color color)
      Local implementation to set rubber band box color also
      Overrides:
      setForeground in class DisplayMaster
      Parameters:
      color - color for foreground
    • setBoxVisible

      public void setBoxVisible(boolean on) throws VisADException, RemoteException
      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 object
      RemoteException - 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

      public void setScalesVisible(boolean on) throws VisADException, RemoteException
      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 object
      RemoteException - 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

      public EarthLocation getCenterPoint()
      Get the center lat/lon/alt of the projection.
      Returns:
      center location
    • getEarthLocation

      public EarthLocation getEarthLocation(RealTuple xyz)
      Get the EarthLocation of a point in XYZ space
      Parameters:
      xyz - RealTuple with MathType RealTupleType.SpatialCartesian3DTuple)
      Returns:
      point in lat/lon/alt space.
    • getEarthLocation

      public EarthLocation getEarthLocation(double[] xyz)
      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

      public EarthLocation getEarthLocation(double x, double y, double z)
      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

      public abstract RealTuple getSpatialCoordinates(EarthLocation el)
      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 translate
      xyz - 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 translate
      xyz - buffer to put value in
      altitude - 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

      protected float getScaledValue(ScalarMap map, float value)
      Return the real altitude from a ZAxis (or displayAltitudeType) value
      Parameters:
      map - map for scaling
      value - value to scale
      Returns:
      scaled value
    • setCursorLatitude

      protected void setCursorLatitude(Real latitude) throws VisADException, RemoteException
      Sets the cursor latitude property. Called by subclasses.
      Parameters:
      latitude - The cursor latitude.
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getCursorLatitude

      public Real getCursorLatitude()
      Gets the cursor latitude property.
      Returns:
      The currently-selected latitude. May be null.
    • setCursorLongitude

      protected void setCursorLongitude(Real longitude) throws VisADException, RemoteException
      Sets the cursor longitude property. Called by subclasses.
      Parameters:
      longitude - The cursor longitude.
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getCursorLongitude

      public Real getCursorLongitude()
      Gets the cursor longitude property.
      Returns:
      The currently-selected longitude. May be null.
    • setCursorAltitude

      protected void setCursorAltitude(Real altitude) throws VisADException, RemoteException
      Sets the cursor altitude property. Called by subclasses.
      Parameters:
      altitude - The cursor altitude.
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getCursorAltitude

      public Real 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 go
      sleepTime - sleep time
    • animateMatrix

      public void animateMatrix(int myTimeStamp, double[] from, double[] to, EarthLocation finalLocation)
      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 running
      from - The original matrix
      to - The dest matrix
      finalLocation - 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 time
      from - where we came from
      to - where we are going to
      finalLocation - the final location
      sleepTime - sleepy time
    • getScreenCenter

      public double[] getScreenCenter() throws VisADException, RemoteException
      Get the x/y position of the center of the screen
      Returns:
      x/y of screen center
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getScreenCoordinates

      public List<TwoFacedObject> getScreenCoordinates() throws VisADException, RemoteException
      Get the screen coordinates
      Returns:
      screen coords
      Throws:
      RemoteException - Java RMI issue
      VisADException - VisAD issue
    • getScreenSidesCoordinates

      public List<TwoFacedObject> getScreenSidesCoordinates() throws VisADException, RemoteException
      _more_
      Returns:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getScreenUpperLeft

      public double[] getScreenUpperLeft() throws VisADException, RemoteException
      Get the x/y position of the left/center of the screen
      Returns:
      x/y of screen left
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getScreenUpperRight

      public double[] getScreenUpperRight() throws VisADException, RemoteException
      Get the x/y position of the right/center of the screen
      Returns:
      x/y of screen right
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getScreenLowerLeft

      public double[] getScreenLowerLeft() throws VisADException, RemoteException
      Get the x/y position of the right/center of the screen
      Returns:
      x/y of screen right
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getScreenLowerRight

      public double[] getScreenLowerRight() throws VisADException, RemoteException
      Get the x/y position of the right/center of the screen
      Returns:
      x/y of screen right
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getScreenCenterTop

      public double[] getScreenCenterTop() throws VisADException, RemoteException
      _more_
      Returns:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getScreenCenterBottom

      public double[] getScreenCenterBottom() throws VisADException, RemoteException
      _more_
      Returns:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getScreenCenterLeft

      public double[] getScreenCenterLeft() throws VisADException, RemoteException
      _more_
      Returns:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getScreenCenterRight

      public double[] getScreenCenterRight() throws VisADException, RemoteException
      _more_
      Returns:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getLatLonBox

      public Rectangle2D.Double getLatLonBox() throws VisADException, RemoteException
      Get the latlon box of the displayed area
      Returns:
      lat lon box or null if it can't be determined
      Throws:
      RemoteException - On badness
      VisADException - 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 some
      normalizeLon - true to normalize longitudes to -180 to 180
      Returns:
      lat lon box or null if it can't be determined
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • screenToEarthLocation

      public EarthLocation screenToEarthLocation(int x, int y) throws VisADException
      Translate from screen to earth coordinates
      Parameters:
      x - screen x
      y - screen y
      Returns:
      the corresponding earth location
      Throws:
      VisADException - problem accessing data
    • getLatLonRect

      public ucar.unidata.geoloc.LatLonRect getLatLonRect() throws VisADException, RemoteException
      Get the latlon box of the displayed area
      Returns:
      lat lon box or null if it can't be determined
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getVisadBox

      public Rectangle2D.Double getVisadBox() throws VisADException, RemoteException
      Get the visad box of the displayed area
      Returns:
      visad box
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • center

      public void center(double x, double y)
      Center to x y
      Parameters:
      x - X
      y - Y
    • center

      public void center(double x, double y, boolean animated)
      Center to x y
      Parameters:
      x - X
      y - Y
      animated - 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 - x
      y - y
      sx - screen x
      sy - screen y
      times - 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 - x
      y - y
      sx - screen x
      sy - 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 - x
      y - y
      sx - screen x
      sy - screen y
      animated - Animate the move
    • getView

      public javax.media.j3d.View getView()
      Get the View
      Returns:
      the View
    • center

      public void center(EarthLocation el) throws VisADException, RemoteException
      Move the center to the given earth location
      Parameters:
      el - el to center on
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • center

      public void center(EarthLocation el, boolean animated) throws VisADException, RemoteException
      Move the center to the given earth location
      Parameters:
      el - el to center on
      animated - animate the move
      Throws:
      RemoteException - On badness
      VisADException - 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 on
      animated - animate the move
      zoomFactor - factor to zoom
      Throws:
      RemoteException - On badness
      VisADException - 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 on
      altitude - the altitude of the point
      zoomFactor - factor to zoom
      animated - animate the move
      northUp - put north up
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getRotation

      public double[] getRotation()
      Get the rotation matrix
      Overrides:
      getRotation in class DisplayMaster
      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 360
      decAngle - 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 from
      azimuth - azimuth from "north," clockwise, 0 to 360
      decAngle - tilt angle down from upward vertical. 0-180
    • getNavigationToolBar

      public NavigatedDisplayToolBar getNavigationToolBar()
      Return a toolbar that can be used to move around in the display (zoom, pan, reset).
      Returns:
      toolbar for navigating around the display
    • getNavigationToolBar

      public NavigatedDisplayToolBar getNavigationToolBar(int orientation, boolean floatable)
      Get the navigation toolbar for this NavigatedDisplay
      Parameters:
      orientation - the orientation
      floatable - true to allow floatation
      Returns:
      the toolbar
    • destroy

      public void destroy()
      Clean up
      Overrides:
      destroy in class DisplayMaster
    • cursorMoved

      protected void cursorMoved() throws VisADException, RemoteException
      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

      protected void pointerMoved(int x, int y) throws VisADException, RemoteException
      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 location
      y - pointer's y location
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • updateLocation

      protected void updateLocation(EarthLocation el) throws VisADException, RemoteException
      Update lat/lon/alt properties with the EarthLocation.
      Parameters:
      el - EarthLocation to use.
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getRayPositionAtZ

      public double[] getRayPositionAtZ(VisADRay ray, double zValue)
      Get the position of the ray at a particular Z value.
      Parameters:
      ray - ray to use
      zValue - Z value
      Returns:
      coordinates at Z value
    • getDisplayCoordinateSystem

      public CoordinateSystem getDisplayCoordinateSystem()
      Get the display coordinate system that turns lat/lon/alt to x/y/z
      Returns:
      the coordinate system (may be null)
    • setVerticalMapUnit

      protected void setVerticalMapUnit(ScalarMap vertMap, Unit u) throws VisADException, RemoteException
      Set the vertical map unit
      Parameters:
      vertMap - vertical map
      u - unit to set
      Throws:
      RemoteException - Java RMI problem
      VisADException - 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

      public void resetScaleTranslate() throws VisADException, RemoteException
      Reset the scale and translation
      Throws:
      RemoteException - Java RMI Exception
      VisADException - 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 class DisplayMaster
      Parameters:
      scale - x zoom factor ( > 1 = zoom in, 1 > zoom > 0 = zoom out). using 2.0 and .5 seems to work well.