Ejemplo n.º 1
0
 OrbitViewMoveToZoomAnimator(BasicOrbitView orbitView, Double end, double smoothing,
                             PropertyAccessor.DoubleAccessor propertyAccessor, bool endCenterOnSurface)
     : base(end, smoothing, propertyAccessor)
 {
     this.orbitView          = orbitView;
     this.endCenterOnSurface = endCenterOnSurface;
 }
 /**
  * Construct a {@link MoveToDoubleAnimator}
  *
  * @param end              The target value, the value to animate to.
  * @param smoothing        The smoothing factor. A number between 0 and 1.  The higher the number the greater the
  *                         smoothing.
  * @param propertyAccessor The accessor used to access the animated value.
  */
 public MoveToDoubleAnimator(
     double end, double smoothing,
     PropertyAccessor.DoubleAccessor propertyAccessor) : base(null, 0, end, propertyAccessor)
 {
     interpolator   = null;
     this.smoothing = smoothing;
 }
 /**
  * Construct a {@link MoveToDoubleAnimator}
  *
  * @param end              The target value, the value to animate to.
  * @param smoothing        smoothing The smoothing factor. A number between 0 and 1.  The higher the number the
  *                         greater the smoothing.
  * @param minEpsilon       The minimum difference between the current value and the target value that triggers the
  *                         end of the animation.  Defaults to .001.
  * @param propertyAccessor The double accessor used to access the animated value.
  */
 public MoveToDoubleAnimator(
     double end, double smoothing, double minEpsilon,
     PropertyAccessor.DoubleAccessor propertyAccessor) : base(null, 0, end, propertyAccessor)
 {
     this.interpolator = null;
     this.smoothing    = smoothing;
     this.minEpsilon   = minEpsilon;
 }
Ejemplo n.º 4
0
        public DoubleAnimator(Interpolator interpolator,
                              double begin, double end,
                              PropertyAccessor.DoubleAccessor propertyAccessor) : base(interpolator)
        {
            if (interpolator == null)
            {
                this.interpolator = new ScheduledInterpolator(10000);
            }

            if (propertyAccessor == null)
            {
                string message = Logging.getMessage("nullValue.ViewPropertyAccessorIsNull");
                Logging.logger().severe(message);
                throw new ArgumentException(message);
            }

            Begin = begin;
            End   = end;
            this.propertyAccessor = propertyAccessor;
        }
Ejemplo n.º 5
0
        /**
         * Create the animator. If the altitude mode is relative to surface elevation, the ending elevation will be
         * re-calculated as the animation runs to ensure that the final elevation is based on the most accurate elevation
         * data available.
         *
         * @param globe            Globe used to evaluate altitude mode and determine if mid-zoom is necessary. May be null.
         * @param beginZoom        Beginning elevation.
         * @param endZoom          Ending elevation.
         * @param beginLatLon      Beginning location.
         * @param endLatLon        Ending location.
         * @param altitudeMode     Altitude mode of ending elevation ({@link WorldWind#CLAMP_TO_GROUND},
         *                         {@link WorldWind#RELATIVE_TO_GROUND}, or {@link WorldWind#ABSOLUTE}. Altitude mode
         *                         is not used if {@code globe} is null.
         * @param propertyAccessor Accessor to set elevation.
         */
        public ViewElevationAnimator(Globe globe, double beginZoom, double endZoom, LatLon beginLatLon,
                                     LatLon endLatLon, int altitudeMode, PropertyAccessor.DoubleAccessor propertyAccessor) : base(null, beginZoom, endZoom, propertyAccessor)
        {
            this.endLatLon    = endLatLon;
            this.altitudeMode = altitudeMode;

            if (globe == null)
            {
                UseMidZoom = false;
            }
            else
            {
                this.globe   = globe;
                this.midZoom = computeMidZoom(globe, beginLatLon, endLatLon, beginZoom, endZoom);
                UseMidZoom   = useMidZoom(beginZoom, endZoom, midZoom);
            }

            if (UseMidZoom)
            {
                this.trueEndZoom = endZoom;
                this.End         = this.midZoom;
            }
        }