PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ nextCubeBox3D()

static CubeBox3D * nextCubeBox3D ( CubeBox3D cube_box,
BOX3D centroid,
uint8  octant 
)
static

Definition at line 225 of file gserialized_spgist_3d.c.

226{
227 CubeBox3D *next_cube_box = (CubeBox3D *)palloc(sizeof(CubeBox3D));
228
229 memcpy(next_cube_box, cube_box, sizeof(CubeBox3D));
230
231 if (octant & 0x20)
232 next_cube_box->left.xmin = centroid->xmin;
233 else
234 next_cube_box->left.xmax = centroid->xmin;
235
236 if (octant & 0x10)
237 next_cube_box->right.xmin = centroid->xmax;
238 else
239 next_cube_box->right.xmax = centroid->xmax;
240
241 if (octant & 0x08)
242 next_cube_box->left.ymin = centroid->ymin;
243 else
244 next_cube_box->left.ymax = centroid->ymin;
245
246 if (octant & 0x04)
247 next_cube_box->right.ymin = centroid->ymax;
248 else
249 next_cube_box->right.ymax = centroid->ymax;
250
251 if (octant & 0x02)
252 next_cube_box->left.zmin = centroid->zmin;
253 else
254 next_cube_box->left.zmax = centroid->zmin;
255
256 if (octant & 0x01)
257 next_cube_box->right.zmin = centroid->zmax;
258 else
259 next_cube_box->right.zmax = centroid->zmax;
260
261 return next_cube_box;
262}
Datum centroid(PG_FUNCTION_ARGS)
double xmax
Definition liblwgeom.h:340
double zmin
Definition liblwgeom.h:339
double ymax
Definition liblwgeom.h:340
double ymin
Definition liblwgeom.h:339
double zmax
Definition liblwgeom.h:340
double xmin
Definition liblwgeom.h:339

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

Referenced by gserialized_spgist_inner_consistent_3d().

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