PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ getOctant()

static uint8 getOctant ( BOX3D centroid,
BOX3D inBox 
)
static

Definition at line 159 of file gserialized_spgist_3d.c.

160 {
161  uint8 octant = 0;
162 
163  if (inBox->xmin > centroid->xmin)
164  octant |= 0x20;
165 
166  if (inBox->xmax > centroid->xmax)
167  octant |= 0x10;
168 
169  if (inBox->ymin > centroid->ymin)
170  octant |= 0x08;
171 
172  if (inBox->ymax > centroid->ymax)
173  octant |= 0x04;
174 
175  if (inBox->zmin > centroid->zmin)
176  octant |= 0x02;
177 
178  if (inBox->zmax > centroid->zmax)
179  octant |= 0x01;
180 
181  return octant;
182 }
Datum centroid(PG_FUNCTION_ARGS)
double xmax
Definition: liblwgeom.h:281
double zmin
Definition: liblwgeom.h:280
double ymax
Definition: liblwgeom.h:281
double ymin
Definition: liblwgeom.h:280
double zmax
Definition: liblwgeom.h:281
double xmin
Definition: liblwgeom.h:280

References centroid(), BOX3D::xmax, BOX3D::xmin, BOX3D::ymax, BOX3D::ymin, BOX3D::zmax, and BOX3D::zmin.

Referenced by gserialized_spgist_choose_3d(), and gserialized_spgist_picksplit_3d().

Here is the call graph for this function:
Here is the caller graph for this function: