# NAME

**cxQmeshNextInd**- step through triangle vertices in a quadrilateral mesh

#include <cx/Qmesh.h>

void cxQmeshNextInd( long *nextInd, long *normal, long m, long n, int nindex, int *indices )

subroutine cxQmeshNextInd(nextInd, normal, m, n, nindex, indices)integer nextInd, normal, m, n, nindex, indices(*)

- nextInd
- Index into the indices array of the third vertex of the next triangle.
- normal
- Multiplier for the normal vector of the next triangle.
- m
- Number of grid points in I (first) dimension.
- n
- Number of grid points in J (second) dimension.
- nindex
- Number of vertex indices giving the mesh triangulation.
- indices
- Vector of vertex indices giving the mesh triangulation.

`cxQmeshNextInd`iterates through the triangles comprising the triangulation of a quadrilateral mesh generated by cxQmeshTris, returning on the ith call the index of the third vertex of the ith triangle. The prior vertex indices may generally be computed as nextInd-1 and nextInd-2.

`cxQmeshNextInd`also returns a multiplier for the triangle normal vector computed as the cross product of rays vertex[0] - vertex[2] and vertex[1] - vertex[2], since the triangle strips used to generate the quad-mesh alternate normal directions as they go. Multiplying normal times the cross product will yield normals pointing in the same direction for all triangles in the grid.

The first call to `cxQmeshNextInd` must have a negative value for nextInd, in order that the routine may initialize to the first triangle. The routine should be called at most cxQmeshNumTris times, at which point it will have exhausted the triangles in the quad-mesh.

*cxGeoTrisDefine(3E), cxGeoGridDefine(3E), cxQmeshCoords(3E), cxQmeshData(3E), cxQmeshNumPoints(3E), cxQmeshNumTris(3E),*

*Last modified: Mon Nov 6 16:33:47 GMT 2000*

[ Documentation Home ]© The Numerical Algorithms Group Ltd, Oxford UK. 1999

[ Documentation Home ]