PostGIS  2.5.0dev-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:435
#define TRIANGLETYPE
Definition: liblwgeom.h:97
GBOX * bbox
Definition: liblwgeom.h:433
uint8_t type
Definition: liblwgeom.h:431
uint8_t flags
Definition: liblwgeom.h:371
#define FLAGS_SET_BBOX(flags, value)
Definition: liblwgeom.h:147
void * lwalloc(size_t size)
Definition: lwutil.c:229
int32_t srid
Definition: liblwgeom.h:434
uint8_t flags
Definition: liblwgeom.h:432
Here is the call graph for this function:
Here is the caller graph for this function: