PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t asx3d3_tin_size ( const LWTIN tin,
char *  srs,
int  precision,
int  opts,
const char *  defid 
)
static

Need to make space for size of additional attributes, the coordIndex has a value for each edge for each triangle plus a space to separate so we need at least that much extra room

3 is to make space for coordIndex

Definition at line 583 of file lwout_x3d.c.

References asx3d3_triangle_size(), LWTIN::geoms, and LWTIN::ngeoms.

Referenced by asx3d3_tin().

584 {
585  int i;
586  size_t size;
587  size_t defidlen = strlen(defid);
588  /* int dimension=2; */
589 
592  size = sizeof("<IndexedTriangleSet coordIndex=''></IndexedTriangleSet>") + defidlen + tin->ngeoms*12;
593 
594  for (i=0; i<tin->ngeoms; i++)
595  {
596  size += (asx3d3_triangle_size(tin->geoms[i], 0, precision, opts, defid) * 20);
597  }
598 
599  return size;
600 }
int ngeoms
Definition: liblwgeom.h:541
LWTRIANGLE ** geoms
Definition: liblwgeom.h:543
static size_t asx3d3_triangle_size(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *defid)
Definition: lwout_x3d.c:326

Here is the call graph for this function:

Here is the caller graph for this function: