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/geo/BBoxes3.h
2018-10-25 11:59:10 +02:00

56 lines
1.0 KiB
C++
Raw 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 BBOXES3_H
#define BBOXES3_H
#include "BBox3.h"
#include <vector>
class BBoxes3 {
private:
/** all contained bboxes */
std::vector<BBox3> bboxes;
public:
/** empty ctor */
BBoxes3() {;}
/** ctor with entries */
BBoxes3(const std::vector<BBox3>& bboxes) : bboxes(bboxes) {;}
/** add the given bbox */
void add(const BBox3& bbox) {
bboxes.push_back(bbox);
}
/** get all contained bboxes */
const std::vector<BBox3>& get() const {
return bboxes;
}
/** does the compound contain the given point? */
bool contains(const Point3& p) const {
for (const BBox3& bb : bboxes) {
if (bb.contains(p)) {return true;}
}
return false;
}
};
#endif // BBOXES3_H