DIRECTORY BitMap3d, CastRays, Containers, CoordSys, CSG, CSGGraphics, DisplayList3d, Graphics, Matrix3d, Menus, Rope, SV2d, SVViewerTool, ViewerClasses; SVViewerUser: CEDAR DEFINITIONS = BEGIN Camera: TYPE = CSGGraphics.Camera; CoordSystem: TYPE = CoordSys.CoordSystem; CSGTree: TYPE = CSG.CSGTree; MouseButton: TYPE = Menus.MouseButton; Point2d: TYPE = SV2d.Point2d; Point3d: TYPE = Matrix3d.Point3d; Scene: TYPE = DisplayList3d.Scene; Viewer: TYPE = ViewerClasses.Viewer; ViewerToolData: TYPE = SVViewerTool.ViewerToolData; ViewerPictureData: TYPE = REF ViewerPictureDataObj; ViewerPictureDataObj: TYPE = RECORD [ proc: PROC [dc: Graphics.Context], scene: Scene,-- the collection of 3d objects we are looking at tree: CSGTree,-- for efficiency we will occasional cache the (viewpoint dependent) ray tracing tree camera: Camera,-- our point of view sceneStyleIndex: NAT,-- corresponds to camera.style baseCS: CoordSystem,-- **** mode: InteractionMode, showCoordSys: BOOL, doubleBuffer: BOOL, altDC: BitMap3d.AlternateDisplayContext, viewerToolData: ViewerToolData-- a back pointer ]; InteractionMode: TYPE = {select, cast}; DCProc: TYPE = PROC [Graphics.Context]; UpdateHeader: PROC [pictureFile: Rope.ROPE, viewerToolData: ViewerToolData]; UpdateAllHeaders: PROC [pictureFile: Rope.ROPE, viewerToolData: ViewerToolData]; NotifyOfSplit: PROC [viewer: Viewer]; UnSplit: PROC [viewerToolData: ViewerToolData]; DrawOneCSInViewer: PROC [viewerToolData: ViewerToolData, cs: CoordSystem]; ReadTwoReals: PROC [textViewer: Viewer] RETURNS [x, y: REAL]; DrawSceneEtc: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData]; DrawAllCS: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData]; DrawOneCS: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData, cs: CoordSystem]; Painter: PROC [proc: DCProc, viewerToolData: ViewerToolData _ NIL]; DrawSceneInternal: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; -- like DrawScene but erases the screen before drawing. DrawScene: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; EraseAndDrawSceneEtc: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData]; PlaceOrigin: PROC [viewer: Viewer]; ResizeBitMap: PROC [viewer: Viewer]; Reset: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmReset: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Save: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmSave: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Get: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmGet: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Store: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmStore: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Split: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Erase: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Empty: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmEmpty: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; RayCast: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConfirmRayCast: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; RayCastProgress: CastRays.NotifyOfProgressProc; Stop: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ARay: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Press: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; PressAIS: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; PressBWAIS: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawBoundBoxes: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; SceneNewVersion: PROC [viewerToolData: ViewerToolData];-- called internally NewVersion: PROC [viewer: Viewer];-- called by SVEditUserImplA SceneOldVersion: PROC [viewerToolData: ViewerToolData];-- called internally OldVersion: PUBLIC PROC [viewer: Viewer];-- called by SVEditUserImplA DrawCoordSystems: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawPt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawColor: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawBlackAndWhite: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; CrossHairs: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawDither: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Dither: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Extend: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Move: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; SetFocalLength: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; MakeBands: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AISPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; StylePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; XYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; FocalLengthPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; TextPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DoubleBuffer: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ShowCoordsMode: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; BandsDevice: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Selected: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Deselected: PROC [viewerToolData: ViewerToolData]; SingleRay: PROC [viewerToolData: ViewerToolData, cameraPoint: Point2d]; PointAt: PROC [viewerToolData: ViewerToolData, cameraPoint: Point2d]; END. ψFile: SVViewerUser.mesa Last edited by Bier on August 18, 1983 4:04 pm Author: Eric Bier in October, 1982 (?) Contents: Code to respond to button presses made in an SVViewer IMPORTED TYPES LOCAL TYPES INTERWINDOW COMMUNICATION in SVViewerUserImplA INTERMODULE COMMUNICATION may also draw coordinate systems, drawing planes, etc depending on the current selected modes. MENU PROCS in SVViewerUserImplA in SVViewerUserImplB.mesa PROMPTS ON/OFF SWITCHES OPTIONS LISTERS UTILITIES Input Notify Procs Κ D– "cedar" style˜Iheadšœ™Iprocšœ.™.Lšœ&™&Lšœ?™?L˜šΟk ˜ Lšœ ˜ Lšœ ˜ Lšœ ˜ Lšœ ˜ Lšœ˜Lšœ ˜ Lšœ˜Lšœ ˜ Lšœ ˜ Lšœ˜Lšœ˜Lšœ˜Lšœ ˜ Lšœ˜—L˜Lšœœ˜!Lš˜˜šœ™Lšœœ˜"Lšœ œ˜)Lšœ œœ ˜Lšœ œ˜&Lšœ œ˜Lšœ œ˜!Lšœœ˜"Lšœœ˜$Lšœœ˜3L˜—šœ ™ Lšœœœ˜3šœœœ˜%Lšœœ˜"Lšœ?˜?Lšœc˜cLšœ#˜#Lšœœ˜3Lšœ˜Lšœ˜Lšœœ˜Lšœœ˜Lšœ(˜(Lšœ/˜/Lšœ˜—L˜Lšœœ˜'—˜LšΟnœœœ˜'—L˜Lšœ™˜Lšœ™L˜Lšž œœœ"˜LLšžœœœ"˜PLšž œœ˜%Lšžœœ"˜/Lšžœœ3˜J—L˜Lšœ™˜Lšž œœœœ˜=Lšž œœ8˜JLšœ^™^Lšž œœ8˜GLšž œœI˜XL˜Lšžœœ1œ˜CL˜—šœ ™ L˜Lšžœœ œœœœ,œ:˜§Lšž œœ œœœœ,œ˜gLšžœœ8˜RLšž œœ˜#Lšž œœ˜$L˜Lšœ™L˜L˜Lš žœ œœœœ,œ˜cLšž œœ œœœœ,œ˜jLšžœœ œœœœ,œ˜bLšž œœ œœœœ,œ˜iLšžœœ œœœœ,œ˜aLšž œœ œœœœ,œ˜hLšžœœ œœœœ,œ˜cLšž œœ œœœœ,œ˜jLšžœœ œœœœ,œ˜cL˜Lšžœœ œœœœ,œ˜cLšžœœ œœœœ,œ˜cLšž œœ œœœœ,œ˜jLšžœœ œœœœ,œ˜eLšžœœ œœœœ,œ˜lLšœ/˜/Lšžœœ œœœœ,œ˜bLšžœœ œœœœ,œ˜bL˜Lšœ™L˜Lšžœœ œœœœ,œ˜cLšžœœ œœœœ,œ˜fLšž œœ œœœœ,œ˜hL˜Lšžœœ œœœœ,œ˜lLšžœœ6˜KLšž œœ.˜>Lšžœœ6˜KLšž œœœ.˜ELšžœœ œœœœ,œ˜nLšžœœ œœœœ,œ˜dLšž œœ œœœœ,œ˜gLšžœœ œœœœ,œ˜oLšž œœ œœœœ,œ˜hLšž œœ œœœœ,œ˜hLšžœœ œœœœ,œ˜dLšžœœ œœœœ,œ˜dLšžœœ œœœœ,œ˜bLšžœœ œœœœ,œ˜lLšž œœ œœœœ,œ˜g—L˜L˜Lšœ™˜Lšž œœ œœœœ,œ˜gLšž œœ œœœœ,œ˜iLšž œœ œœœœ,œ˜gLšžœœ œœœœ,œ˜oLšž œœ œœœœ,œ˜h—L˜Lšœ™˜Lšž œœ œœœœ,œ˜jLšžœœ œœœœ,œ˜l—L˜Lšœ™˜Lšž œœ œœœœ,œ˜i—L˜Lšœ ™ ˜Lšžœœ œœœœ,œ˜fLšž œœ"˜2—L˜Lšœ™˜Lšž œœ8˜GLšžœœ8˜E——L˜Lšœ˜L˜L˜L˜—…—b&ž