edu.umd.cs.piccolox.activities
Class PPathActivity
java.lang.Object
edu.umd.cs.piccolo.activities.PActivity
edu.umd.cs.piccolo.activities.PInterpolatingActivity
edu.umd.cs.piccolox.activities.PPathActivity
- Direct Known Subclasses:
- PPositionPathActivity
public abstract class PPathActivity
- extends PInterpolatingActivity
PPathActivity is the abstract base class for all path
activity interpolators. Path activities interpolate between multiple states
over the duration of the activity.
Knots are used to determine when in time the activity should move from state
to state. Knot values should be increasing in value from 0 to 1 inclusive.
This class is based on the Java 3D PathInterpolator object, see that class
documentation for more information on the basic concepts used in this classes
design.
See PPositionPathActivity for a concrete path activity that will animate
through a list of points.
- Version:
- 1.0
- Author:
- Jesse Grosjean
Field Summary |
protected float[] |
knots
|
Constructor Summary |
PPathActivity(long duration,
long stepRate,
float[] knots)
|
PPathActivity(long duration,
long stepRate,
int loopCount,
int mode,
float[] knots)
|
Methods inherited from class edu.umd.cs.piccolo.activities.PInterpolatingActivity |
activityFinished, activityStarted, activityStep, computeSlowInSlowOut, getFirstLoop, getLoopCount, getMode, getSlowInSlowOut, paramString, setDuration, setFirstLoop, setLoopCount, setMode, setRelativeTargetValueAdjustingForMode, setSlowInSlowOut, terminate |
Methods inherited from class edu.umd.cs.piccolo.activities.PActivity |
getActivityScheduler, getDelegate, getDuration, getNextStepTime, getStartTime, getStepRate, getStopTime, isAnimation, isStepping, processStep, setActivityScheduler, setDelegate, setStartTime, setStepRate, startAfter, terminate, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
knots
protected float[] knots
PPathActivity
public PPathActivity(long duration,
long stepRate,
float[] knots)
PPathActivity
public PPathActivity(long duration,
long stepRate,
int loopCount,
int mode,
float[] knots)
getKnotsLength
public int getKnotsLength()
setKnots
public void setKnots(float[] knots)
getKnots
public float[] getKnots()
setKnot
public void setKnot(int index,
float knot)
getKnot
public float getKnot(int index)
setRelativeTargetValue
public void setRelativeTargetValue(float zeroToOne)
- Description copied from class:
PInterpolatingActivity
- Subclasses should override this method and set the value on their
target (the object that they are modifying) accordingly.
- Overrides:
setRelativeTargetValue
in class PInterpolatingActivity
setRelativeTargetValue
public abstract void setRelativeTargetValue(float zeroToOne,
int startKnot,
int endKnot)
Copyright © 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.
Web Accessibility