DoQuadMesh(3D)

NAME
DoQuadMesh - Create a quadrilateral mesh primitive object

SYNOPSIS
C:
DtObject DoQuadMesh(colormodel, vertextype,
	vertexcount, vertices, quadcount,
	quads, smoothflag)
DtColorModel colormodel;
DtVertexType vertextype;
DtInt vertexcount;
DtReal vertices[];
DtInt quadcount;
DtInt quads[];
DtFlag smoothflag;

FORTRAN:
INTEGER*4 DOQUDM(COLMOD, VTXTYP, VTXCNT,
		VTXS, QUDCNT, QUADS,
			SMOOFL)
INTEGER*4 COLMOD
INTEGER*4 VTXTYP
INTEGER*4 VTXCNT
REAL*8 VTXS(*)
INTEGER*4 QUDCNT
INTEGER*4 QUADS(*)
INTEGER*4 SMOOFL

DESCRIPTION
DoQuadMesh creates a quadrilateral mesh primitive object that defines a collection of quadrilaterals, normally interconnected.

With a quadrilateral mesh, you specify a collection of vertices in space and connect the vertices into a collection of planar quadrilaterals, usually forming a connected surface.

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 vertexcount specifies the total number of vertices in the mesh. The parameter vertices is an array of vertex data. The parameter quadcount specifies the total number of quadrilaterals in the mesh. The parameter quads is a one-dimensional array containing quadcount quadruplets of integers. Each quadruplet is an ordered list of mesh vertex numbers for the four coordinates of the quadrilateral.

If vertex normals are not provided, the parameter smoothflag specifies that the vertex normal for shading purposes will be the average of the geometric normals from a vertex's adjacent surfaces. This assumes that the quadrilateral mesh defines a smooth surface.

The geometric normal to each quadrilateral is calculated using the right-hand rule (when the fingers of the right hand point in the order of the vertices, the thumb points in the direction of the normal). These geometric normal calculations require that all quadrilaterals be planar. Dore uses these normals for backface culling and flat shading.

ERRORS
DoQuadMesh must be called with at least four vertices.

[WARNING - invalid parameter]

DoQuadMesh will issue an warning if a zero vertex normal is calculated by Dore.

[WARNING - quad normals sum to 0 at vertex, check for back to back quads]

DoQuadMesh will fail if an invalid vertex list pointer is specified.

[WARNING - value out of range]

SEE ALSO
DoQuadList(3D), VertexTypes(3D)