DIRECTORY G3dBasic, G3dModel, G3dPlane, G3dPolygon; G3dNavigate: CEDAR DEFINITIONS ~ BEGIN Spot: TYPE ~ RECORD [point: Triple, pair: Pair, polygon: Polygon]; Intersection: TYPE ~ RECORD [disjoint: BOOL ¬ TRUE, pt: Pair]; Seg: TYPE ~ RECORD [p0, p1: Pair, line: Triple ¬ [0, 0, 0]]; Border: TYPE ~ G3dBasic.Border; NatPair: TYPE ~ G3dBasic.NatPair; NatSequence: TYPE ~ G3dBasic.NatSequence; SurfaceSequence: TYPE ~ G3dBasic.SurfaceSequence; Pair: TYPE ~ G3dBasic.Pair; PairSequence: TYPE ~ G3dBasic.PairSequence; PairSequenceRep: TYPE ~ G3dBasic.PairSequenceRep; Quad: TYPE ~ G3dBasic.Quad; Triple: TYPE ~ G3dBasic.Triple; TripleSequence: TYPE ~ G3dBasic.TripleSequence; TripleSequenceRep: TYPE ~ G3dBasic.TripleSequenceRep; Model: TYPE ~ G3dModel.Model; MajorPlane: TYPE ~ G3dPlane.MajorPlane; Polygon: TYPE ~ G3dPolygon.Polygon; Error: SIGNAL [reason: ATOM]; PointFromPair: PROC [pair: Pair, poly: Polygon] RETURNS [Triple]; PairOn2dLine: PROC [pair: Pair, line: Triple] RETURNS [Border]; Intersect: PROC [s0, s1: Seg] RETURNS [Intersection]; MoveSpot: PROC [old: Spot, direction: Triple, distance: REAL] RETURNS [Spot]; IntersectNextPoly: PROC [in, out: Spot] RETURNS [next: Spot]; MoveOnPolygon: PROC [old: Spot, direction: Triple, distance: REAL] RETURNS [Spot]; MoveToPolygonEdge: PROC [old: Spot, direction: Triple] RETURNS [Spot]; END. ’ G3dNavigate.mesa Copyright Σ 1988, 1992 by Xerox Corporation. All rights reserved. Bloomenthal, July 15, 1992 4:04 pm PDT Local Types Imported Types Errors Navigating along a Polygonal Surface Return a 3d point with two elements from pair and the other such that the point is on poly.plane; pair is presumed in poly.majorPlane. poly.plane's normal is presumed unit length. Return the status of the pair relative to the 2d line. Return the intersection of the two segments; if a segment's line equations is [0, 0, 0], then it is computed. Return old moved by distance in direction. Return spot on edge of next polygon; next.poly is the new polygon. in is inside and out outside of the current polygon. Move distance along spot.poly starting from spot.pt towards direction. ! Error[$EndOfModel]. Move from spot.pt towards direction until encountering edge of spot.poly. ! Error[$NilProjectionVector]. ΚV•NewlineDelimiter –"cedarcode" style™™Jšœ Οeœ6™BJ™&J˜JšΟk œ*˜3J˜—JšΠbl œžœž ˜Jšœž˜headšΟl ™ Jšœžœžœ/˜FJš œžœžœ žœžœ ˜@Jšœžœžœ*˜@—š ™Jšœžœ˜"Jšœ žœ˜$Jšœ žœ˜+Jšœžœ˜4Jšœžœ˜Jšœžœ˜,Jšœžœ˜1Jšœžœ˜Jšœžœ˜"Jšœžœ˜0Jšœžœ˜5Jšœ žœ˜ Jšœ žœ˜)Jšœ žœ˜&—š ™JšΟnœžœ žœ˜—š $™$š‘ œžœžœ ˜AJ™EJ™@J™,J™—š‘ œžœžœ ˜?J™6J™—š‘ œžœžœ˜5J™,J™@J™—š‘œžœ*žœžœ˜MJ™*J™—š‘œžœžœ˜=J™BJ™4J™—š‘ œžœ*žœžœ˜RJ™FJ™J™—š‘œžœžœ˜FJ™IJ™—J˜—Jšžœ˜J˜J˜—…—n V