DIRECTORY Controls, Imager, IO, Matrix3d, Menus, Rope, Spline3d, TubeDefs, Vector3d; TubeFrame: CEDAR DEFINITIONS ~ BEGIN OPEN TubeDefs; ReScale: PUBLIC PROC [tube: Tube, scale: REAL _ 1.0, taper: REAL _ 0.0]; Make: PUBLIC PROC [ tube: Tube, epsilon: REAL _ 0.03, scale: REAL _ 1.0, taper: REAL _ 0.0, skin: BOOL _ FALSE, view: Matrix _ NIL, frameProc: FrameProc _ NIL ]; MakeFrames: PROC [ tube: Tube, epsilon: REAL _ 0.03, scale: REAL _ 1.0, taper: REAL _ 0.0, skin: BOOL _ FALSE, view: Matrix _ NIL, frameProc: FrameProc _ NIL ]; MakeSectionFrames: PROC [ tube: Tube, epsilon: REAL _ 0.03, scale0, scale1: REAL _ 1.0, skin: BOOL _ FALSE, view: Matrix _ NIL, frameProc: FrameProc _ NIL ]; NFrames: PUBLIC PROC [tube: Tube] RETURNS [INTEGER]; GetFrame: PUBLIC PROC [tube: Tube, t: REAL] RETURNS [Frame]; PutFrame: PUBLIC PROC [tube: Tube, frame: Frame]; CopyFrame: PUBLIC PROC [frames: Frame] RETURNS [Frame]; CopyFrames: PUBLIC PROC [frames: FrameSequence] RETURNS [FrameSequence]; Basis: PUBLIC PROC [v, vv, rv: Triple] RETURNS [Triad]; RefMatrix: PUBLIC PROC [position: Triple, triad: Triad, scale, twist: REAL, out: Matrix _ NIL] RETURNS [Matrix]; END. TTubeFrame.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Bloomenthal, September 18, 1986 10:37:01 am PDT Resize tube.frames to scale*tube.r. Create spline coefficients and reference frames for the entire tube (its descendants and antecedants). For each tube section, points, tangents, radii, and twists are presumed defined. scale is the amount by which a frame matrix is scaled at the base of the tree. The scale is reduced according to distance from the tube base and taper; if taper is 0, no tapering occurs; if taper is 1, then scale is reduced to zero after a distance of 1. If skin is TRUE then the curve subdivison considers the variation in any associated contours and at each frame the contour is computed. If view is NIL, the tube is considered only in object space and epsilon is the same discriminator as in Spline3d.FlatBezier; if view is non-NIL, epsilon is the number of pixels the straight line approximation is permitted to deviate from the curve as transformed to screen space. If frameProc is non-NIL, it is used to create the each frame; otherwise a standard procedure, return a frame consisting of a circular cross-section. Make the frames for the tube sub-tree (tube and its descendants only). epsilon, scale, taper, skin, view, and frameProc have the same meaning as in Make[]. Create a frame sequence for the tube section only. epsilon, skin, view, and frameProc have the same meaning as in Make[]. scale0 and scale1 are the scales applied at the beginning and end of the tube section. Return the number of frames in tube. Return the frame at parametric position t, t IN [0..1]. Insert the frame in the tube. Return a copy of the input frame. Return a copy of the input frame sequence. Given tangent v along a curve, previous tangent vv, and reference vector rv, compute vectors n and b; v, n, and b form a new set of axes; the transformation of the x, y, and z axes to v, n, and b accomodates the twist in the curve; n and b are unitized. Return matrix which transforms origin to p, xaxis to x, yaxis to y and zaxis to z; twist around z by t degrees and scale by s. ΚI˜šœ™Jšœ Οmœ1™