reads an mpoly from the indicated file pointer.
reads an mpoly from the indicated file pointer. The format for the file is:
- 1 float for density; units assumed kg/m^3
- 3 floats for R, G, B, each from 0 to 1
- 1 int for number of vertices
- list of vertices, with x, y, and z for each vertex
- 1 int for the number of faces nfaces
- a list of nfaces polyhedron faces. For each face:
- 1 int for the number of points in the face npts
- a list of npts ints specifying the indices of the points in the list of vertices. The points should be in counter-clockwise order, when viewed from outside the polyhedron.
A file describing a red cube with density 1000 kg/m^2, with 1m edges and centered at (0.5, 0.5, 0.5) would look like this:
1000 1.0 0.0 0.08
0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 1 0 1 1 1 1 0 1 1
6
4 3 2 1 0
4 4 5 6 7
4 0 1 5 4
4 2 3 7 6
4 1 2 6 5
4 0 4 7 3
Alphabetic index HTML hierarchy of classes or Java