edu.umd.cs.piccolox.activities
Class PPathActivity

java.lang.Object
  extended by edu.umd.cs.piccolo.activities.PActivity
      extended by edu.umd.cs.piccolo.activities.PInterpolatingActivity
          extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.umd.cs.piccolo.activities.PActivity
PActivity.PActivityDelegate
 
Field Summary
protected  float[] knots
           
 
Fields inherited from class edu.umd.cs.piccolo.activities.PInterpolatingActivity
DESTINATION_TO_SOURCE, SOURCE_TO_DESTINATION, SOURCE_TO_DESTINATION_TO_SOURCE
 
Fields inherited from class edu.umd.cs.piccolo.activities.PActivity
TERMINATE_AND_FINISH, TERMINATE_AND_FINISH_IF_STEPPING, TERMINATE_WITHOUT_FINISHING
 
Constructor Summary
PPathActivity(long duration, long stepRate, float[] knots)
           
PPathActivity(long duration, long stepRate, int loopCount, int mode, float[] knots)
           
 
Method Summary
 float getKnot(int index)
           
 float[] getKnots()
           
 int getKnotsLength()
           
 void setKnot(int index, float knot)
           
 void setKnots(float[] knots)
           
 void setRelativeTargetValue(float zeroToOne)
          Subclasses should override this method and set the value on their target (the object that they are modifying) accordingly.
abstract  void setRelativeTargetValue(float zeroToOne, int startKnot, int endKnot)
           
 
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
 

Field Detail

knots

protected float[] knots
Constructor Detail

PPathActivity

public PPathActivity(long duration,
                     long stepRate,
                     float[] knots)

PPathActivity

public PPathActivity(long duration,
                     long stepRate,
                     int loopCount,
                     int mode,
                     float[] knots)
Method Detail

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