<> <> DIRECTORY GraphicsBasic USING [Vec]; PETypes: CEDAR DEFINITIONS = BEGIN <> <<>> Point: TYPE = GraphicsBasic.Vec; -- coordinates of the point Vertex: TYPE = REF VertexRec; VertexRec: TYPE = RECORD [ point: Point, -- coordinates of the vertex fixed: BOOLEAN _ FALSE -- is this vertex constrained? ]; VertexList: TYPE = VertexNode; VertexNode: TYPE = REF VertexNodeRec; VertexNodeRec: TYPE = RECORD [ preceding: VertexNode _ NIL, -- the preceding node in the list first: Vertex _ NIL, -- the data for this node rest: VertexNode _ NIL -- the next node in the list ]; Segment: TYPE = REF SegmentRec; SegmentRec: TYPE = RECORD [ type: SegmentType _ curveTo, fp: Vertex _ NIL, -- first point (last vertex of previous segment) vertices: VertexList _ NIL, refresh: BOOLEAN _ TRUE -- can refresh process run on this segment? ]; SegmentType: TYPE = {moveTo, curveTo}; SegmentList: TYPE = SegmentNode; SegmentNode: TYPE = REF SegmentNodeRec; SegmentNodeRec: TYPE = RECORD [ preceding: SegmentNode _ NIL, -- the preceding node in the list first: Segment _ NIL, -- the data for this node rest: SegmentNode _ NIL -- the next node in the list ]; Trajectory: TYPE = REF TrajectoryRec; TrajectoryRec: TYPE = RECORD [ segments: SegmentList _ NIL, refresh: BOOLEAN _ TRUE -- can refresh process run on this trajectory? ]; TrajectoryList: TYPE = TrajectoryNode; TrajectoryNode: TYPE = REF TrajectoryNodeRec; TrajectoryNodeRec: TYPE = RECORD [ preceding: TrajectoryNode _ NIL, -- the preceding node in the list first: Trajectory _ NIL, -- the data for this node rest: TrajectoryNode _ NIL -- the next node in the list ]; END.