The IDLgrTessellator::AddPolygon procedure method adds a polygon to the tessellator object.

Syntax


Obj->[IDLgrTessellator::]AddPolygon, X [, Y[, Z]] [, AUXDATA=array of auxiliary data] [, /INTERIOR] [, POLYGON=array of polygon descriptions]

Arguments


X

A 1 x n, 2x n, or 3x n array of polygon vertices.

Y

A vector of Y values. If X and Y are both specified, they must be one-dimensional vectors of the same length.

Z

A vector of Z values. If X, Y, and Z are all specified, they must all three be one-dimensional vectors of the same length. If no Z values are specified, the Z value for the polygon is set to 0.

Keywords


AUXDATA

Set this keyword to an array of auxiliary per-vertex data. This array must have dimensions [m,n] where m is the number of auxiliary data items per vertex and n is the number of vertices specified in the X, Y, and Z arguments. If you specify AUXDATA in any invocation of the AddPolygon method, you must specify it on all invocations of the method for the polygons to be tessellated together with the Tessellate method. Further, the value of m in the dimensions must be the same for all polygons. That is, all polygons must have the same number of auxiliary data items for each vertex.

INTERIOR

Set this keyword to set a polygon to be an interior polygon, which is treated as a hole in the exterior polygons.

Note: The INTERIOR keyword for the AddPolygon method is no longer needed to inform the tessellator that the polygon defines an exterior or interior boundary. This keyword is ignored by the tessellator because it now performs the interior testing using the odd-winding rule.

POLYGON

Set this keyword to an array of polygon descriptions. A polygon description is an integer or long word array of the form: [n, i0, i1, ..., in-1], where n is the number of vertices that define the polygon, and i0..in-1 are indices into the X, Y, and Z arguments that represent the polygon vertices. To ignore an entry in the POLYGON array, set the vertex count, n, to 0. To end the drawing list, even if additional array space is available, set n to -1. If this keyword is not specified, a single polygon will be generated.

Note: The connectivity array described by POLYGONS allows you to add multiple polygons to the tessellator object with a single AddPolygon operation.

Version History


5.0

Introduced

5.6

Added AUXDATA keyword