<> <> <> 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: BOOLEAN _ TRUE, isCusp: BOOLEAN _ FALSE, 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 ]; }.