DoSimplePolygonMesh(3D) — Kubota Pacfic Computer Inc. (\*(Dd)
NAME
DoSimplePolygonMesh − Create a simple polygon mesh primitive object
SYNOPSIS
C:
DtObject DoSimplePolygonMesh(colormodel, vertextype,
vertexcount, vertices, polygoncount, contours,
vertexlist, shape, smoothflag)
DtColorModel colormodel;
DtVertexType vertextype;
DtInt vertexcount;
DtReal vertices[];
DtInt polygoncount;
DtInt contours[];
DtInt vertexlist[];
DtShapeType shape;
DtFlag smoothflag;
FORTRAN:
INTEGER∗4 DOSPM(COLMOD, VTXTYP, VTXCNT,
VTXS, PLYCNT, CONTURS, VTXLST,
SHAPE, SMOOFL)
INTEGER∗4 COLMOD
INTEGER∗4 VTXTYP
INTEGER∗4 VTXCNT
REAL∗8 VTXS(∗)
INTEGER∗4 PLYCNT
INTEGER∗4 CONTURS(PLYCNT)
INTEGER∗4 VTXLST(∗)
INTEGER∗4 SHAPE
INTEGER∗4 SMOOFL
DESCRIPTION
DoSimplePolygonMesh creates a primitive object that defines a collection of simple polygons, normally interconnected. Each simple polygon must be as described in DoSimplePolygon. A DoPolygonMesh primitive object may be used for more general polygons consisting of multiple contours.
The parameter colormodel specifies the color model used if the vertices contain color information for shading purposes. The parameter vertextype specifies the exact nature of the vertices. FORTRANr more information, refer to Chapter 6, Doré Vertex Types, in the Doré Reference Manual or to the VertexTypes on-line manual page.)
The parameter vertices is a one-dimensional array of vertex data. The parameter vertexcount specifies the number of vertices contained in the vertices array.
The parameter polygoncount specifies the number of polygons in the mesh. Simple polygons are each composed of one contour. The parameter contours is an array of polygoncount integers, each of which specifies the number of vertices in the associated polygon.
The parameter vertexlist is an array of integers that index the vertices array. The first polygon in the mesh begins with the vertex specified by vertexlist[0], and continues using the vertices specified by the following entries in vertexlist. The last vertex of a contour is implicitly connected to its first vertex. The next polygon begins with the vertex specified next in the vertexlist array.
The parameter shape hints at the geometry of the polygons in the mesh. For these polygons, correctly specifying the shape of the polygon will result in optimal polygon decomposition when necessary. Incorrectly specifying the shape may result in an incorrect or aborted decomposition. The possible values for shape are:
DcConvex <DCCNVX>
Path is wholly convex.
DcConcave <DCCNCV>
Path may be concave but not self-intersecting.
DcComplex <DCCPLX>
Path may be self-intersecting.
The parameter smoothflag specifies that, if vertex normals are not provided, the average normal of the geometric normals from a vertex’s adjacent surfaces constitute the normal for shading. (This assumes the simple polygon mesh defines a smooth surface.)
ERRORS
DoSimplePolygonMesh must be called with a valid specification for shape.
[WARNING - invalid parameter]
DoSimplePolygonMesh must be called with at least three vertices.
[WARNING - insufficient information]
DoSimplePolygonMesh will issue a warning if a zero vertex normal is calculated by Doré.
[WARNING - triangle normals sum to 0 at vertex, check for back to back triangles]
SEE ALSO
DoPolygon(3D), DoPolygonMesh(3D), DoSimplePolygon(3D), VertexTypes(3D)
September 02, 1992