DIRECTORY CADTypes USING [Scad, VariableRec, VisibleMask], Rope USING [ROPE], Geometry3dVector USING [Triple]; SurfaceViewer: CEDAR DEFINITIONS ~ BEGIN Error: ERROR[why: ATOM]; CreateSurfaceViewer: PROC[]; LoadSurface: PROC[surface: CADTypes.Scad] RETURNS[id: NAT]; MaskSurface: PROC[id: NAT, mask: REF CADTypes.VisibleMask]; HideSurface: PROC[id: NAT]; UnHideSurface: PROC[id: NAT]; DeleteSurface: PROC[id: NAT]; FlushSurfaces: PROC[]; ChangePosition: PROC[newPosition: Geometry3dVector.Triple]; ChangeOrientation: PROC[newForward, newUp: Geometry3dVector.Triple]; ChangeScope: PROC[newScope: REAL]; DrawFrame: PROC []; InvokeRayTracer: PROC[variables: CADTypes.VariableRec, filename: Rope.ROPE, pixelsU, pixelsV: NAT]; END. –SurfaceViewer.mesa James Rauen, August 20, 1986 6:00:37 pm PDT Last edited by: James Rauen January 13, 1988 4:15:12 pm PST Raised when something goes wrong. Possibilities are $AllFilledUp (tried to load too many surfaces), or $InvalidID (referred to a surface that doesn't exist). Opens a color viewer and instantiates the 3D context. Position, orientation, and scope will default. Draws a frame. Loads a surface into the SurfaceViewer context and draws a new frame. Returns an ID number for the surface, which is used to refer to the surface after it has been added. If there is no more room, raises Error[$AllFilledUp]. Masks cells in the surface indicated by id. The mask specifies which cells in the CAD should be displayed and which shouldn't. If id does not refer to a surface, raises Error[$InvalidID]. Hides the surface indicated by id and draws a new frame. If id does not refer to a surface, raises Error[$InvalidID]. Unhides the surface indicated by id and draws a new frame. If id does not refer to a surface, raises Error[$InvalidID]. Removes a surface from the SurfaceViewer context and draws a new frame. If id does not refer to a surface, raises Error[$InvalidID]. Removes all surfaces from the SurfaceViewer context and draws a new (blank) frame. Changes the observer's position to newPosition. Does not draw a new frame. Changes the observer's orientation. Does not draw a new frame. Changes the observer's scope to newScore, whatever that means. Does not draw a new frame. Draws a new frame. Calls SurfaceTracer to generate a ray-traced image of the current view in the SurfaceViewer context. The image is written as three AIS files. ΚΤ˜™>Icode™;—J˜šΟk ˜ Kšœ œ"˜0Kšœœœ˜Kšœœ ˜ K˜—K˜šΠln œœ œ˜(K˜šΟnœœœ˜Kšœž™ž—K˜šŸœœ˜K™uK™—šŸ œœœœ˜;K™γK™—šŸ œœœœ˜;Kšœ½™½K™—šŸ œœœ˜Kšœv™vK™—šŸ œœœ˜Kšœx™xK™—šŸ œœœ˜Kšœ…™…K™—šŸ œœ˜K™RK™—šŸœœ'˜;K™KK™—šŸœœ-˜DK™?K™—šŸ œœ œ˜"K™Z——˜šŸ œœ˜K™K™—šŸœœ1œœ˜cKšœŽ™ŽK˜K˜——Kšœ˜—…—ΰ J