pslib
Class PSCurve

java.lang.Object
  extended by pslib.PSCurve

public class PSCurve
extends java.lang.Object

PSCurve Class

The PSCurve object allows the creation of value curves. The object iterates between initial and target values over the specified time period and with the desired curvature.

This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.


Constructor Summary
PSCurve(float v)
          Create an object instance with the specified initial value
 
Method Summary
 float get()
          Return the current object value
 boolean isActive()
          Return the activity state of the object
 void set(float v)
          Set the object value to that specified
 void set(float i, float v, int t)
          Create a curve with the specified initial and target values, and iteration time
 void set(float i, float v, int t, float e)
          Create a curve with the specified initial and target values, iteration time and curve exponent
 void set(float v, int t)
          Create a curve with the specified target value and iteration time
 void set(float v, int t, float e)
          Create a curve with the specified target value, iteration time and curve exponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PSCurve

public PSCurve(float v)
Create an object instance with the specified initial value

Parameters:
v - initial value
Method Detail

get

public final float get()
Return the current object value

Returns:
the current object value

set

public final void set(float v)
Set the object value to that specified

Parameters:
v - value

set

public final void set(float v,
                      int t)
Create a curve with the specified target value and iteration time

Parameters:
v - target value
t - iteration time

set

public final void set(float v,
                      int t,
                      float e)
Create a curve with the specified target value, iteration time and curve exponent

Parameters:
v - target value
t - iteration time
e - curve exponent

set

public final void set(float i,
                      float v,
                      int t)
Create a curve with the specified initial and target values, and iteration time

Parameters:
i - initial value
v - target value
t - iteration time

set

public final void set(float i,
                      float v,
                      int t,
                      float e)
Create a curve with the specified initial and target values, iteration time and curve exponent

Parameters:
i - initial value
v - target value
t - iteration time
e - curve exponent

isActive

public final boolean isActive()
Return the activity state of the object

Returns:
the activity state of the object