DoVarQuadMesh(3D)

NAME
DoVarQuadMesh - Create a variable quadrilateral mesh primitive object

SYNOPSIS
C:
DtObject DoVarQuadMesh(colormodel, vertexcount,
		vertlocs, vertnorms, vertcolors,
		quadcount, quads, smoothflag)
DtColorModel colormodel;
DtInt vertexcount;
DtReal vertlocs[];
DtReal vertnorms[];
DtReal vertcolors[];
DtInt quadcount;
DtInt quads[];
DtFlag smoothflag;

FORTRAN:
INTEGER*4 DOVQDM(COLMOD, VTXCNT, VTXLOC,
		VTXNRM, VTXCLR, QUDCNT,
		QUADS, SMOOFL)
INTEGER*4 COLMOD
INTEGER*4 VTXCNT
REAL*8 VTXLOC(*)
REAL*8 VTXNRM(*)
REAL*8 VTXCLR(*)
INTEGER*4 QUDCNT
INTEGER*4 QUADS(4*QUDCNT)
INTEGER*4 SMOOFL

DESCRIPTION
DoVarQuadMesh creates a primitive object that defines a variable collection of quadrilaterals, normally interconnected.

The main difference between a variable quadrilateral mesh and a quadrilateral mesh is that a variable quadrilateral mesh does not make a copy of the vertex data into its own data space. It simply maintains pointers to the vertex data (locations, normals and colors) in user space. A call to DpUpdVarQuadMesh <DPUVQM> informs a variable quadrilateral mesh object that the user data has changed.

The parameter colormodel specifies the color model used if vertex colors are provided. The parameter vertexcount specifies the total number of vertices in the mesh. The parameter vertlocs is an array of vertex locations. The parameter vertnorms is an array of vertex normals. If vertex normals are not available use DcNullPtr <DCNULL>. The parameter vertcolors is an array of vertex colors. If vertex colors are not available use DcNullPtr <DCNULL>.

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. These normals are sometimes used for backface culling and facet shading.

ERRORS
DoVarQuadMesh must be called with at least four vertices.

[WARNING - invalid parameter]

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

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

SEE ALSO
DoVarQuadMesh will issue a warning if a vertex index in quads is out of bounds.

[WARNING - vertex index > vertexcount or < zero] DpUpdVarQuadMesh(3D), DoQuadMesh(3D), DoVarLineList(3D), DoVarPointList(3D), DoVarSimplePolygonMesh(3D), DoVarTriangleStrip(3D), UPDATE THIS!!!