#ifndef BBOXES3_H #define BBOXES3_H #include "BBox3.h" #include class BBoxes3 { private: /** all contained bboxes */ std::vector bboxes; public: /** empty ctor */ BBoxes3() {;} /** ctor with entries */ BBoxes3(const std::vector& bboxes) : bboxes(bboxes) {;} /** add the given bbox */ void add(const BBox3& bbox) { bboxes.push_back(bbox); } /** get all contained bboxes */ const std::vector& 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