42 if ( ! psurf )
return;
46 for ( i = 0; i < psurf->
ngeoms; i++ )
63 lwerror(
"printLWPSURFACE called with something else than a POLYHEDRALSURFACE");
70 for (i=0; i<psurf->
ngeoms; i++)
73 for (j=0; j<patch->
nrings; j++)
112 if (psurface->
ngeoms < 4)
return 0;
115 for (i=0, narcs=0 ; i < psurface->
ngeoms ; i++)
122 for (i=0, carc=0; i < psurface->
ngeoms ; i++)
133 if (pa.
x == pb.
x && pa.
y == pb.
y && pa.
z == pb.
z)
continue;
136 if ( (pa.
x > pb.
x) ||
137 (pa.
x == pb.
x && pa.
y > pb.
y) ||
138 (pa.
x == pb.
x && pa.
y == pb.
y && pa.
z > pb.
z) )
144 for (found=0, k=0; k < carc ; k++)
147 if ( ( arcs[k].
ax == pa.
x && arcs[k].
ay == pa.
y &&
148 arcs[k].
az == pa.
z && arcs[k].
bx == pb.
x &&
149 arcs[k].
by == pb.
y && arcs[k].
bz == pb.
z &&
169 arcs[carc].
ax = pa.
x;
170 arcs[carc].
ay = pa.
y;
171 arcs[carc].
az = pa.
z;
172 arcs[carc].
bx = pb.
x;
173 arcs[carc].
by = pb.
y;
174 arcs[carc].
bz = pb.
z;
190 for (k=0; k < carc ; k++)
192 if (arcs[k].
cnt != 2)
201 if (carc < psurface->ngeoms)
return 0;
void printPA(POINTARRAY *pa)
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
#define FLAGS_NDIMS(flags)
#define POLYHEDRALSURFACETYPE
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
LWCOLLECTION * lwcollection_add_lwgeom(LWCOLLECTION *col, const LWGEOM *geom)
Appends geom to the collection managed by col.
void * lwalloc(size_t size)
void lwpoly_free(LWPOLY *poly)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
LWPSURFACE * lwpsurface_add_lwpoly(LWPSURFACE *mobj, const LWPOLY *obj)
int lwpsurface_is_closed(const LWPSURFACE *psurface)
struct struct_psurface_arcs * psurface_arcs
void lwpsurface_free(LWPSURFACE *psurf)
void printLWPSURFACE(LWPSURFACE *psurf)