TubeIO.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Bloomenthal, November 21, 1986 10:44:52 pm PST
DIRECTORY ImagerInterpress, TubeDefs;
TubeIO: CEDAR DEFINITIONS
~ BEGIN
OPEN TubeDefs;
Writing Tube in Points-Polygons Format
QueryAndWritePointsPoly: PUBLIC PROC [tube: Tube, o: OuterData, m: Matrix ← NIL];
Use o.typescript to query user for name, then write points and polygons;
if view is non-nil, transform the points first.
WritePointsPolys: 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.
Writing Tube in Nelson Max Format
QueryAndWriteMaxPointsPoly: PUBLIC PROC [tube: Tube, o: OuterData, m: Matrix ← NIL];
Use o.typescript to query user for name, then write in Nelson Max format.
WriteMaxPointsPolys: 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.
Writing Tube in Interpress Format
QueryAndWriteIP: PUBLIC PROC [tube: Tube, o: OuterData, details: Details, m: Matrix];
Print the currently displayed tube as an interpress file, querying the user for a filename.
WriteIP: PUBLIC PROC [ref: ImagerInterpress.Ref, tube: Tube, details: Details, m: Matrix];
Write the tube to ref; leaving the file open until ImagerInterpress.Close[ref].
Writing and Reading Tube in Tube Format
QueryAndWriteTube: PUBLIC PROC [tube: Tube, o: OuterData, m: Matrix ← NIL];
Use o.typescript to query user for name, then write tube.
WriteTube: PUBLIC PROC [stream: STREAM, tube: Tube, m: Matrix ← NIL];
Write tube to stream, multiplying points and tangents by m if non-nil.
QueryAndReadTube: PUBLIC PROC [o: OuterData]
RETURNS [Tube];
Use o.typescript to query user for name, then read.
ReadTube: PUBLIC PROC [stream: STREAM] RETURNS [Tube];
Read from stream.
WriteTubeInfo: PROC [tube: Tube, o: OuterData];
Print the number of points and polygons, and the range of circular resolution.
END.