<> <> <> <> DIRECTORY IO, Rope, ThreeDBasics; ThreeDIO: CEDAR DEFINITIONS ~ BEGIN <> Error: ERROR [reason: ROPE]; ROPE: TYPE ~ Rope.ROPE; STREAM: TYPE ~ IO.STREAM; Triple: TYPE ~ ThreeDBasics.Triple; TripleSequence: TYPE ~ ThreeDBasics.TripleSequence; IntegerSequence: TYPE ~ ThreeDBasics.IntegerSequence; RealSequence: TYPE ~ ThreeDBasics.RealSequence; NatSequence: TYPE ~ ThreeDBasics.NatSequence; NatTable: TYPE ~ ThreeDBasics.NatTable; VertexInfo: TYPE ~ ThreeDBasics.VertexInfo; VertexInfoSequence: TYPE ~ ThreeDBasics.VertexInfoSequence; Vertex: TYPE ~ ThreeDBasics.Vertex; ShadingValue: TYPE ~ ThreeDBasics.ShadingValue; FieldType: TYPE ~ {integer, real, triple, nats, none}; FieldDescription: TYPE ~ RECORD [id: ROPE, type: FieldType]; Field: TYPE ~ RECORD [ id: ROPE, -- name of the field type: FieldType, -- type of the field sequence: REF ANY -- ref to field sequence ]; FieldSequence: TYPE ~ RECORD [ length: NAT, element: SEQUENCE maxLength: INTEGER OF REF Field ]; Line: TYPE ~ REF LineRec; LineRec: TYPE ~ RECORD [ rope: ROPE _ NIL, -- text of this line index: INTEGER _ 0, -- current index into the rope length: INTEGER _ 0, -- length of the rope stream: STREAM _ NIL -- the associated io stream ]; <> <> <> <> <> <> <<>> <> <> <<>> <> <> <> <<>> <> <> <> <> <> <> <> <> <> <> <> GetLine: PROC [stream: STREAM] RETURNS [line: Line]; <> <<>> GetWord: PROC [line: Line] RETURNS [word: ROPE]; <> GetInteger: PROC [line: Line] RETURNS [INTEGER]; <> <<>> GetReal: PROC [line: Line] RETURNS [REAL]; <> <<>> GetTriple: PROC [line: Line] RETURNS [Triple]; <> <<>> GetNats: PROC [line: Line] RETURNS [nats: REF NatSequence]; <> <<>> NextKeyword: PROC [stream: STREAM, circularSearch: BOOL _ FALSE] RETURNS [key: ROPE]; <> <<>> FindKeyword: PROC [stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE] RETURNS [line: Line]; <> <> <<>> <> <> <> <<>> ReadRope: PROC [stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE] RETURNS [ROPE]; <> ReadInteger: PROC [stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE] RETURNS [INTEGER]; <> ReadReal: PROC [stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE] RETURNS [REAL]; <> <<>> ReadTriple: PROC [stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE] RETURNS [Triple]; <> <<>> <> <> <> <> <> <> ReadIntegerSequence: PROC [ stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE, nElements: INT _ 0] RETURNS [REF IntegerSequence]; ReadRealSequence: PROC [ stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE, nElements: INT _ 0] RETURNS [REF RealSequence]; <> <> ReadTripleSequence: PROC [ stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE, nElements: INT _ 0] RETURNS [REF TripleSequence]; ReadNatTable: PROC [ stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE, nElements: INT _ 0] RETURNS [REF NatTable]; ReadVertexInfoSequence: PROC [ stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE, nElements: INT _ 0] RETURNS [REF VertexInfoSequence]; <<>> <> <<(All other values in vertexInfo are specific to a given view).>> <<>> <> <> <> <<"xyzCoords": surface x, y, and z coordinates at vertex (Triple)>> <<"normalVec": surface normal vector at vertex (Triple)>> <<"rgbColor": color as r, g, and b values from 0 to 1 at vertex (Triple)>> <<"transmittance": surface transmittance at vertex (Real)>> <<"textureCoords": vertex texture coordinates (Triple)>> <<>> ReadFields: PROC [ stream: STREAM, keyword: ROPE, circularSearch: BOOL _ FALSE, nElements: INT _ 0] RETURNS [fields: REF FieldSequence]; <> <<>> <> <<>> <> <<>> <> <> <<>> <> <> <> <> <<>> <> <