kinetic
Class Hop

java.lang.Object
  |
  +--kinetic.Behavior
        |
        +--kinetic.Hop
All Implemented Interfaces:
java.io.Serializable

public class Hop
extends Behavior

generates an upside down parabolic like offset. The speed at the start and end points are adjustable as well as the hop height. A parabola is approximated by setting in and out to both 0.7. Amount may be negative to flip the result.

See Also:
Serialized Form

Field Summary
 kinetic.KineticProperty amount
          property to hold the hop hieght
 kinetic.KineticProperty in
          property to hold the starting speed
 kinetic.KineticProperty out
          property to hold the ending speed
 
Fields inherited from class kinetic.Behavior
current_time, duration, isDone, owner, properties, timeFilters
 
Constructor Summary
Hop()
          creates a new instance of the Hop behavior
Hop(double new_in, double new_out, double new_amount)
          creates a new isntance of the Hop behavior with only Hop parameters
Hop(double delay_val, double dur_val, double new_in, double new_out, double new_amount)
          creates a new instance of the Hop behavior with more parameters
 
Method Summary
 void Process()
          main routine that makes the calculation
 void setamount(double new_amount)
          sets the peak offset amount
 void setInAmount(double new_in)
          sets the starting speed
 void setOutAmount(double new_out)
          sets the ending speed
 
Methods inherited from class kinetic.Behavior
addTimeFilter, apply, clear, getDuration, getPropertyList, getTimeFilterList, isDone, PrepareVariables, reset, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

public kinetic.KineticProperty in
property to hold the starting speed


out

public kinetic.KineticProperty out
property to hold the ending speed


amount

public kinetic.KineticProperty amount
property to hold the hop hieght

Constructor Detail

Hop

public Hop()
creates a new instance of the Hop behavior


Hop

public Hop(double new_in,
           double new_out,
           double new_amount)
creates a new isntance of the Hop behavior with only Hop parameters

Parameters:
new_in - starting speed
new_out - ending speed
new_amount - offset amount

Hop

public Hop(double delay_val,
           double dur_val,
           double new_in,
           double new_out,
           double new_amount)
creates a new instance of the Hop behavior with more parameters

Parameters:
delay_val - delay - ms
dur_val - duration - ms
new_in - startin speed
new_out - ending speed
new_amount - offset amount
Method Detail

setInAmount

public void setInAmount(double new_in)
sets the starting speed

Parameters:
new_in - starting speed

setOutAmount

public void setOutAmount(double new_out)
sets the ending speed

Parameters:
new_out - ending speed

setamount

public void setamount(double new_amount)
sets the peak offset amount

Parameters:
new_amount - offset amount

Process

public void Process()
main routine that makes the calculation

Specified by:
Process in class Behavior