<<>> <> <> <> <> DIRECTORY G2dBasic, G2dMatrix, IO, Rope, Vector2; G3dBasic: CEDAR DEFINITIONS ~ BEGIN <> ROPE: TYPE ~ Rope.ROPE; STREAM: TYPE ~ IO.STREAM; Pair: TYPE ~ G2dBasic.Pair; -- RECORD [x, y: REAL ¬ 0.0] Triple: TYPE ~ G2dBasic.Triple; -- RECORD [x, y, z: REAL ¬ 0.0]; NatPair: TYPE ~ G2dBasic.NatPair; -- RECORD [x, y: NAT ¬ 0]; IntPair: TYPE ~ G2dBasic.IntPair; -- RECORD [x, y: INT ¬ 0]; IntegerPair: TYPE ~ G2dBasic.IntegerPair; -- RECORD [x, y: INTEGER ¬ 0]; Quad: TYPE ~ RECORD [x, y, z, w: REAL ¬ 0.0]; <> Sign: TYPE ~ G2dBasic.Sign; -- {positive, negative} Border: TYPE ~ G2dBasic.Border; -- {inside, outside, edge} Box: TYPE ~ RECORD [min, max: Triple]; -- 3d bounding box Hull: TYPE ~ RECORD [ -- elaborate bounding box center: Triple ¬ origin, -- center of hull pMin, pMax: Triple ¬ origin, -- min and max points rMin, rMax: REAL ¬ 0.0 -- min and max radii ]; Segment: TYPE ~ RECORD [p0, p1: Triple]; -- 3d line segment Screen: TYPE ~ RECORD [ quad: Quad ¬ [], -- homogeneous location pos: Pair ¬ [0, 0], -- screen space position intPos: IntegerPair ¬ [0, 0], -- screen space position in integers visible: BOOL ¬ TRUE, -- 3d point in viewing frustum? l, r, b, t, n, f: BOOL ¬ FALSE, -- l, r, b. t, n, f clip? fwdFacing: BOOL ¬ TRUE -- if vertex normal forward facing ]; Surface: TYPE ~ RECORD [ -- descriptor of polygon/patch clientData: REF ANY ¬ NIL, -- surface's private data vertices: NatSequence ¬ NIL -- vertex indices in shape ]; Ray: TYPE ~ RECORD [base, axis: Triple]; Circle: TYPE ~ RECORD [ -- 3d circle center, normal: Triple ¬ origin, radius: REAL ¬ 0.0 ]; Sphere: TYPE ~ RECORD [center: Triple, radius: REAL ¬ 0.0]; Triad: TYPE ~ RECORD [ v, n, b: Triple ¬ origin -- vector, principal normal, binormal ]; -- see Computational Geometry for Design and Manufacture Frame: TYPE ~ RECORD [ position: Triple ¬ origin, -- position on curve triad: Triad ¬ [origin,origin,origin] -- triad (right-handed) ]; Intersection: TYPE ~ RECORD [ point: Triple ¬ origin, doesIntersect: BOOL ¬ TRUE ]; <> NatSequence: TYPE ~ G2dBasic.NatSequence; NatSequenceRep: TYPE ~ G2dBasic.NatSequenceRep; IntegerSequence: TYPE ~ G2dBasic.IntegerSequence; IntegerSequenceRep: TYPE ~ G2dBasic.IntegerSequenceRep; IntSequence: TYPE ~ G2dBasic.IntSequence; IntSequenceRep: TYPE ~ G2dBasic.IntSequenceRep; RealSequence: TYPE ~ G2dBasic.RealSequence; RealSequenceRep: TYPE ~ G2dBasic.RealSequenceRep; PairSequence: TYPE ~ G2dBasic.PairSequence; PairSequenceRep: TYPE ~ G2dBasic.PairSequenceRep; NatPairSequence: TYPE ~ G2dBasic.NatPairSequence; NatPairSequenceRep: TYPE ~ G2dBasic.NatPairSequenceRep; IntegerPairSequence: TYPE ~ G2dBasic.IntegerPairSequence; IntegerPairSequenceRep: TYPE ~ G2dBasic.IntegerPairSequenceRep; IntPairSequence: TYPE ~ G2dBasic.IntPairSequence; IntPairSequenceRep: TYPE ~ G2dBasic.IntPairSequenceRep; BoolSequence: TYPE ~ REF BoolSequenceRep; BoolSequenceRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF BOOL ]; NatTable: TYPE ~ REF NatTableRep; NatTableRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF NatSequence ]; TripleSequence: TYPE ~ G2dBasic.TripleSequence; TripleSequenceRep: TYPE ~ G2dBasic.TripleSequenceRep; QuadSequence: TYPE ~ REF QuadSequenceRep; QuadSequenceRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF Quad ]; SegmentSequence: TYPE ~ REF SegmentSequenceRep; SegmentSequenceRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF Segment ]; SurfaceSequence: TYPE ~ REF SurfaceSequenceRep; SurfaceSequenceRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF Surface ]; RefSequence: TYPE ~ REF RefSequenceRep; RefSequenceRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF REF ]; <> origin: Triple ~ [0.0, 0.0, 0.0]; xAxis: Triple ~ G2dBasic.xAxis; yAxis: Triple ~ G2dBasic.yAxis; zAxis: Triple ~ G2dBasic.zAxis; PI: REAL ~ G2dBasic.PI; <> <> <> TripleSequenceFromList: PROC [LIST OF Triple] RETURNS [TripleSequence]; <> <> CopyBoolSequence: PROC [bools: BoolSequence] RETURNS [BoolSequence]; <> <<>> CopyNatTable: PROC [nats: NatTable] RETURNS [NatTable]; <> <<>> CopyTripleSequence: PROC [triples: TripleSequence] RETURNS [TripleSequence]; <> <<>> CopyQuadSequence: PROC [quads: QuadSequence] RETURNS [QuadSequence]; <> <<>> CopySegmentSequence: PROC [segments: SegmentSequence] RETURNS [SegmentSequence]; <> <<>> CopySurfaceSequence: PROC [surfaces: SurfaceSequence] RETURNS [SurfaceSequence]; <> <<>> CopyRefSequence: PROC [refs: RefSequence] RETURNS [RefSequence]; <> <> AddToBoolSequence: PROC [bools: BoolSequence, bool: BOOL] RETURNS [BoolSequence]; <> <<>> AddToNatTable: PROC [nats: NatTable, natSequence: NatSequence] RETURNS [NatTable]; <> <<>> AddToTripleSequence: PROC [triples: TripleSequence, triple: Triple] RETURNS [TripleSequence]; <> <<>> AddToQuadSequence: PROC [quads: QuadSequence, quad: Quad] RETURNS [QuadSequence]; <> <<>> AddToSegmentSequence: PROC [segments: SegmentSequence, segment: Segment] RETURNS [SegmentSequence]; <> <<>> AddToSurfaceSequence: PROC [surfaces: SurfaceSequence, surface: Surface] RETURNS [SurfaceSequence]; <> <<>> AddToRefSequence: PROC [refs: RefSequence, ref: REF] RETURNS [RefSequence]; <> <> LengthenBoolSequence: PROC [bools: BoolSequence, amount: REAL ¬ 1.3] RETURNS [BoolSequence]; <> LengthenNatTable: PROC [nats: NatTable, amount: REAL ¬ 1.3] RETURNS [NatTable]; <> <<>> LengthenTripleSequence: PROC [triples: TripleSequence, amount: REAL ¬ 1.3] RETURNS [TripleSequence]; <> <<>> LengthenQuadSequence: PROC [quads: QuadSequence, amount: REAL ¬ 1.3] RETURNS [QuadSequence]; <> <<>> LengthenSegmentSequence: PROC [segments: SegmentSequence, amount: REAL ¬ 1.3] RETURNS [SegmentSequence]; <> <<>> LengthenSurfaceSequence: PROC [surfaces: SurfaceSequence, amount: REAL ¬ 1.3] RETURNS [SurfaceSequence]; <> <<>> LengthenRefSequence: PROC [refs: RefSequence, amount: REAL ¬ 1.3] RETURNS [RefSequence]; <> END.