<<>> <> <> <> <> DIRECTORY G2dBasic, G3dBasic, G3dShape, G3dPlane; G3dPolyNet: CEDAR DEFINITIONS ~ BEGIN <> NatSequence: TYPE ~ G2dBasic.NatSequence; Plane: TYPE ~ G3dPlane.Plane; Shape: TYPE ~ G3dShape.Shape; Triple: TYPE ~ G3dBasic.Triple; Vertex: TYPE ~ G3dShape.Vertex; Validity: TYPE ~ G3dShape.Validity; <> <> Poly: TYPE ~ REF PolyRep; PolyRep: TYPE ~ RECORD [ visible: BOOL ¬ TRUE, -- is this polygon valid in this shape? vertices: NatSequence ¬ NIL, -- ccw list of vertices neighbors: NatSequence ¬ NIL, -- unordered list of edge-sharing polys plane: Plane, -- the plane of this poly clientData: REF ANY ¬ NIL -- the conventional escape hatch ]; Vert: TYPE ~ REF VertRep; VertRep: TYPE ~ RECORD [ visible: BOOL ¬ TRUE, -- is this polygon valid in this shape? polyRing: NatSequence ¬ NIL, -- ordered list of polys around this vertex vertex: Vertex ¬ NIL, -- standard vertex info clientData: REF ANY ¬ NIL -- the conventional escape hatch ]; PolyNet: TYPE ~ REF PolyNetRep; PolyNetRep: TYPE ~ RECORD [ vertices: VertSequence ¬ NIL, -- the vertices that make up the shape polygons: PolySequence ¬ NIL, -- the polygons that make up the shape clientData: REF ANY ¬ NIL -- the conventional escape hatch ]; VertSequence: TYPE ~ REF VertSequenceRep; VertSequenceRep: TYPE ~ RECORD [ valid: ARRAY Validity OF BOOL ¬ ALL[FALSE], length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF Vert ]; PolySequence: TYPE ~ REF PolySequenceRep; PolySequenceRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF Poly ]; <> PolyNetProc: TYPE ~ PROC [polyNet: PolyNet, p0, p1: INT, clientData: REF ANY] RETURNS [continue: BOOL ¬ TRUE]; <> PolyNetFromShape: PROC [shape: Shape] RETURNS [PolyNet]; <> <<>> ShapeFromPolyNet: PROC [polyNet: PolyNet] RETURNS [Shape]; <> <> FindVisibleNeighborsOfPoly: PROC [polyNet: PolyNet, poly: INT] RETURNS [NatSequence]; <> <<>> RelinkEdge: PROC [polyNet: PolyNet, v0, v1, oldPoly, newPoly: INT]; <> <<>> VisitPolyNet: PROC [polyNet: PolyNet, proc: PolyNetProc, clientData: REF ANY ¬ NIL]; <> <<>> RemovePolyFromNet: PROC [polyNet: PolyNet, poly: INT]; <> <<>> RebuildPolyNet: PROC [polyNet: PolyNet]; <> <<>> UpdateAllPolygonInformation: PROC [polyNet: PolyNet]; <> <<>> UpdatePolygonInformation: PROC [polyNet: PolyNet, polyID: INT]; <> <<>> UpdateVertexInformation: PROC [polyNet: PolyNet, vertexID: INT]; <> GetPolygonNeighbors: PROC [polyNet: PolyNet, polyID: INT] RETURNS [NatSequence]; <> <> IsGenus0: PROC [polyNet: PolyNet] RETURNS [BOOL]; <> <<>> ConcaveEdge: PROC [polyNet: PolyNet, poly0, poly1: INT] RETURNS [BOOL]; <> CoPlanar: PROC [polyNet: PolyNet, poly0, poly1: INT] RETURNS [BOOL]; <> <<>> CoPlanarFlipped: PROC [polyNet: PolyNet, poly0, poly1: INT] RETURNS [BOOL]; <> <> GetNormal: PUBLIC PROC [polyNet: PolyNet, polyID: INT] RETURNS [Triple]; <> <<>> GetOffset: PUBLIC PROC [polyNet: PolyNet, polyID: INT] RETURNS [REAL]; <> <<>> CopyPolyNet: PROC [polyNet: PolyNet, copyVertices: BOOL ¬ FALSE] RETURNS [PolyNet]; <> <> <> <<>> CopyPolySequence: PROC [polys: PolySequence] RETURNS [PolySequence]; AddToPolySequence:PROC [polys: PolySequence, poly: Poly] RETURNS [PolySequence]; LengthenPolySequence: PROC [polys: PolySequence, amount: REAL ¬ 1.3] RETURNS [new: PolySequence]; CopyVertSequence: PROC [verts: VertSequence, copyData: BOOL ¬ FALSE] RETURNS [VertSequence]; AddToVertSequence: PROC [verts: VertSequence, vert: Vert] RETURNS [VertSequence]; LengthenVertSequence: PROC [verts: VertSequence, amount: REAL ¬ 1.3] RETURNS [new: VertSequence]; END.