DoSimplePolygon(3D)

NAME
DoSimplePolygon - Create a simple polygon primitive object

SYNOPSIS
C:
DtObject DoSimplePolygon(colormodel, vertextype,
	vertexcount, vertices, shape)
DtColorModel colormodel;
DtVertexType vertextype;
DtInt vertexcount;
DtReal vertices[];
DtShapeType shape;

FORTRAN:
INTEGER*4 DOSPGN(COLMOD, VTXTYP, VTXCNT,
	VTXS, SHAPE)
INTEGER*4 COLMOD
INTEGER*4 VTXTYP
INTEGER*4 VTXCNT
REAL*8 VTXS(*)
INTEGER*4 SHAPE

DESCRIPTION
DoSimplePolygon creates a primitive object that defines a simple polygon. A simple polygon is a planar collection of at least three vertices, forming a single connected contour. The contour may be either convex or concave. The boundaries of the contour may self-intersect.

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. for more information, refer to Chapter 6, Dore Vertex Types, in the Dore Reference Manual or to the VertexTypes on-line manual page.)

The parameter vertices is an array of vertex data. The parameter vertexcount specifies the number of vertices in the simple polygon. The parameter vertices is an array containing the vertices, plus any other vertex data, in order.

The last vertex is automatically connected to the first.

The parameter shape hints at the geometry of the simple polygon. Correctly specifying the shape of the contour will result in optimal 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.

Geometric normals to the polygons in the mesh are calculated using the right-hand rule (the fingers of the right hand point in the order of vertices and the thumb points in the direction of the normal). These normals are sometimes used for backface culling and facet shading. Polygons are faceted if no vertex normals are provided and the smoothflag is off.

ERRORS
DoSimplePolygon must be called with a valid specification for shape.

[WARNING - invalid parameter]

DoSimplePolygon must be called with at least three vertices.

[WARNING - insufficient information]

SEE ALSO
DoPolygon(3D), DoPolygonMesh(3D), DoSimplePolygonMesh(3D), VertexTypes(3D)