Element type: |
miSCENE_POLYGON |

Data type: |
miPolygon[ ] |

Sizes: |
int no_polys |

Defaults: |
all nulls |

typedef struct miPolygon { miGeoIndex no_loops; /* 1 + (number of holes) */ miGeoIndex no_vertices; /* total number of vertices + headers*/ miGeoIndex vertex_idx; /* into indices list, for sharing */ miTag material; /* surface properties */ miCBoolean convex; /* is polygon convex ? */ miCBoolean spare[3]; /* not used */ } miPolygon;

A translator must provide: all fields except
`spare`.

**no_loops** is the number of loops of the polygon. Every
polygon has exactly one outer boundary loop, plus any number of
optional hole loops. Every loop is stored as a pseudo-index called
a "header" that doesn't actually refer to the vector list but gives
the number of indices to follow, followed by that many indices.

**no_vertices** is the total number of headers (the number of
holes plus 1) plus the total number of vertices for this
polygon.

**vertex_idx** is an index to the first header of the polygon
in the index list. *no_vertices* indices beginning at
*vertex_idex* define the polygon.

**material** is the tag of the material of the polygon. It
must refer to a database element of type
`miSCENE_MATERIAL`.

**convex** is a flag telling the tessellator that the polygon
has no holes and is guaranteed to be convex. This saves time
because GAP can use a very simple tessellation algorithm.

Copyright © 1986, 2013 NVIDIA Corporation