movements
Class Position

java.lang.Object
  extended bymovements.Position
Direct Known Subclasses:
ParticipantPosition

class Position
extends java.lang.Object

This class represents the position of a hand. The co-ordinates are relative to the floor.


Field Summary
(package private)  double across
           
(package private)  double down
           
 
Constructor Summary
(package private) Position()
           
(package private) Position(double down, double across)
           
 
Method Summary
(package private)  boolean isNearTo(Position other, int distance)
          Given this position and another position, determines if the two positions are closer to each other than the given distance.
(package private)  void setFromPositionRelativeToPerson(ParticipantPosition personPosition, double positionForwards, double positionSideways)
          Given a position specified relative to the person, calculate the position relative to the dance floor.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

down

double down

across

double across
Constructor Detail

Position

Position()

Position

Position(double down,
         double across)
Method Detail

setFromPositionRelativeToPerson

void setFromPositionRelativeToPerson(ParticipantPosition personPosition,
                                     double positionForwards,
                                     double positionSideways)
Given a position specified relative to the person, calculate the position relative to the dance floor.

The position of the point is given as the distance forward of the person and the distance sideways from the person (left = positive, right = negative).


isNearTo

boolean isNearTo(Position other,
                 int distance)
Given this position and another position, determines if the two positions are closer to each other than the given distance.


toString

public java.lang.String toString()


Copyright © 2003 Nigel Westbury