toxi.math
Class ZoomLensInterpolation
java.lang.Object
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.
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 |
ZoomLensInterpolation
public ZoomLensInterpolation()
ZoomLensInterpolation
public ZoomLensInterpolation(float lensPos,
float lensStrength)
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 valuemax
- target valuet
- 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)