<> <> <> DIRECTORY GraphicsBasic USING [Vec]; PETypes: CEDAR DEFINITIONS = BEGIN <> <<>> Point: TYPE = GraphicsBasic.Vec; -- coordinates of the point RefreshCondition: TYPE = {disabled, enabled, busy}; Vertex: TYPE = REF VertexRec; VertexRec: TYPE = RECORD [ point: Point, -- coordinates of the vertex bias: REAL _ 1.0, -- default bias to B-spline value tension: REAL _ 0.0 -- default tension to B-spline value ]; 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? controlPtPP: VertexNode _ NIL, -- the vertices of the control polygon that control controlPtP: VertexNode _ NIL, -- a particular spline segment, denoted as current, controlPtC: VertexNode _ NIL, -- prepreceding, preceding, and next in the controlPtN: VertexNode _ NIL -- BetaSplinePoints procedure ]; 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 global: BOOLEAN _ FALSE -- false iff active spline is continuously shaped ]; Trajectory: TYPE = REF TrajectoryRec; TrajectoryRec: TYPE = RECORD [ segments: SegmentList _ NIL, refresh: RefreshCondition _ enabled -- 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 spline: Trajectory _ NIL -- the spline trajectory associated with the control -- polygon trajectory ]; END.