FitBasic.mesa
Basic types for FitState and Friends
Maureen Stone June 25, 1984 7:23:44 pm PDT
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;
Sample: TYPE = RECORD
[next: SampleHandle ← NIL,
prev: SampleHandle ← NIL,
xy: Complex.Vec ← [0,0],
isNode: BOOLEANTRUE,
isCusp: BOOLEANFALSE,
tangent: Complex.Vec ← [0,0], --If node is cusp then this is the incoming tangent
tanOut: Complex.Vec ← [0,0] --only used if node is a cusp
];
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
];
}.