xref: /inferno-os/module/math/polyhedra.m (revision 46439007cf417cbd9ac8049bb4122c890097a0fa)
1Polyhedra: module
2{
3	PATH: con "/dis/math/polyhedra.dis";
4
5	Vector: adt{
6		x, y, z: real;
7	};
8
9	Polyhedron: adt{
10		name, dname: string;
11		indx, V, E, F, concave, anti, allf, adj: int;
12		v, f: array of Vector;
13		fv, vf: array of array of int;
14		offset: big;
15		prv, nxt: cyclic ref Polyhedron;
16		inc: real;
17	};
18
19	# read in details of all polyhedra in the given file
20	scanpolyhedra: fn(f: string): (int, ref Polyhedron, ref Bufio->Iobuf);
21	# read in the coordinates of all polyhedra
22	getpolyhedra: fn(p: ref Polyhedron, b: ref Bufio->Iobuf);
23	# read in the coordinates of the given polyhedron
24	getpolyhedron: fn(p: ref Polyhedron, b: ref Bufio->Iobuf);
25};
26