PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ BOX3D_expand()

Datum BOX3D_expand ( PG_FUNCTION_ARGS  )

Definition at line 367 of file lwgeom_box3d.c.

368 {
369  BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0);
370  BOX3D *result = (BOX3D *)palloc(sizeof(BOX3D));
371  memcpy(result, box, sizeof(BOX3D));
372 
373  if (PG_NARGS() == 2)
374  {
375  /* Expand the box the same amount in all directions */
376  double d = PG_GETARG_FLOAT8(1);
377  expand_box3d(result, d);
378  }
379  else
380  {
381  double dx = PG_GETARG_FLOAT8(1);
382  double dy = PG_GETARG_FLOAT8(2);
383  double dz = PG_GETARG_FLOAT8(3);
384 
385  expand_box3d_xyz(result, dx, dy, dz);
386  }
387 
388  PG_RETURN_POINTER(result);
389 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
static void expand_box3d_xyz(BOX3D *box, double dx, double dy, double dz)
Definition: lwgeom_box3d.c:356
void expand_box3d(BOX3D *box, double d)
Expand given box of 'd' units in all directions.
Definition: lwgeom_box3d.c:344

References expand_box3d(), expand_box3d_xyz(), and result.

Here is the call graph for this function: