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
2018-10-25 11:50:12 +02:00

35 lines
845 B
C
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* © 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