Class ViewControlsSelectListener

    • Field Detail

      • pressedControlType

        protected java.lang.String pressedControlType
      • lastPickPoint

        protected java.awt.Point lastPickPoint
      • repeatTimer

        protected javax.swing.Timer repeatTimer
      • panStep

        protected double panStep
      • zoomStep

        protected double zoomStep
      • headingStep

        protected double headingStep
      • pitchStep

        protected double pitchStep
      • fovStep

        protected double fovStep
      • veStep

        protected double veStep
    • Constructor Detail

      • ViewControlsSelectListener

        public ViewControlsSelectListener​(WorldWindow wwd,
                                          ViewControlsLayer layer)
        Construct a controller for specified WorldWindow and ViewControlsLayer.

        ViewControlLayers are not sharable among WorldWindows. A separate layer and controller must be established for each window that's to have view controls.

        Parameters:
        wwd - the WorldWindow the specified layer is associated with.
        layer - the layer to control.
    • Method Detail

      • setRepeatTimerDelay

        public void setRepeatTimerDelay​(int delay)
        Set the repeat timer delay in milliseconds.
        Parameters:
        delay - the repeat timer delay in milliseconds.
        Throws:
        java.lang.IllegalArgumentException - if delay is less than or equal to zero.
      • getRepeatTimerDelay

        public int getRepeatTimerDelay()
        Get the repeat timer delay in milliseconds.
        Returns:
        the repeat timer delay in milliseconds.
      • setPanIncrement

        public void setPanIncrement​(double value)
        Set the panning distance factor. Doubling this value will double the panning speed. Negating it will reverse the panning direction. Default value is .6.
        Parameters:
        value - the panning distance factor.
      • getPanIncrement

        public double getPanIncrement()
        Get the panning distance factor.
        Returns:
        the panning distance factor.
      • setZoomIncrement

        public void setZoomIncrement​(double value)
        Set the zoom distance factor. Doubling this value will double the zooming speed. Negating it will reverse the zooming direction. Default value is .8.
        Parameters:
        value - the zooming distance factor.
      • getZoomIncrement

        public double getZoomIncrement()
        Get the zooming distance factor.
        Returns:
        the zooming distance factor.
      • setHeadingIncrement

        public void setHeadingIncrement​(double value)
        Set the heading increment value in decimal degrees. Doubling this value will double the heading change speed. Negating it will reverse the heading change direction. Default value is 1 degree.
        Parameters:
        value - the heading increment value in decimal degrees.
      • getHeadingIncrement

        public double getHeadingIncrement()
        Get the heading increment value in decimal degrees.
        Returns:
        the heading increment value in decimal degrees.
      • setPitchIncrement

        public void setPitchIncrement​(double value)
        Set the pitch increment value in decimal degrees. Doubling this value will double the pitch change speed. Must be positive. Default value is 1 degree.
        Parameters:
        value - the pitch increment value in decimal degrees.
        Throws:
        java.lang.IllegalArgumentException - if value is < zero.
      • getPitchIncrement

        public double getPitchIncrement()
        Get the pitch increment value in decimal degrees.
        Returns:
        the pitch increment value in decimal degrees.
      • setFovIncrement

        public void setFovIncrement​(double value)
        Set the field of view increment factor. At each iteration the current field of view will be multiplied or divided by this value. Must be greater then or equal to one. Default value is 1.05.
        Parameters:
        value - the field of view increment factor.
        Throws:
        java.lang.IllegalArgumentException - if value < 1;
      • getFovIncrement

        public double getFovIncrement()
        Get the field of view increment factor.
        Returns:
        the field of view increment factor.
      • setVeIncrement

        public void setVeIncrement​(double value)
        Set the vertical exaggeration increment. At each iteration the current vertical exaggeration will be increased or decreased by this amount. Must be greater than or equal to zero. Default value is 0.1.
        Parameters:
        value - the vertical exaggeration increment.
        Throws:
        java.lang.IllegalArgumentException - if value < 0.
      • getVeIncrement

        public double getVeIncrement()
        Get the vertical exaggeration increment.
        Returns:
        the vertical exaggeration increment.
      • getParentLayer

        protected Layer getParentLayer()
        Returns this ViewControlsSelectListener's parent layer. The parent layer is associated with picked objects, and is used to determine which SelectEvents thsi ViewControlsSelectListner responds to.
        Returns:
        this ViewControlsSelectListener's parent layer.
      • updateView

        protected void updateView​(ScreenAnnotation control,
                                  java.lang.String controlType)
      • isPathCrossingAPole

        protected boolean isPathCrossingAPole​(LatLon p1,
                                              LatLon p2)
      • computeNewZoom

        protected double computeNewZoom​(OrbitView view,
                                        double amount)
      • resetOrbitView

        protected void resetOrbitView​(OrbitView view)
        Reset the view to an orbit view state if in first person mode (zoom = 0)
        Parameters:
        view - the orbit view to reset
      • setupFirstPersonView

        protected void setupFirstPersonView​(OrbitView view)
        Setup the view to a first person mode (zoom = 0)
        Parameters:
        view - the orbit view to set into a first person view.
      • computeSurfacePoint

        protected Vec4 computeSurfacePoint​(OrbitView view,
                                           Angle heading,
                                           Angle pitch)
        Find out where on the terrain surface the eye would be looking at with the given heading and pitch angles.
        Parameters:
        view - the orbit view
        heading - heading direction clockwise from north.
        pitch - view pitch angle from the surface normal at the center point.
        Returns:
        the terrain surface point the view would be looking at in the viewport center.