PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ asx3d3_tin_size()

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 622 of file lwout_x3d.c.

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

Referenced by asx3d3_collection_size(), and asx3d3_tin().

623 {
624  int i;
625  size_t size;
626  size_t defidlen = strlen(defid);
627  /* int dimension=2; */
628 
631  size = sizeof("<IndexedTriangleSet coordIndex=''></IndexedTriangleSet>") + defidlen + tin->ngeoms*12;
632 
633  for (i=0; i<tin->ngeoms; i++)
634  {
635  size += (asx3d3_triangle_size(tin->geoms[i], 0, precision, opts, defid) * 20);
636  }
637 
638  return size;
639 }
int ngeoms
Definition: liblwgeom.h:585
LWTRIANGLE ** geoms
Definition: liblwgeom.h:587
uint8_t precision
Definition: cu_in_twkb.c:25
static size_t asx3d3_triangle_size(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *defid)
Definition: lwout_x3d.c:354
opts
Definition: ovdump.py:44
Here is the call graph for this function:
Here is the caller graph for this function: