diff --git a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp index db4f83d3b89..7f1389b8ba4 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp @@ -293,22 +293,13 @@ void Scene_c3t3_item::compute_bbox() const _bbox = Bbox(); else { - bool bbox_init = false; - CGAL::Bbox_3 result; + CGAL::Bbox_3 result;//default is [+infinity; -infinity] for (Tr::Cell_handle c : c3t3().cells_in_complex()) { - if (bbox_init) - { - Tr::Vertex_handle v = (c->vertex(0) != c3t3().triangulation().infinite_vertex()) - ? c->vertex(0) : c->vertex(1); - result = result + v->point().bbox(); - } - else - { - for(int i = 0; i < 4; ++i) - result = c->vertex(i)->point().bbox(); - bbox_init = true; - } + Tr::Vertex_handle v = (c->vertex(0) != c3t3().triangulation().infinite_vertex()) + ? c->vertex(0) + : c->vertex(1); + result += v->point().bbox(); } _bbox = Bbox(result.xmin(), result.ymin(), result.zmin(), result.xmax(), result.ymax(), result.zmax());