Glossary of Terms

Throughout the source code the following words are used for the following meanings:

Person

self explantory

Unit

A group of people acting as a unit. An example is a couple taking a two-hand hold and reeling with two other persons such as in ... A less obvious use of a unit is when defining the pousette.

The persons within the unit must remain in the same position relative to each other although the unit as a whole may move, rotate, or shift just like a person. Persons in the unit may take hands. Although it is not compulsory that they take hands, there is no known use of units that does not involve taking hands. Note that the first couple in the Pelorous reels in Pelorous Jack do not form a unit. Even if the first couple always maintain the same distance from each other, they are not facing the same direction relative to each other - sometimes the man is facing the woman's back and sometimes the woman is facing the man's back.

A unit may be used wherever a person may be used except that - A unit may not in turn participate in another unit - A unit may not take hands (the persons within the unit may take hands with each other but neither the unit as a whole nor anyone within the unit may take hands with any participant outside the unit).

A unit may be specified in the list of participants of a figure. However, a unit may not be specified as a participant in a figure if that participant is required by the figure to either take hands or to form a unit.

Participant

Either a person or a unit

Class Structure

Within the source code, when breaking down, we have the base class:
BaseParticipantDefinition
- PersonDefinition
- UnitDefinition
- ParticipantDefinition
so, Unit is the pure base class, but ParticipantDefinition is an instantiable class that represents a parameter to a figure that may be a person or a unit but we don't know which until run time.

The Passes

First Pass - parsing the XML

The first pass parses the XML and builds a tree. The tree very closely resembles the original XML. The following is done in the first pass:

- names of figures, participants, and unit types are resolved

Second Pass

The second pass builds a list of movements for each person. This pass removes figures, adding the list of movements within a figure to the list for each person participating in the figure.

This pass does not replace units. The reason is that smooth transitioning techniques are not performed until after the movement list for each person is built up, and the transitioning logic must know about units because otherwise it might alter people to smoother curves that result in units morphing in shape as the unit moves around.

This pass itself is divided into two sub-passes. This is necessary because end times for each movement in a series of movements do not have to be specified. If no end time is specified then they are calculated so that the movements follow at a smooth speed. For example, in the chase in Flowers of Edinburgh we want to specify in the XML the route taken by each person but we do not want to force the time at each fix to be specified. This program must first calculate the total distance travelled over all the movements and then divide the time appropriately for each movement. This requires two passes. The first pass builds up the TrackSegments array and the second builds up the ParticipantMovements array.