Package toxi.math

Class ZoomLensInterpolation

java.lang.Object
toxi.math.ZoomLensInterpolation
All Implemented Interfaces:
InterpolateStrategy

public class ZoomLensInterpolation extends Object implements InterpolateStrategy
This class provides an adjustable zoom lens to either bundle or dilate values around a focal point within a given interval. For a example use cases, please have a look at the provided ScaleMapDataViz and ZoomLens examples.
  • Constructor Details

    • ZoomLensInterpolation

      public ZoomLensInterpolation()
    • ZoomLensInterpolation

      public ZoomLensInterpolation(float lensPos, float lensStrength)
  • Method Details

    • interpolate

      public double interpolate(double min, double max, double t)
      Description copied from interface: InterpolateStrategy
      Implements an interpolation equation using double precision values.
      Specified by:
      interpolate in interface InterpolateStrategy
      Parameters:
      min - current value
      max - target value
      t - normalized interpolation factor (0.0 .. 1.0)
      Returns:
      interpolated value
    • interpolate

      public float interpolate(float min, float max, float t)
      Description copied from interface: InterpolateStrategy
      Implements an interpolation equation using float values.
      Specified by:
      interpolate in interface InterpolateStrategy
      Parameters:
      min - current value
      max - target value
      t - normalized interpolation factor (0.0 .. 1.0)
      Returns:
      interpolated value
    • setLensPos

      public void setLensPos(float pos, float smooth)
    • setLensStrength

      public void setLensStrength(float str, float smooth)