# ConfigurableEmitter.LinearInterpolator (Slick - The 2D Library)
Date: 2013-06-03

## org.newdawn.slick.particles
Class ConfigurableEmitter.LinearInterpolator

    java.lang.Object
      org.newdawn.slick.particles.ConfigurableEmitter.LinearInterpolator

All Implemented Interfaces:
  ConfigurableEmitter.Value

Enclosing class:
  ConfigurableEmitter

    public class ConfigurableEmitter.LinearInterpolator

extends java.lang.Object
implements ConfigurableEmitter.Value

A value computed based on linear interpolation between a set of points

Author:
  void

Constructor Summary
`ConfigurableEmitter.LinearInterpolator(java.util.ArrayList curve, int min, int max)` Create a new interpolated value

Method Summary
`java.util.ArrayList` `getCurve()` The list of data points to interpolate between
`int` `getMax()` Get the maxmimum value possible in this data set
`int` `getMin()` Get the minimum value possible in this data set
`float` `getValue(float t)` Get the value to use at a given time value
`boolean` `isActive()` Check if this interpolated value should be used
`void` `setActive(boolean active)` Indicate if this interpoalte value should be used
`void` `setCurve(java.util.ArrayList curve)` Set the collection of data points to interpolate between
`void` `setMax(int max)` Set the maximum value possible in this data set
`void` `setMin(int min)` Set the minimum value possible in this data set

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConfigurableEmitter.LinearInterpolator

    public ConfigurableEmitter.LinearInterpolator(java.util.ArrayList curve,
                                                  int min,
                                                  int max)

  Create a new interpolated value

  Parameters:
    `curve` - The set of points to interpolate between
    `min` - The minimum value in the dataset
    `max` - The maximum value possible in the dataset

Method Detail

### setCurve

    public void setCurve(java.util.ArrayList curve)

  Set the collection of data points to interpolate between

  Parameters:
    `curve` - The list of data points to interpolate between

### getCurve

    public java.util.ArrayList getCurve()

  The list of data points to interpolate between

  Returns:
    A list of Vector2f of the data points to interpolate between

### getValue

    public float getValue(float t)

  Get the value to use at a given time value

  Specified by:
    `getValue` in interface `ConfigurableEmitter.Value`
  Parameters:
    `t` - The time value (expecting t in [0,1])
  Returns:
    The value to use at the specified time

### isActive

    public boolean isActive()

  Check if this interpolated value should be used

  Returns:
    True if this value is in use

### setActive

    public void setActive(boolean active)

  Indicate if this interpoalte value should be used

  Parameters:
    `active` - True if this value should be used

### getMax

    public int getMax()

  Get the maxmimum value possible in this data set

  Returns:
    The maximum value possible in this data set

### setMax

    public void setMax(int max)

  Set the maximum value possible in this data set

  Parameters:
    `max` - The maximum value possible in this data set

### getMin

    public int getMin()

  Get the minimum value possible in this data set

  Returns:
    The minimum value possible in this data set

### setMin

    public void setMin(int min)

  Set the minimum value possible in this data set

  Parameters:
    `min` - The minimum value possible in this data set

Copyright © 2006 New Dawn Software. All Rights Reserved.