TubeIO.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Bloomenthal, May 21, 1986 8:31:30 pm PDT
DIRECTORY Controls, ImagerInterpress, IO, Rope, TubeDefs;
TubeIO: CEDAR DEFINITIONS
~ BEGIN
OPEN TubeDefs;
PointProc: TYPE ~ PROC [out: IO.STREAM, id: INTEGER, p, n: Triple, u, v: REAL];
Procedure for writing point id, position (p) and normal (n) to output stream.
PolyProc: TYPE ~ PROC [out: IO.STREAM, id, p0, p1, p2: INTEGER];
Procedure for writing poly id and three point ids to output stream.
QueryAndPointsPolyOut: PUBLIC PROC [tube: Tube, outer: OuterData, m: Matrix ← NIL];
Use outer.typescript to query user for name, then write points and polygons;
if view is non-nil, transform the points first.
QueryAndMaxPointsPolyOut: PUBLIC PROC [tube: Tube, outer: OuterData, m: Matrix ← NIL];
Use outer.typescript to query user for name, then write in Nelson Max format.
PointsPolysOut: PUBLIC PROC [tube: Tube, fileName: ROPE, m: Matrix ← NIL]
RETURNS [nPoints, nPolys: INT];
Write out the points and polygons to the given file;
points are indexed and contain xyz, normal, and uvw data.
MaxPointsPolysOut: PUBLIC PROC [tube: Tube, fileName: ROPE, m: Matrix ← NIL]
RETURNS [nPoints, nPolys: INT];
Write out the points and polygons to the given file in Nelson Max format.
DefaultPointProc: PUBLIC PointProc;
PointProc to write point data in Imaging default format.
DefaultPolyProc: PUBLIC PolyProc;
PolyProc to write poly data in Imaging default format.
MaxPointProc: PUBLIC PointProc;
PointProc to write point data in Nelson Max format.
MaxPolyProc: PUBLIC PolyProc;
PolyProc to write poly data in Nelson Max format.
Points: PUBLIC PROC [
tube: Tube, out: IO.STREAM, pointProc: PointProc ← DefaultPointProc, view: Matrix ← NIL]
RETURNS [nPoints: INT];
Output the set of points in points-poly format; transform points by m if non-nil.
Polys: PUBLIC PROC [tube: Tube, out: IO.STREAM, polyProc: PolyProc ← DefaultPolyProc]
RETURNS [nPolys: INT];
Output the set of polygons in points-poly format.
QueryAndIPOut: PUBLIC PROC [tube: Tube, outer: OuterData, details: Details, m: Matrix];
Print the currently displayed tube as an interpress file, querying the user for a filename.
IPOut: PUBLIC PROC [ref: ImagerInterpress.Ref, tube: Tube, details: Details, m: Matrix];
Write the tube to ref; leaving the file open until ImagerInterpress.Close[ref].
WriteTubeInfo: PROC [tube: Tube, outer: OuterData];
Print the number of points and polygons, and the range of circular resolution.
END.