PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwtriangle_construct()

LWTRIANGLE* lwtriangle_construct ( int  srid,
GBOX bbox,
POINTARRAY points 
)

Definition at line 40 of file lwtriangle.c.

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

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

41 {
42  LWTRIANGLE *result;
43 
44  result = (LWTRIANGLE*) lwalloc(sizeof(LWTRIANGLE));
45  result->type = TRIANGLETYPE;
46 
47  result->flags = points->flags;
48  FLAGS_SET_BBOX(result->flags, bbox?1:0);
49 
50  result->srid = srid;
51  result->points = points;
52  result->bbox = bbox;
53 
54  return result;
55 }
POINTARRAY * points
Definition: liblwgeom.h:433
#define TRIANGLETYPE
Definition: liblwgeom.h:98
GBOX * bbox
Definition: liblwgeom.h:431
uint8_t type
Definition: liblwgeom.h:429
uint8_t flags
Definition: liblwgeom.h:369
#define FLAGS_SET_BBOX(flags, value)
Definition: liblwgeom.h:148
void * lwalloc(size_t size)
Definition: lwutil.c:229
int32_t srid
Definition: liblwgeom.h:432
uint8_t flags
Definition: liblwgeom.h:430
Here is the call graph for this function:
Here is the caller graph for this function: