INTERFACE DOct; IMPORT Oct, Wr; IMPORT R3; TYPE Arc = Oct.Arc; DataOctet <: Oct.Edge; DOctOrg = CARDINAL; Topology = RECORD NV: CARDINAL; (* Number of vertices *) NE: CARDINAL; (* Number of edges *) adj: REF ARRAY OF ARRAY OF BOOLEAN; vert: REF ARRAY OF Arc; (* One arc out of each vertex *) edge: REF ARRAY OF Arc; (* One arc for each edge *) END; PROCEDURE Org(a: Arc): DOctOrg; PROCEDURE Parent(o: DataOctet): Oct.Edge; (*PROCEDURE InitDOct(a: DataOctet; boole: BOOLEAN; parent: Oct.Edge); *) PROCEDURE MakeDOct(boole: BOOLEAN; parent: Oct.Edge): Arc; PROCEDURE NumberVertices(a: Arc): CARDINAL; (* Assigns numbers to vertices, sets the Org fields, and returns a vector with one arc out of each vertex. Must be called before any calls to Org. *) PROCEDURE MakeTopology(a: Arc): Topology; (* Builds the adjacency matrix and vertex/edge tables for the given DOct structure. Assumes NumberVertices has been called. *) TYPE Coords = ARRAY OF R3.T; PROCEDURE R3Print(wr: Wr.T; w: R3.T); PROCEDURE PutRayTriangles(wr: Wr.T; a: Arc; READONLY coords: Coords); PROCEDURE PutWireTriangles(wr: Wr.T; a: Arc; READONLY coords: Coords); PROCEDURE InitCoords(VAR coords: Coords); PROCEDURE NormalizeCoords(a: Arc; VAR coords: Coords); PROCEDURE SmoothVertices(a: Arc; VAR coords: Coords); PROCEDURE SmoothOneVertex(a: Arc; VAR coords: Coords); END DOct.