/* * © Copyright 2014 – Urheberrechtshinweis * Alle Rechte vorbehalten / All Rights Reserved * * Programmcode ist urheberrechtlich geschuetzt. * Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner. * Keine Verwendung ohne explizite Genehmigung. * (vgl. § 106 ff UrhG / § 97 UrhG) */ #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