Package toxi.math
Class ZoomLensInterpolation
java.lang.Object
toxi.math.ZoomLensInterpolation
- All Implemented Interfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptiondouble
interpolate
(double min, double max, double t) Implements an interpolation equation using double precision values.float
interpolate
(float min, float max, float t) Implements an interpolation equation using float values.void
setLensPos
(float pos, float smooth) void
setLensStrength
(float str, float smooth)
-
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 interfaceInterpolateStrategy
- Parameters:
min
- current valuemax
- target valuet
- 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 interfaceInterpolateStrategy
- 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)
-