PETypes.mesa
Copyright (C) 1984 by Xerox Corporation. All rights reserved.
Written by Darlene Plebon on August 16, 1983 12:03 pm
Last editted by Pauline Ts'o on May 31, 1984 10:36:30 am PDT
DIRECTORY
GraphicsBasic USING [Vec];
PETypes: CEDAR DEFINITIONS =
BEGIN
Types for the Path Editor.
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: REAL1.0,      -- default bias to B-spline value
tension: REAL0.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: BOOLEANTRUE,     -- 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: BOOLEANFALSE     -- 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.