toxi.math
Class ZoomLensInterpolation

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

public class ZoomLensInterpolation
extends java.lang.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 Summary
ZoomLensInterpolation()
           
ZoomLensInterpolation(float lensPos, float lensStrength)
           
 
Method Summary
 float interpolate(float min, float max, float t)
          Implements an interpolation equation.
 void setLensPos(float pos, float smooth)
           
 void setLensStrength(float str, float smooth)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZoomLensInterpolation

public ZoomLensInterpolation()

ZoomLensInterpolation

public ZoomLensInterpolation(float lensPos,
                             float lensStrength)
Method Detail

interpolate

public float interpolate(float min,
                         float max,
                         float t)
Description copied from interface: InterpolateStrategy
Implements an interpolation equation.

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)