PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ asx3d3_poly_buf()

static size_t asx3d3_poly_buf ( const LWPOLY poly,
char *  srs,
char *  output,
int  precision,
int  opts,
int  is_patch,
const char *  defid 
)
static

Compute the X3D coordinates of the polygon.

Definition at line 318 of file lwout_x3d.c.

References LWPOLY::nrings, pointArray_toX3D3(), and LWPOLY::rings.

Referenced by asx3d3_collection_buf(), asx3d3_multi_buf(), and asx3d3_psurface_buf().

319 {
320  int i;
321  char *ptr=output;
322 
323  ptr += pointArray_toX3D3(poly->rings[0], ptr, precision, opts, 1);
324  for (i=1; i<poly->nrings; i++)
325  {
326  ptr += sprintf(ptr, " "); /* inner ring points start */
327  ptr += pointArray_toX3D3(poly->rings[i], ptr, precision, opts,1);
328  }
329  return (ptr-output);
330 }
POINTARRAY ** rings
Definition: liblwgeom.h:441
uint8_t precision
Definition: cu_in_twkb.c:25
int nrings
Definition: liblwgeom.h:439
opts
Definition: ovdump.py:44
static size_t pointArray_toX3D3(POINTARRAY *pa, char *buf, int precision, int opts, int is_closed)
In X3D3, coordinates are separated by a space separator.
Definition: lwout_x3d.c:819
Here is the call graph for this function:
Here is the caller graph for this function: