CGAL::bounding_box

Definition

The function bounding_box computes the bounding box of a set of 2D or 3D objects.

#include <CGAL/bounding_box.h>

There is a set of overloaded bounding_box functions for 2D and 3D objects. The user can also optionally pass an explicit kernel, in case the default, based on Kernel_traits is not sufficient. The dimension is also deduced automatically.

template < typename InputIterator >
K::Iso_rectangle_2
bounding_box ( InputIterator first,
InputIterator beyond)
computes the bounding box of a non-empty set of 2D points. K is Kernel_traits<std::iterator_traits<InputIterator>::value_type>::Kernel. The value type must be K::Point_2.
Precondition: first != beyond.

template < typename InputIterator, typename K >
K::Iso_rectangle_2
bounding_box ( InputIterator first,
InputIterator beyond,
K k)
computes the bounding box of a non-empty set of 2D points. The value type must be K::Point_2.
Precondition: first != beyond.

template < typename InputIterator >
K::Iso_cuboid_3
bounding_box ( InputIterator first,
InputIterator beyond)
computes the bounding box of a non-empty set of 3D points. K is Kernel_traits<std::iterator_traits<InputIterator>::value_type>::Kernel. The value type must be K::Point_3.
Precondition: first != beyond.

template < typename InputIterator, typename K >
K::Iso_cuboid_3
bounding_box ( InputIterator first,
InputIterator beyond,
K k)
computes the bounding box of a non-empty set of 3D points. The value type must be K::Point_3.
Precondition: first != beyond.