PostGIS  2.1.10dev-r@@SVN_REVISION@@
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 295 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().

296 {
297  size_t size;
298  size_t defidlen = strlen(defid);
299  int i;
300 
301  size = ( sizeof("<IndexedFaceSet></IndexedFaceSet>") + (defidlen*3) ) * 2 + 6 * (poly->nrings - 1);
302 
303  for (i=0; i<poly->nrings; i++)
304  size += pointArray_X3Dsize(poly->rings[i], precision);
305 
306  return size;
307 }
static size_t pointArray_X3Dsize(POINTARRAY *pa, int precision)
Returns maximum size of rendered pointarray in bytes.
Definition: lwout_x3d.c:858
POINTARRAY ** rings
Definition: liblwgeom.h:413
int nrings
Definition: liblwgeom.h:411

Here is the call graph for this function:

Here is the caller graph for this function: