mirror of https://github.com/CGAL/cgal
Add Mpwh::bbox()
This commit is contained in:
parent
5d6874df85
commit
c8c67472b0
|
|
@ -101,6 +101,16 @@ public:
|
||||||
|
|
||||||
Size number_of_polygons_with_holes() const { return static_cast<Size>(m_polygons.size()); }
|
Size number_of_polygons_with_holes() const { return static_cast<Size>(m_polygons.size()); }
|
||||||
|
|
||||||
|
Bbox_2 bbox() const
|
||||||
|
{
|
||||||
|
Bbox_2 bb;
|
||||||
|
for(const auto& pwh : polygons_with_holes()){
|
||||||
|
bb += pwh.bbox();
|
||||||
|
}
|
||||||
|
return bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Polygon_with_holes_container m_polygons;
|
Polygon_with_holes_container m_polygons;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -45,5 +45,7 @@ int main()
|
||||||
|
|
||||||
std::cout << mp << std::endl;
|
std::cout << mp << std::endl;
|
||||||
|
|
||||||
|
CGAL::Bbox_2 bb = mp.bbox();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue