PostGIS  2.1.10dev-r@@SVN_REVISION@@
LWTRIANGLE* lwtriangle_construct ( int  srid,
GBOX bbox,
POINTARRAY points 
)

Definition at line 27 of file lwtriangle.c.

References LWTRIANGLE::bbox, POINTARRAY::flags, LWTRIANGLE::flags, FLAGS_SET_BBOX, lwalloc(), LWTRIANGLE::points, result, LWTRIANGLE::srid, TRIANGLETYPE, and LWTRIANGLE::type.

Referenced by lwtin_from_geos(), lwtriangle_from_lwline(), parse_gml_triangle(), SFCGAL2LWGEOM(), and wkt_parser_triangle_new().

28 {
30 
31  result = (LWTRIANGLE*) lwalloc(sizeof(LWTRIANGLE));
32  result->type = TRIANGLETYPE;
33 
34  result->flags = points->flags;
35  FLAGS_SET_BBOX(result->flags, bbox?1:0);
36 
37  result->srid = srid;
38  result->points = points;
39  result->bbox = bbox;
40 
41  return result;
42 }
POINTARRAY * points
Definition: liblwgeom.h:389
#define TRIANGLETYPE
Definition: liblwgeom.h:73
GBOX * bbox
Definition: liblwgeom.h:387
char ** result
Definition: liblwgeom.h:218
uint8_t type
Definition: liblwgeom.h:385
uint8_t flags
Definition: liblwgeom.h:325
#define FLAGS_SET_BBOX(flags, value)
Definition: liblwgeom.h:114
void * lwalloc(size_t size)
Definition: lwutil.c:175
int32_t srid
Definition: liblwgeom.h:388
uint8_t flags
Definition: liblwgeom.h:386

Here is the call graph for this function:

Here is the caller graph for this function: