sub_arctic.anim
Class slow_in_slow_out
java.lang.Object
|
+--sub_arctic.anim.slow_in_slow_out
- public class slow_in_slow_out
- extends java.lang.Object
- implements pacer
Implements the pacing function for a slow in slow out, ala the artkit
pacing function of the same name. This function has two transition
points, one for the end of the slow in and the other for the end
of the slow out. These must be symmetrical, i.e. if you supply
boundary value of 0.2 to the constructor the first 20% of the
time will be slow in and the last 20% will be in the slow_out.
Field Summary |
protected double |
_boundary
Where to end the slow in, and where to begin the slow out (although
1-_boundary is more correct for where to begin the slow out). |
protected double |
_val_at_boundary
What is the amount of of time covered by the slow in and slow out? |
Constructor Summary |
slow_in_slow_out(double bnd,
double val)
Construct a slow in slow out pacer. |
Method Summary |
double |
pace(double t)
Perform the transformation. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
_boundary
protected double _boundary
- Where to end the slow in, and where to begin the slow out (although
1-_boundary is more correct for where to begin the slow out).
_val_at_boundary
protected double _val_at_boundary
- What is the amount of of time covered by the slow in and slow out?
slow_in_slow_out
public slow_in_slow_out(double bnd,
double val)
- Construct a slow in slow out pacer.
Providing the values 0.2 and 0.4 to this constructor would
cause the following to happen:
- The first 40% of the actual time would be spent in the first 20%
of the transition (slow in)
- The middle part of the transition would occur, and would occupy 20%
of the actual time
- The final 40% of the actual time would be spent in the final 20% of
the transition
- Parameters:
double
- bnd at what percent of the transition to end the slow in
and (symmetrically) at what point from the end of the
transition to begin the slow out.double
- val the value of the pacing function at the end of the
slow-in (this is also symmetrical)
pace
public double pace(double t)
- Perform the transformation.
- Specified by:
- pace in interface pacer
- Parameters:
double
- t the value to transform (time value from 0.0 to 1.0)- Returns:
- double the transformed value under the slow-in-slow-out parameters