<> <> <> DIRECTORY Controls, Controls3d, Imager, IO, Matrix3d, Rope, Spline3d, Vector3d; TubeDefs: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; Context: TYPE ~ Imager.Context; Mouse: TYPE ~ Controls.Mouse; ControlData: TYPE ~ Controls.ControlData; GraphicsData: TYPE ~ Controls.GraphicsData; OuterData: TYPE ~ Controls.OuterData; Triple: TYPE ~ Vector3d.Triple; Coeffs: TYPE ~ Spline3d.Coeffs; Matrix: TYPE ~ Matrix3d.Matrix; MatrixRep: TYPE ~ Matrix3d.MatrixRep; MatrixSeq: TYPE ~ Matrix3d.MatrixSequence; MatrixSeqRep: TYPE ~ Matrix3d.MatrixSequenceRep; Pair: TYPE ~ Matrix3d.Pair; PairSequence: TYPE ~ REF PairSequenceRec; PairSequenceRec: TYPE ~ RECORD [element: SEQUENCE length: NAT OF Pair]; DetailType: TYPE ~ {on, auto, label, pick, skel, spline, circles, lines, frames, normals, curv, vel, acc}; Details: TYPE ~ REF DetailsRec; DetailsRec: TYPE ~ RECORD [ auto: BOOL _ TRUE, -- kill details if mouse held label: BOOL _ TRUE, -- label iff label a vector skel: BOOL _ FALSE, -- draw straight line skeleton pick: BOOL _ TRUE, -- draw spline axis, draw picked point on: BOOL _ TRUE, -- true if any details true shape: BOOL _ TRUE, -- true if any details 'cept spline true spline: BOOL _ TRUE, -- details frames, lines, circles: BOOL _ FALSE, -- details curv, vel, acc, normals: BOOL _ FALSE -- details ]; Frame: TYPE ~ RECORD [t: REAL, m: Matrix]; FrameSeq: TYPE ~ REF FrameSeqRep; FrameSeqRep: TYPE ~ RECORD [element: SEQUENCE maxLength: NAT OF Frame]; Tube: TYPE ~ REF TubeRec; TubeRec: TYPE ~ RECORD [ p0, p1, v0, v1: Triple _ [0.0, 0.0, 0.0], -- Hermite representation of curve twist0, twist1: REAL _ 0.0, r0, r1: REAL _ 0.05, selected: BOOL _ FALSE, c: Coeffs _ NIL, -- coefficients of curve xc: Coeffs _ NIL, -- curve xformed to screen refVec: Triple _ [0.0, 0.0, 0.0], -- reference vector to make frames axialRes: NAT _ 0, circleRes: NAT _ 6, frames: FrameSeq _ NIL, -- reference frames prev, next: Tube _ NIL, nBranches: NAT _ 0, branches: TubeSequence _ NIL, refAny: REF ANY _ NIL ]; TubeSequence: TYPE ~ REF TubeSequenceRec; TubeSequenceRec: TYPE ~ RECORD [element: SEQUENCE maxLength: NAT OF Tube]; Pick: TYPE ~ REF PickRec; PickRec: TYPE ~ RECORD [ origPos: Triple _ [0.0, 0.0, 0.0], pos, tan: Triple _ [0.0, 0.0, 0.0], t: REAL _ 1.0, tube: Tube _ NIL, tubePt0, tubePt1: Tube _ NIL, tubePick0, tubePick1: Tube _ NIL, dividePending: BOOL _ FALSE ]; END. .. Triad: TYPE ~ ARRAY {v, n, b} OF Triple; <> <<(see Computation Geometry for Design and Manufacture by Faux and Pratt).>>