Class KMLOrbitViewController

    • Field Detail

      • MIN_LENGTH_MILLIS

        protected final long MIN_LENGTH_MILLIS
        Minimum time for animation, in milliseconds.
        See Also:
        Constant Field Values
      • MAX_LENGTH_MILLIS

        protected final long MAX_LENGTH_MILLIS
        Maximum time for animation, in milliseconds.
        See Also:
        Constant Field Values
      • orbitView

        protected OrbitView orbitView
        The view to animate.
    • Constructor Detail

      • KMLOrbitViewController

        protected KMLOrbitViewController​(WorldWindow wwd)
        Create the view controller.
        Parameters:
        wwd - WorldWindow that holds the view to animate. The WorldWindow's view must be an instance of OrbitView.
    • Method Detail

      • goTo

        protected void goTo​(KMLLookAt lookAt)
        Animate the view to the position described by a KML LookAt.
        Specified by:
        goTo in class KMLViewController
        Parameters:
        lookAt - KML LookAt that describes the desired view.
      • goTo

        protected void goTo​(KMLCamera camera)
        Animate the view to the position described by a KML Camera.
        Specified by:
        goTo in class KMLViewController
        Parameters:
        camera - KML Camera that describes the desired view.
      • createFlyToOrbitViewAnimator

        protected FlyToOrbitViewAnimator createFlyToOrbitViewAnimator​(OrbitView orbitView,
                                                                      Position eyePosition,
                                                                      Angle heading,
                                                                      Angle pitch,
                                                                      Angle roll,
                                                                      long timeToMove,
                                                                      int altitudeMode)
        Create an animator to animate an orbit view to an eye position and orientation. The animator is aware of altitude mode, and will re-compute the final center position as animation runs to ensure that the calculation uses the most accurate elevation data available.
        Parameters:
        orbitView - View to animate.
        eyePosition - Desired eye position.
        heading - Desired heading.
        pitch - Desired pitch.
        roll - Desired roll.
        timeToMove - Animation time.
        altitudeMode - Altitude mode of eyePosition. (WorldWind.CLAMP_TO_GROUND, WorldWind.RELATIVE_TO_GROUND, or WorldWind.ABSOLUTE).
        Returns:
        An animator to animate an OrbitView to the desired eye position and orientation.
      • computeCenterPosition

        protected Position computeCenterPosition​(Position eyePosition,
                                                 Vec4 forward,
                                                 Angle pitch,
                                                 int altitudeMode)
        Compute a center position from an eye position and an orientation. If the view is looking at the earth, the center position is the intersection point of the globe and a ray beginning at the eye point, in the direction of the forward vector. If the view is looking at the horizon, the center position is the eye position. Otherwise, the center position is null.
        Parameters:
        eyePosition - The eye position.
        forward - The forward vector.
        pitch - View pitch.
        altitudeMode - Altitude mode of eyePosition.
        Returns:
        The center position of the view.