back to only points for bounding box

This commit is contained in:
Pierre Alliez 2008-12-02 15:19:30 +00:00
parent e0ac9c98ae
commit 7d5e6b119c
3 changed files with 4 additions and 20 deletions

View File

@ -1,7 +1,7 @@
\section{Examples\label{subsec:pca_examples}}
\subsection{Bounding Box}
In the following example we use \stl\ containers of 2D points, 3D points and 3D segments, and compute their axis-aligned bounding box. The kernel from which the input points originate is automatically deduced by the function.
In the following example we use \stl\ containers of 2D points and 3D points, and compute their axis-aligned bounding box. The kernel from which the input points originate is automatically deduced by the function.
\ccIncludeExampleCode{Principal_component_analysis/bounding_box.cpp}
\subsection{Centroid}

View File

@ -12,14 +12,11 @@
\ccDefinition
The function \ccRefName\ computes the axis-aligned bounding box of a set of 2D or 3D objects. The function is implemented for all \emph{bounded} objects from the 2D and 3D kernels such as points, segments, triangles, tetrahedra, etc. The bounding box is returned either as an iso rectangle in 2D or as an iso cuboid in 3D, the type being deduced automatically from the value type of the iterator range.
The function \ccRefName\ computes the axis-aligned bounding box of a set of 2D and 3D points. The bounding box is returned either as an iso rectangle in 2D or as an iso cuboid in 3D, the type being deduced automatically from the value type of the iterator range.
\ccInclude{CGAL/bounding_box.h}
There is a set of overloaded \ccc{bounding_box} functions for 2D and 3D objects.
The user can also optionally pass an explicit kernel, in case the default,
based on \ccc{Kernel_traits} is not sufficient.
The dimension is also deduced automatically.
There is a set of overloaded \ccc{bounding_box} functions for 2D and 3D points. The user can also optionally pass an explicit kernel, in case the default, based on \ccc{Kernel_traits} is not sufficient. The dimension is also deduced automatically.
\ccFunction{template < typename InputIterator >
K::Iso_rectangle_2

View File

@ -1,5 +1,4 @@
// Example program for the bounding_box() function for 2D points,
// 3D points and 3D segments.
// Example program for the bounding_box() function for 2D points and 3D points.
#include <CGAL/Cartesian.h>
#include <CGAL/bounding_box.h>
@ -12,7 +11,6 @@ typedef CGAL::Cartesian<FT> K;
typedef K::Point_2 Point_2;
typedef K::Point_3 Point_3;
typedef K::Point_3 Point_3;
typedef K::Segment_3 Segment_3;
int main()
{
@ -34,16 +32,5 @@ int main()
K::Iso_cuboid_3 c3 = CGAL::bounding_box(points_3.begin(), points_3.end());
std::cout << c3 << std::endl;
// axis-aligned bounding box of 3D segments
std::list<Segment_3> segments_3;
Point_3 p(1.0, 2.0, 3.0);
Point_3 q(4.0, 5.0, 6.0);
Point_3 r(3.0, 3.0, 0.5);
segments_3.push_back(Segment_3(p,q));
segments_3.push_back(Segment_3(p,r));
c3 = CGAL::bounding_box(segments_3.begin(), segments_3.end());
std::cout << c3 << std::endl;
return 0;
}