DIRECTORY Commander, Controls, CtBasic, CtMisc, Draw2d, G3dBasic, G3dControl, G3dMatrix, G3dTool, Imager, Rope, ImplicitDefs; ImplicitSlice: CEDAR DEFINITIONS ~ BEGIN CommandProc: TYPE ~ Commander.CommandProc; ButtonList: TYPE ~ Controls.ButtonList; ControlList: TYPE ~ Controls.ControlList; Typescript: TYPE ~ Controls.Typescript; Viewer: TYPE ~ Controls.Viewer; Box: TYPE ~ CtBasic.Box; SampleMaps: TYPE ~ CtBasic.SampleMaps; DrawProc: TYPE ~ Draw2d.DrawProc; Triple: TYPE ~ G3dBasic.Triple; Slice: TYPE ~ G3dControl.Slice; Matrix: TYPE ~ G3dMatrix.Matrix; RenderTool: TYPE ~ G3dTool.Tool; Context: TYPE ~ Imager.Context; VEC: TYPE ~ Imager.VEC; DiagramProc: TYPE ~ ImplicitDefs.DiagramProc; ValueProc: TYPE ~ ImplicitDefs.ValueProc; ROPE: TYPE ~ Rope.ROPE; Function: TYPE ~ RECORD [ name: ROPE ¬ NIL, valueProc: ValueProc ¬ NIL, diagramProc: DiagramProc ¬ NIL]; Pix: TYPE ~ REF PixRep; PixRep: TYPE ~ RECORD [ name: ROPE ¬ NIL, valueProc: ValueProc ¬ NIL, diagramProc: DiagramProc ¬ NIL, start: VEC, context: Context ¬ NIL, maps: SampleMaps, box: Box ]; PixSequence: TYPE ~ RECORD [element: SEQUENCE length: CARDINAL OF Pix]; Mode: TYPE ~ {slice, sprite}; Tool: TYPE ~ REF ToolRep; ToolRep: TYPE ~ RECORD [ renderTool: RenderTool ¬ NIL, typescript: Typescript ¬ NIL, mode: Mode ¬ slice, slice: Slice ¬ NIL, -- the slice to compute moveSlice: REAL ¬ -0.03, -- amount to move each slice showSlice: BOOL ¬ TRUE, xSize, ySize: NAT ¬ 80, -- size of slice in pixels worldToLf: Matrix ¬ NIL, lfToWorld: Matrix ¬ NIL, cdContext: Context, -- color display Imager context cdMaps: SampleMaps, -- color display sample maps pixes: REF PixSequence ¬ NIL, pixPicked: Pix ¬ NIL, point: Triple ¬ [], value: REAL ¬ 0.0, valueViewer: Viewer ¬ NIL, stop: BOOL ¬ FALSE, -- abort drawing or exploring stopReason: ROPE ¬ NIL, -- reason for stopping clientDraw: DrawProc ¬ NIL, clientData: REF ANY ¬ NIL -- client data ]; MakeTool: PROC [ toolName: ROPE, -- name of the tool functions: LIST OF Function ¬ NIL, -- the functions, their names, etc. to shade clientDraw: DrawProc ¬ NIL, -- client supplied proc to draw the model clientData: REF ANY ¬ NIL, -- client supplied data passed to valueProcs extraControls: ControlList ¬ NIL, -- in addition to the standard set extraButtons: ButtonList ¬ NIL] -- in addition to the standard set RETURNS [Tool]; Repaint: PROC [tool: Tool, whatChanged: REF ANY ¬ NIL]; Register: PROC [ name: ROPE, -- name of option command: CommandProc, -- proc to be called doc: ROPE]; -- documentation of option ToolOptions: PROC RETURNS [toolOptions: ROPE]; ExecuteOption: CommandProc; END. D ImplicitSlice.mesa Copyright Σ 1985, 1990 by Xerox Corporation. All rights reserved. Bloomenthal, August 11, 1992 4:07 pm PDT Imported Types Local Types watchData: WatchData, Old: ToolRep: TYPE ~ RECORD [ Book-keeping: name: ROPE ¬ NIL, -- name of the tool directory: ROPE ¬ NIL, -- commander's directory Controls: controls: ControlList ¬ NIL, -- sliders and dials buttons: ButtonList ¬ NIL, -- menu camera: Camera ¬ NIL, -- viewing control slice: Slice ¬ NIL, -- the slice to compute Viewing/Drawing: outer: Viewer ¬ NIL, -- parent viewer outerData: OuterData ¬ NIL, -- associated data typescript: Typescript ¬ NIL, -- for user io graphics: Viewer ¬ NIL, -- graphics viewer clientDraw: DrawProc ¬ NIL, -- client supplied drawProc watchData: WatchData, showSlice: BOOL ¬ TRUE, Transforms: worldToLf: Matrix ¬ NIL, lfToWorld: Matrix ¬ NIL, Shade2d: xSize, ySize: NAT ¬ 80, cdContext: Context, -- color display Imager context cdMaps: SampleMaps, -- color display sample maps pixes: REF PixSequence ¬ NIL, pixPicked: Pix ¬ NIL, value: REAL ¬ 0.0, move: REAL ¬ -0.03, State: stop: BOOL ¬ FALSE, -- abort drawing or exploring stopReason: ROPE ¬ NIL, -- stopReason for stopping Geometry: point: Triple, Data: clientData: REF ANY ¬ NIL -- client data ]; Implicit Test Tool Return a tool for shading a two-dimensional slice of an implicit function. The standard set of controls include: x, y, z global rotations, viewing scale, viewing field of view, The standard set of buttons include: measure mode distance mode implicit tolerance implicit threshold implicit spread move start stop. Repaint the graphics viewer associated with the tool. Registration and Dispatching Register a command proc with Implicit Slice; subsequently, it may be invoked from the commander by "ImplicitSlice " Return a rope listing the registered ImplicitSlice options. Execute the named option; may return [$Failure, "No such option."]. Κο•NewlineDelimiter ™™JšœB™BJ™(J˜JšΟk œu˜~J˜—šΠbl œœ ˜ J˜—Jšœ˜headšΟl™Jšœ œ˜+Jšœœ˜*Jšœœ˜,Jšœœ˜*Jšœ œ˜#Jšœœ˜Jšœ œ˜(Jšœ œ˜$Jšœ œ˜"Jšœ œ˜#Jšœ œ˜$Jšœ œ˜"Jšœ œ˜#Jšœœ œ˜Jšœœ˜/Jšœ œ˜,Jšœœœ˜—šŸ ™ šœ œœ˜Jšœ œœ˜Jšœœ˜Jšœ œ˜%J˜—Jšœ œœ˜šœ œœ˜Jšœ œœ˜Jšœœ˜Jšœœ˜#Jšœ œ˜Jšœœ˜J˜J˜J˜J˜—š œœœ œ œœ˜IJ˜—šœ œ˜!J˜—Jšœœœ ˜šœ œœ˜Jšœœ˜!Jšœœ˜!J˜JšœœΟc˜7Jšœœ ˜>Jšœœœ˜Jšœœ  ˜Jšœ ˜;Jšœ œœ˜#Jšœœ˜J˜Jšœ œ˜Jšœœ˜Jšœ œœ ˜J™Jšœœœ™—™ Jšœœ™Jšœœ™—™Jšœœ™Jšœ ™=Jšœ ™:Jšœ œœ™"Jšœœ™Jšœ œ™Jšœ œ ™—™Jšœ œœ ™;Jšœœœ ™<—™ J™—™Jšœœœœ ™0—J™———šŸ™šΟnœœ˜Jšœ œ  ˜,Jšœ œœ œ ,˜RJšœœ )˜JJšœ œœœ ,˜LJšœœ "˜HJšœœ "˜FJšœ˜J˜™JJ™—™%J™J™J™J™—™$J™ J™ J™J™J™J™J™J™J™——š ‘œœœœœ˜7J™5——šŸ™š‘œœ˜Jšœœ ˜"Jšœ ˜*Jšœœ ˜*J™,J™LJ™—š‘ œœœœ˜.J™;J˜—š‘ œ˜J™C——J™Jšœ˜—…— `“