sub_arctic.anim
Class line_trajectory
java.lang.Object
|
+--sub_arctic.anim.line_trajectory
- Direct Known Subclasses:
- anticipation_line
- public class line_trajectory
- extends java.lang.Object
- implements trajectory
This is a sample trajectory. It implements a line trajectory,
given a pacer object to do the pacing transformation.
Field Summary |
protected int |
_delta_x
Amount to move in x. |
protected int |
_delta_y
Amount to move in y. |
protected pacer |
_pacer
This holds the pacer we are using. |
protected int |
_x_origin
Origin in x. |
protected int |
_y_origin
Origin in y. |
Constructor Summary |
line_trajectory(int x1,
int y1,
int x2,
int y2,
pacer p)
This constructs this trajectory, given two points. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
_pacer
protected pacer _pacer
- This holds the pacer we are using.
_x_origin
protected int _x_origin
- Origin in x.
_y_origin
protected int _y_origin
- Origin in y.
_delta_x
protected int _delta_x
- Amount to move in x.
_delta_y
protected int _delta_y
- Amount to move in y.
line_trajectory
public line_trajectory(int x1,
int y1,
int x2,
int y2,
pacer p)
- This constructs this trajectory, given two points.
- Parameters:
int
- x1 starting x coordinateint
- y1 starting y coordinateint
- x2 ending x coordinateint
- y2 ending y coordinate
object_for_parm
public java.lang.Object object_for_parm(double parm)
- This does the work for this trajectory. It maps a point in time
to a Point object.
- Specified by:
- object_for_parm in interface trajectory
- Parameters:
double
- parm the amount of time to be mapped (in the range 0.0 to
1.0)
pacing_function
public pacer pacing_function()
- Return the pacing function.
- Specified by:
- pacing_function in interface trajectory
- Returns:
- pacer the pacing function we are using for this trajectory