PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ asx3d3_poly_size()

static size_t asx3d3_poly_size ( const LWPOLY poly,
char *  srs,
int  precision,
int  opts,
const char *  defid 
)
static

Compute the string space needed for the IndexedFaceSet representation of the polygon.

Definition at line 323 of file lwout_x3d.c.

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

Referenced by asx3d3_collection_size(), asx3d3_multi_size(), and asx3d3_psurface_size().

324 {
325  size_t size;
326  size_t defidlen = strlen(defid);
327  int i;
328 
329  size = ( sizeof("<IndexedFaceSet></IndexedFaceSet>") + (defidlen*3) ) * 2 + 6 * (poly->nrings - 1);
330 
331  for (i=0; i<poly->nrings; i++)
332  size += pointArray_X3Dsize(poly->rings[i], precision);
333 
334  return size;
335 }
static size_t pointArray_X3Dsize(POINTARRAY *pa, int precision)
Returns maximum size of rendered pointarray in bytes.
Definition: lwout_x3d.c:930
POINTARRAY ** rings
Definition: liblwgeom.h:456
uint8_t precision
Definition: cu_in_twkb.c:25
int nrings
Definition: liblwgeom.h:454
Here is the call graph for this function:
Here is the caller graph for this function: