This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/grid/GridNodeBBox.h
2016-01-21 20:01:20 +01:00

25 lines
510 B
C
Executable File

#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