DIRECTORY G3dBasic, G3dBox, G3dNats, G3dShape, G3dPlane; G3dClipVolume: CEDAR DEFINITIONS ~ BEGIN Box: TYPE ~ G3dBox.Box; Plane: TYPE ~ G3dPlane.Plane; PlaneSequence: TYPE ~ G3dPlane.PlaneSequence; Ray: TYPE ~ G3dPlane.Ray; Shape: TYPE ~ G3dShape.Shape; Triple: TYPE ~ G3dBasic.Triple; ClipVolume: TYPE ~ REF ClipVolumeRep; ClipVolumeRep: TYPE ~ RECORD [ planes: PlaneSequence ¬ NIL, -- inward-pointing planes of the volume box: Box ¬ [] -- bounding box of the volume ]; TripleList: TYPE ~ LIST OF Triple; ClipVolumeFrom4Points: PROC [p0, p1, p2, p3: Triple] RETURNS [ClipVolume]; ShapeInVolume: PROC [shape: Shape, clipVolume: ClipVolume] RETURNS [BOOL]; PolygonInVolume: PROC [pts: TripleList, clipVolume: ClipVolume] RETURNS [BOOL]; NegatePlane: PROC [plane: Plane] RETURNS [Plane]; TripleListFromSurface: PROC [shape: Shape, surfID: INT] RETURNS [TripleList]; ClipToPlane: PROC [vList: TripleList, plane: Plane] RETURNS [TripleList]; END.  G3dClipVolume.mesa Copyright Σ 1984, 1992 by Xerox Corporation. All rights reserved. Glassner, February 18, 1991 9:27 pm PST Jules Bloomenthal August 26, 1992 3:12 pm PDT Basic Types Local Types Note: This interface is designed to clip convex polygons against convex clipping volumes. Clip Volume Construction Build a tetrahedral clipping volume from the four points. Shape and Polygon Testing Returns TRUE if any surface in the shape is within the ClipVolume Returns TRUE if the polygon represented by pts is within the ClipVolume Utility Return the plane with opposite normal and adjusted offset Return the TripleList describing this surface Volume Clipping The basic routine in this interface: return the TripleList resulting by clipping the input TripleList against the plane. Κψ•NewlineDelimiter –"cedarcode" style™šœ™Jšœ Οeœ5™AJšœ'™'J™-J˜—šΟk œ/˜8J˜—JšΡbln œžœž ˜ Jšœž˜headšΟl ™ Jšœ žœ˜Jšœ žœ˜"Jšœžœ˜/Jšœ žœ˜Jšœ žœ˜!Jšœ žœ˜#—š  ™ J™[J˜Jšœžœžœ˜)šœžœžœ˜!JšœžœΟc'˜IJšœ‘˜5J˜J˜—Jšœžœžœžœ˜&—š ™šΟnœžœžœ˜JJ™;——š ™š’ œžœ(žœžœ˜JJ™AJ™—š’œžœ+žœžœ˜OJ™G——š ™š’ œžœžœ ˜1J™9J™—š’œžœžœžœ˜MJ™-——š ™š’ œžœ#žœ˜IJ™x—J˜—Jšžœ˜J˜—…—θό