PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ gbox_merge_point3d()

int gbox_merge_point3d ( const POINT3D p,
GBOX gbox 
)

Update the GBOX to be large enough to include itself and the new point.

Definition at line 235 of file g_box.c.

236 {
237  if ( gbox->xmin > p->x ) gbox->xmin = p->x;
238  if ( gbox->ymin > p->y ) gbox->ymin = p->y;
239  if ( gbox->zmin > p->z ) gbox->zmin = p->z;
240  if ( gbox->xmax < p->x ) gbox->xmax = p->x;
241  if ( gbox->ymax < p->y ) gbox->ymax = p->y;
242  if ( gbox->zmax < p->z ) gbox->zmax = p->z;
243  return LW_SUCCESS;
244 }
#define LW_SUCCESS
Definition: liblwgeom.h:80
double ymax
Definition: liblwgeom.h:298
double zmax
Definition: liblwgeom.h:300
double xmax
Definition: liblwgeom.h:296
double zmin
Definition: liblwgeom.h:299
double ymin
Definition: liblwgeom.h:297
double xmin
Definition: liblwgeom.h:295
double z
Definition: liblwgeom.h:343
double x
Definition: liblwgeom.h:343
double y
Definition: liblwgeom.h:343

References LW_SUCCESS, POINT3D::x, GBOX::xmax, GBOX::xmin, POINT3D::y, GBOX::ymax, GBOX::ymin, POINT3D::z, GBOX::zmax, and GBOX::zmin.

Referenced by edge_calculate_gbox(), and edge_calculate_gbox_slow().

Here is the caller graph for this function: