#ifndef GRIDNODEBBOX_H #define GRIDNODEBBOX_H #include "GridPoint.h" #include "../geo/BBox2.h" /** * describes the 2D (one floor) * bounding-box for one node on the grid */ struct GridNodeBBox : public BBox2 { /** ctor */ GridNodeBBox(const GridPoint& center, const int gridSize_cm) { p1.x = center.x_cm - gridSize_cm/2; // smaller half p1.y = center.y_cm - gridSize_cm/2; p2.x = center.x_cm + gridSize_cm/2; // larger half p2.y = center.y_cm + gridSize_cm/2; } }; #endif // GRIDNODEBBOX_H