<<>> <> <> <> <> DIRECTORY CedarProcess, Controls, G2dBasic, G3dBasic, Rope; G3dPlot: CEDAR DEFINITIONS ~ BEGIN <> ROPE: TYPE ~ Rope.ROPE; Process: TYPE ~ CedarProcess.Process; Viewer: TYPE ~ Controls.Viewer; OuterData: TYPE ~ Controls.OuterData; Typescript: TYPE ~ Controls.Typescript; RealSequence: TYPE ~ G3dBasic.RealSequence; Pair: TYPE ~ G2dBasic.Pair; PairSequence: TYPE ~ G2dBasic.PairSequence; PairSequenceRep: TYPE ~ G2dBasic.PairSequenceRep; <> PrepareProc: TYPE ~ PROC [lx, hx, ly, hy: REAL, nx, ny: INT, clientData: REF ANY]; HeightProc: TYPE ~ PROC [x, y: REAL, clientData: REF ANY] RETURNS [REAL]; HeightField: TYPE ~ REF HeightFieldRep; HeightFieldRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF RealSequence ]; <> IntRange: TYPE ~ RECORD [ l, h: INT ]; RealRange: TYPE ~ RECORD [ l, h: REAL ]; Line: TYPE ~ RECORD [ left, right: Pair ]; LineSequence: TYPE ~ REF LineSequenceRep; LineSequenceRep: TYPE ~ RECORD [ length: CARDINAL ¬ 0, element: SEQUENCE maxLength: CARDINAL OF Line ]; HorizonType: TYPE ~ { upper, lower }; HorizonList: TYPE ~ REF HorizonListRep; HorizonListRep: TYPE ~ RECORD [ first, last: HorizonNode ¬ NIL, firstSaved, lastSaved: HorizonNode ¬ NIL, type: HorizonType ]; HorizonNode: TYPE ~ REF HorizonNodeRep; HorizonNodeRep: TYPE ~ RECORD [ x: REAL, ly, ry: REAL, rm, rb: REAL, -- line coefficient of span on right prev, next: HorizonNode ¬ NIL ]; HeightTool: TYPE ~ REF HeightToolRep; HeightToolRep: TYPE ~ RECORD [ <> drawX: BOOL ¬ TRUE, drawY: BOOL ¬ TRUE, hiddenLines: BOOL ¬ TRUE, <> nSamples: INT ¬ 100, -- total # of samples in 2d grid zScale: REAL ¬ 1.0, -- scale factor for sample height xRange: RealRange ¬ [-1.0, 1.0], -- x evaluation yRange: RealRange ¬ [-1.0, 1.0], -- y evaluation nXSamples: CARDINAL ¬ 15, -- resolution in x nYSamples: CARDINAL ¬ 15, -- resolution in y epsilon: REAL ¬ 0.99, -- x resolution discriminator yOffset: INT ¬ 0, -- moves plot in y clientData: REF ANY ¬ NIL, -- passed to heightProc heightProc: HeightProc ¬ NIL, -- callback proc to compute height prepareProc: PrepareProc ¬ NIL, -- callback proc to prep new plot heightField: HeightField ¬ NIL, -- heights to plot outer: Viewer ¬ NIL, -- parent LF viewer typescript: Typescript ¬ NIL, -- for user io graphics: Viewer ¬ NIL, -- graphical LF viewer drawProcess: Process ¬ NIL, -- forked drawing process outerData: OuterData ¬ NIL -- Control's data record ]; <> MakeHeightToolFromProc: PUBLIC PROC [ toolName: ROPE ¬ NIL, -- name of the tool heightProc: HeightProc ¬ NIL, -- callback proc to compute height prepareProc: PrepareProc ¬ NIL, -- callback proc to prepare for plotting clientData: REF ANY ¬ NIL]; -- clientData passed to heightProc <