movements
Class HandMovementInTransition

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

class HandMovementInTransition
extends HandMovement

This does a transition of between a half and one bar.

Over first half a bar, we retract from the first position. Over the last half a bar, we extend out to the second postion. Note that these two processes will overlap if the transition period is less than a bar.

If the transition period is more than half a bar and less than a bar then the hand transition will take place in three linear movements. The hand will start by withdrawing to the shoulder position, then it will move away from the old position and towards the new position, then it will extend to the new position.

Note also that if the new and the old position happen to be the same and we have only half a bar to transition then the hand will be held in the same position throughout the transition. This will happen if the same hands are held in the same way in two consecutive units or hand holds. Although there will be a half bar transition created, it will not be seen and the hands will remain in place and together throughout.

Author:
Nigel

Field Summary
private  double finalPositionForwards
           
private  double finalPositionSideways
           
private  int halfBar
           
private  double initialPositionForwards
           
private  double initialPositionSideways
           
private  ParticipantMovements participantMovements
           
private  ParticipantPosition personPosition
           
private  double shoulderPositionForwards
           
private  double shoulderPositionSideways
           
protected  int startTick
           
protected  int tickLength
           
 
Constructor Summary
(package private) HandMovementInTransition(ParticipantMovements participantMovements, double initialPositionForwards, double initialPositionSideways, double shoulderPositionForwards, double shoulderPositionSideways, double finalPositionForwards, double finalPositionSideways, int startTick, int tickLength, int ticksPerBar)
           
 
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)
           
(package private)  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

participantMovements

private ParticipantMovements participantMovements

initialPositionForwards

private double initialPositionForwards

initialPositionSideways

private double initialPositionSideways

shoulderPositionForwards

private double shoulderPositionForwards

shoulderPositionSideways

private double shoulderPositionSideways

finalPositionForwards

private double finalPositionForwards

finalPositionSideways

private double finalPositionSideways

halfBar

private int halfBar

personPosition

private transient ParticipantPosition personPosition

startTick

protected int startTick

tickLength

protected int tickLength
Constructor Detail

HandMovementInTransition

HandMovementInTransition(ParticipantMovements participantMovements,
                         double initialPositionForwards,
                         double initialPositionSideways,
                         double shoulderPositionForwards,
                         double shoulderPositionSideways,
                         double finalPositionForwards,
                         double finalPositionSideways,
                         int startTick,
                         int tickLength,
                         int ticksPerBar)
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)
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

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