Fill in triangle index
Definition at line 646 of file lwout_x3d.c.
References asx3d3_triangle_buf(), LWTIN::geoms, LW_X3D_FLIP_XY, LWTIN::ngeoms, and X3D_USE_GEOCOORDS.
Referenced by asx3d3_collection_buf(), and asx3d3_tin().
655 ptr += sprintf(ptr,
"<IndexedTriangleSet %s index='",defid);
658 for (i=0; i<tin->
ngeoms; i++)
660 ptr += sprintf(ptr,
"%d %d %d", k, (k+1), (k+2));
661 if (i < (tin->
ngeoms - 1) )
663 ptr += sprintf(ptr,
" ");
669 else ptr += sprintf(ptr,
"'><Coordinate point='");
671 for (i=0; i<tin->
ngeoms; i++)
675 if (i < (tin->
ngeoms - 1) )
677 ptr += sprintf(ptr,
" ");
683 ptr += sprintf(ptr,
"'/></IndexedTriangleSet>");
#define X3D_USE_GEOCOORDS(x)
#define LW_X3D_FLIP_XY
Macros for specifying X3D options.
static size_t asx3d3_triangle_buf(const LWTRIANGLE *triangle, char *srs, char *output, int precision, int opts, const char *defid)