Next: MESH, Previous: Object File Formats, Up: Object File Formats
The conventional suffix for a QUAD
file is .quad.
The file syntax is
[C][N][4]QUAD -or- [C][N][4]POLY # Key word vertex vertex vertex vertex # 4*N vertices for some N vertex vertex vertex vertex ...
The leading key word is [C][N][4]QUAD
or [C][N][4]POLY
,
where the optional C
and N
prefixes indicate that each vertex
includes colors and normals respectively. That is, these files
begin with one of the words
QUAD
CQUAD
NQUAD
CNQUAD
POLY
CPOLY
NPOLY
CNPOLY
(but not NCQUAD
or NCPOLY
). QUAD
and POLY
are synonymous; both forms are allowed just for compatibility with
ChapReyes.
Following the key word is an arbitrary number of groups of four vertices, each group describing a quadrilateral. See the Vertex syntax above. The object ends at end-of-file, or with a closebrace if incorporated into an object reference (see above).
A QUAD BINARY
file format is accepted; See Binary format. The
first word of binary data must be a 32-bit integer giving the number of
quads in the object; following that is a series of 32-bit floats,
arranged just as in the ASCII format.