<> <> <> DIRECTORY Contours, Controls, Controls3d, Draw2d, Imager, IO, Matrix3d, Render3d, Rope, Spline3d, ThreeDBasics, Vector3d; TubeDefs: CEDAR DEFINITIONS ~ BEGIN <> <> <> Tube: TYPE ~ REF TubeRep; TubeRep: TYPE ~ RECORD [ <> p0, p1: Triple _ origin, -- Hermite endpoints of curve v0, v1: Triple _ origin, -- Hermite tangents of curve tw0, tw1: REAL _ 0.0, -- twists tens0, tens1: REAL _ 1.0, -- tensions r0, r1: REAL _ 0.05, -- radii contours: ContourSequence _ NIL, -- optional contours <> coeffs: Coeffs _ NIL, -- coefficients of curve xCoeffs: Coeffs _ NIL, -- curve xformed to screen refVec: Triple _ origin, -- reference vector to make frames circleRes: INTEGER _ 6, -- # sides of circular contour length: REAL _ 0.0, -- length of the tube length0, length1: REAL _ 0.0, -- distances from root frames: FrameSequence _ NIL, -- reference frames, ordered by t <> prev, next: Tube _ NIL, -- parent and continuing tubes branches: TubeSequence _ NIL, -- branch (non-continuing) tubes <> near3d: Near3d _ [origin, 0.0, 0.0], -- relative to a previous query <> name: ROPE _ NIL, -- optional name of tube refAny: REF ANY _ NIL, -- for client data selected: BOOL _ FALSE -- selected for drawing? ]; TubeSequence: TYPE ~ REF TubeSequenceRep; TubeSequenceRep: TYPE ~ RECORD [ length: NAT _ 0, element: SEQUENCE maxLength: NAT OF Tube ]; Pendings: TYPE ~ REF PendingsRep; PendingsRep: TYPE ~ RECORD [ epsilon: BOOL _ FALSE, scale: BOOL _ FALSE, r: BOOL _ FALSE, tens: BOOL _ FALSE, tw0: BOOL _ FALSE, tw1: BOOL _ FALSE, cres: BOOL _ FALSE, holdPosition: BOOL _ FALSE, holdTangent: BOOL _ FALSE, shape: BOOL _ FALSE, skin: BOOL _ FALSE ]; DetailType: TYPE ~ {autoSimplify, label, skeleton, spline, ends, pick, enabled, frames, lines, curvature, velocity, acceleration, contours, normals, shape, skin}; Details: TYPE ~ REF DetailsRep; DetailsRep: TYPE ~ RECORD [ autoSimplify: BOOL _ FALSE, -- kill details if mouse held label: BOOL _ TRUE, -- label vectors skeleton: BOOL _ FALSE, -- draw straight line skeleton spline: BOOL _ TRUE, -- draw spline axis ends: BOOL _ TRUE, -- draw spline ends pick: BOOL _ TRUE, -- draw picked point enabled: BOOL _ TRUE, -- enable viewing of details frames: BOOL _ FALSE, -- reference frames lines: BOOL _ FALSE, -- longitudinal lines curvature: BOOL _ FALSE, -- curvature velocity: BOOL _ FALSE, -- velocity acceleration: BOOL _ FALSE, -- acceleration contours: BOOL _ FALSE, -- contours (default to circles) normals: BOOL _ FALSE, -- normals shape: BOOL _ FALSE, -- frames or curv or vel or acc skin: BOOL _ FALSE -- contours or normals: ]; Pick: TYPE ~ REF PickRep; PickRep: 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, selected0, selected1: Tube _ NIL, dividePending: BOOL _ FALSE ]; <> TubeProc: TYPE ~ PROC [tube: Tube] RETURNS [continue: BOOL _ TRUE]; << Procedure for operating on each tube section.>> <<>> FrameProc: TYPE ~ PROC [position, velocity: Triple, t: REAL] RETURNS [Frame]; << Return a frame given the position and velocity>> << of the curve at parametric position t.>> <<>> PointProc: TYPE ~ PROC [id: INTEGER, position, normal: Triple, u, v: REAL] RETURNS [continue: BOOL _ TRUE]; << Procedure for operating on the given point.>> PolyProc: TYPE ~ PROC [id, p0, p1, p2: INTEGER] RETURNS [continue: BOOL _ TRUE]; << Procedure for operating on the given triangle.>> <> Near2d: TYPE ~ Spline3d.Near2d; Near3d: TYPE ~ Spline3d.Near3d; Hull: TYPE ~ RECORD [center, pMin, pMax: Triple, rMin, rMax: REAL]; Triad: TYPE ~ RECORD [v, n, b: Triple]; -- vector, principal normal, binormal << see Computational Geometry for Design and Manufacture>> <<>> RadiusMode: TYPE ~ {linear, square}; Contour: TYPE ~ Contours.Contour; ContourSequence: TYPE ~ Contours.ContourSequence; -- presumed ordered according to t Frame: TYPE ~ REF FrameRep; FrameRep: TYPE ~ RECORD [ t: REAL _ 0.0, -- parametric position on curve position: Triple _ origin, -- position on curve triad: Triad _ [origin,origin,origin], -- triad with no scale or twist scale: REAL _ 1.0, -- scale twist: REAL _ 0.0, -- twist matrix: Matrix _ NIL, -- matrix including scale, twist contour: Contour _ NIL, -- normalized to unit square normals: PairSequence _ NIL -- normals of contour ]; FrameSequence: TYPE ~ REF FrameSequenceRep; FrameSequenceRep: TYPE ~ RECORD [ length: NAT _ 0, element: SEQUENCE maxLength: NAT OF Frame ]; <> ROPE: TYPE ~ Rope.ROPE; STREAM: TYPE ~ IO.STREAM; Context: TYPE ~ Imager.Context; MarkType: TYPE ~ Draw2d.MarkType; Viewer: TYPE ~ Controls.Viewer; Control: TYPE ~ Controls.Control; GraphicsData: TYPE ~ Controls.GraphicsData; OuterData: TYPE ~ Controls.OuterData; Mouse: TYPE ~ Controls.Mouse; ClickProc: TYPE ~ Controls.ClickProc; ControlList: TYPE ~ Controls.ControlList; ButtonList: TYPE ~ Controls.ButtonList; Camera: TYPE ~ Controls3d.Camera; Hold: TYPE ~ Controls3d.Hold; RenderStyle: TYPE ~ Render3d.RenderStyle; Context3d: TYPE ~ REF ThreeDBasics.Context; RealSequence: TYPE ~ Vector3d.RealSequence; Pair: TYPE ~ Vector3d.Pair; PairSequence: TYPE ~ Vector3d.PairSequence; PairSequenceRep: TYPE ~ Vector3d.PairSequenceRep; Triple: TYPE ~ Vector3d.Triple; TripleSequence: TYPE ~ Vector3d.TripleSequence; TripleSequenceRep: TYPE ~ Vector3d.TripleSequenceRep; Bezier: TYPE ~ Spline3d.Bezier; Coeffs: TYPE ~ Spline3d.Coeffs; CoeffsRep: TYPE ~ Spline3d.CoeffsRep; CoeffsSequence: TYPE ~ Spline3d.CoeffsSequence; Matrix: TYPE ~ Matrix3d.Matrix; MatrixRep: TYPE ~ Matrix3d.MatrixRep; MatrixSequence: TYPE ~ Matrix3d.MatrixSequence; MatrixSequenceRep: TYPE ~ Matrix3d.MatrixSequenceRep; <> origin: Triple ~ Vector3d.origin; xAxis: Triple ~ Vector3d.xAxis; yAxis: Triple ~ Vector3d.yAxis; zAxis: Triple ~ Vector3d.zAxis; PI: REAL ~ 3.1415926535; END.