movements
Class HandMovementInStraightLine

java.lang.Object
  extended bymovements.HandMovement
      extended bymovements.HandMovementInStraightLine
All Implemented Interfaces:
java.io.Serializable

class HandMovementInStraightLine
extends HandMovement

This class represents a hand movement that is a transition from one hand movement to another. The constructor takes two hand movements as parameters. The hand is a weighted average of the two positions where the weight starts 100 percent at the first hand position and ends 100 at the second hand position. Note that the two hand movements are both movements, not fixed positions, and both must be calculated at each tick before the weighted average is taken. So the name is a slight misnomer.

Author:
Nigel

Field Summary
private  HandMovement handMovement1
           
private  HandMovement handMovement2
           
private  Position handPosition1
           
private  Position handPosition2
           
protected  int startTick
           
protected  int tickLength
           
 
Constructor Summary
(package private) HandMovementInStraightLine(HandMovement handMovement1, HandMovement handMovement2, int startTick, int tickLength)
           
 
Method Summary
(package private)  int getEndTick()
          DOCUMENT ME!
(package private)  void getPosition(Position position, int ticksIntoMovement)
          Given the number of ticks into this movement, return the position where the hand is located at that time.
(package private)  int getStartTick()
          DOCUMENT ME!
(package private)  int getTickLength()
          DOCUMENT ME!
private  void readObject(java.io.ObjectInputStream in)
           
 void Trace(java.lang.String indent)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handMovement1

private HandMovement handMovement1

handMovement2

private HandMovement handMovement2

handPosition1

private transient Position handPosition1

handPosition2

private transient Position handPosition2

startTick

protected int startTick

tickLength

protected int tickLength
Constructor Detail

HandMovementInStraightLine

HandMovementInStraightLine(HandMovement handMovement1,
                           HandMovement handMovement2,
                           int startTick,
                           int tickLength)
Method Detail

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

getPosition

void getPosition(Position position,
                 int ticksIntoMovement)
Description copied from class: HandMovement
Given the number of ticks into this movement, return the position where the hand is located at that time.

Specified by:
getPosition in class HandMovement
Parameters:
position - This is a return parameter and is set to the position where the hand is located.
ticksIntoMovement - This parameter must be greater than or equal to zero and less than or equal to the number of ticks in this hand movement (the value passed in the 'ticks' parameter to the constructor).

Trace

public void Trace(java.lang.String indent)
Description copied from class: HandMovement
DOCUMENT ME!

Overrides:
Trace in class HandMovement
Parameters:
indent - DOCUMENT ME!

getStartTick

int getStartTick()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getEndTick

int getEndTick()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getTickLength

int getTickLength()
DOCUMENT ME!

Returns:
DOCUMENT ME!


Copyright © 2003 Nigel Westbury