Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Is there an existing function to get the bbox of a polyhedron_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Is there an existing function to get the bbox of a polyhedron_3


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Is there an existing function to get the bbox of a polyhedron_3
  • Date: Fri, 30 May 2008 11:49:36 +0200

Max wrote:
> hi,
>
> I want to get the (axis aligned) bounding box of a given polyhedron_3.
> I don't know if there is an existing funtion to do this.
>
> thanks for any hints.
>
> B/Rgds
> Max
>

Hi Max,

There is no bbox() member function that caches and updates
the bbox whenever you change the Polyhedron_3.

The most compact piece of code for computing the bbox in linear time
looks like this


#include <CGAL/bounding_box.h>

Polyhedron_3 poly;


CGAL Bbox_3 bb = CGAL::bounding_box(poly.points_begin(),
points_end()).bbox();


andreas



Archive powered by MHonArc 2.6.16.

Top of Page