FitBasic.mesa
Copyright Ó 1985, 1992 by Xerox Corporation. All rights reserved.
Maureen Stone November 26, 1984 5:53:17 pm PST
Doug Wyatt, September 5, 1985 1:53:26 pm PDT
Basic types for FitState and Friends
DIRECTORY
Complex USING [VEC],
Cubic USING [Bezier];
FitBasic: CEDAR DEFINITIONS = {
Handle: PUBLIC TYPE = REF Rec;
Rec:
PUBLIC
TYPE =
RECORD [
traj: TrajHandle,
slist: SListHandle,
closed: BOOLEAN,
minDist: REAL, --affects AddSample. Won't add a new sample inside of this distance
otherContours: LIST OF Contour,
undo: REF ANY --data for the Undo procedure
];
Contour:
TYPE =
RECORD [
traj: TrajHandle,
slist: SListHandle
];
SampleHandle: TYPE = REF Sample;
SListHandle: TYPE = REF SList;
LinkHandle: TYPE = REF Link;
TrajHandle: TYPE = REF Traj;
JointType: TYPE = {none, potential, forced};
Sample:
TYPE =
RECORD
[next: SampleHandle ¬ NIL,
prev: SampleHandle ¬ NIL,
xy: Complex.VEC ¬ [0,0],
jointType: JointType ¬ none,
tanIn: Complex.VEC ¬ [0,0], --set tanIn=tanOut for smooth joint
tanOut: Complex.VEC ¬ [0,0]
];
SList:
TYPE =
RECORD
[header: SampleHandle, --a header for a circular list
selectedSample: SampleHandle,
first: SampleHandle ¬ NIL,
last: SampleHandle ¬ NIL
];
Link:
TYPE =
RECORD
[next: LinkHandle ¬ NIL,
prev: LinkHandle ¬ NIL,
cubic: Cubic.Bezier
];
Traj:
TYPE =
RECORD
[links: LinkHandle ¬ NIL,
lastLink: LinkHandle ¬ NIL
];
}.