edu.umd.cs.piccolox.activities
Class PPositionPathActivity

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
              extended by edu.umd.cs.piccolox.activities.PPositionPathActivity

public class PPositionPathActivity
extends PPathActivity

PPositionPathActivity animates through a sequence of points.

Version:
1.0
Author:
Jesse Grosjean

Nested Class Summary
static interface PPositionPathActivity.Target
           
 
Nested classes/interfaces inherited from class edu.umd.cs.piccolo.activities.PActivity
PActivity.PActivityDelegate
 
Field Summary
protected  java.awt.geom.Point2D[] positions
           
protected  PPositionPathActivity.Target target
           
 
Fields inherited from class edu.umd.cs.piccolox.activities.PPathActivity
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
PPositionPathActivity(long duration, long stepRate, int loopCount, int mode, PPositionPathActivity.Target aTarget, float[] knots, java.awt.geom.Point2D[] positions)
           
PPositionPathActivity(long duration, long stepRate, PPositionPathActivity.Target aTarget)
           
PPositionPathActivity(long duration, long stepRate, PPositionPathActivity.Target aTarget, float[] knots, java.awt.geom.Point2D[] positions)
           
 
Method Summary
 java.awt.geom.Point2D getPosition(int index)
           
 java.awt.geom.Point2D[] getPositions()
           
protected  boolean isAnimation()
          Return true if this activity is performing an animation.
 void setPosition(int index, java.awt.geom.Point2D position)
           
 void setPositions(java.awt.geom.GeneralPath path)
           
 void setPositions(java.awt.geom.Point2D[] positions)
           
 void setRelativeTargetValue(float zeroToOne, int startKnot, int endKnot)
           
 
Methods inherited from class edu.umd.cs.piccolox.activities.PPathActivity
getKnot, getKnots, getKnotsLength, setKnot, setKnots, setRelativeTargetValue
 
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, 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

positions

protected java.awt.geom.Point2D[] positions

target

protected PPositionPathActivity.Target target
Constructor Detail

PPositionPathActivity

public PPositionPathActivity(long duration,
                             long stepRate,
                             PPositionPathActivity.Target aTarget)

PPositionPathActivity

public PPositionPathActivity(long duration,
                             long stepRate,
                             PPositionPathActivity.Target aTarget,
                             float[] knots,
                             java.awt.geom.Point2D[] positions)

PPositionPathActivity

public PPositionPathActivity(long duration,
                             long stepRate,
                             int loopCount,
                             int mode,
                             PPositionPathActivity.Target aTarget,
                             float[] knots,
                             java.awt.geom.Point2D[] positions)
Method Detail

isAnimation

protected boolean isAnimation()
Description copied from class: PActivity
Return true if this activity is performing an animation. This is used by the PCanvas to determine if it should set the render quality to PCanvas.animatingRenderQuality or not for each frame it renders.

Overrides:
isAnimation in class PActivity

getPositions

public java.awt.geom.Point2D[] getPositions()

getPosition

public java.awt.geom.Point2D getPosition(int index)

setPositions

public void setPositions(java.awt.geom.Point2D[] positions)

setPosition

public void setPosition(int index,
                        java.awt.geom.Point2D position)

setPositions

public void setPositions(java.awt.geom.GeneralPath path)

setRelativeTargetValue

public void setRelativeTargetValue(float zeroToOne,
                                   int startKnot,
                                   int endKnot)
Specified by:
setRelativeTargetValue in class PPathActivity


Copyright © 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.

Web Accessibility