mirror of https://github.com/CGAL/cgal
cleanup in CH3
This commit is contained in:
parent
625f9f6cd7
commit
61d0f9b698
|
|
@ -8,8 +8,8 @@ The class `Convex_hull_traits_3` serves as a traits class for the function
|
|||
function when `R` is a kernel with exact predicates but inexact constructions
|
||||
(note that the type `Plane_3` is a triple of `Point_3` and not `R::Plane_3`).
|
||||
|
||||
\cgalModels ::ConvexHullTraits_3
|
||||
\cgalModels ::IsStronglyConvexTraits_3
|
||||
\cgalModels `ConvexHullTraits_3`
|
||||
\cgalModels `IsStronglyConvexTraits_3`
|
||||
|
||||
*/
|
||||
template< typename R >
|
||||
|
|
|
|||
|
|
@ -12,42 +12,27 @@ the convex hull is stored in `P`.
|
|||
\pre There are at least four points in the range
|
||||
[`first`, `last`) not all of which are collinear.
|
||||
|
||||
The function `::convex_hull_3()` computes the convex hull of a given set of
|
||||
three-dimensional points
|
||||
Two versions of this function
|
||||
are available. The first can be used when it is known that the result
|
||||
will be a polyhedron and the second when a degenerate hull
|
||||
may also be possible.
|
||||
|
||||
\cgalRequires `InputIterator::value_type` is equivalent to `Traits::Point_3`.
|
||||
\cgalRequires `Traits` is a model of the concept `ConvexHullTraits_3`.
|
||||
\tparam InputIterator must be an input iterator with a value type equivalent to `Traits::Point_3`.
|
||||
\tparam Polyhedron_3 must be a model of `ConvexHullPolyhedron_3`.
|
||||
\tparam Traits must be a model of the concept `ConvexHullTraits_3`.
|
||||
For the purposes of checking the postcondition that the convex hull
|
||||
is valid, `Traits` should also be a model of the concept
|
||||
`IsStronglyConvexTraits_3`.
|
||||
\cgalRequires `Polyhedron_3` is a model of `ConvexHullPolyhedron_3`.
|
||||
|
||||
|
||||
If the kernel `R` of the points determined by `InputIterator::value_type`
|
||||
|
||||
If the kernel `R` of the points determined by the value type of `InputIterator`
|
||||
is a kernel with exact predicates but inexact constructions
|
||||
(in practice we check `R::Has_filtered_predicates_tag` is `Tag_true` and `R::FT` is a floating point type),
|
||||
then the default traits class of `::convex_hull_3()` is `Convex_hull_traits_3<R>`, and `R` otherwise.
|
||||
|
||||
\sa `CGAL::convex_hull_incremental_3()`
|
||||
\sa `convex_hull_incremental_3()`
|
||||
|
||||
### Implementation ###
|
||||
|
||||
The algorithm implemented by these functions is the quickhull algorithm of
|
||||
Barnard <I>et al.</I> \cite bdh-qach-96.
|
||||
|
||||
### Example ###
|
||||
|
||||
The following program computes the convex hull of a set of 250 random
|
||||
points chosen from a sphere of radius 100. It then determines if the resulting
|
||||
hull is a segment or a polyhedron. Notice that the traits class is not
|
||||
necessary in the call to `::convex_hull_3()` but is used in the definition
|
||||
of `Polyhedron_3`.
|
||||
|
||||
\cgalExample{Convex_hull_3/quickhull_3.cpp}
|
||||
|
||||
*/
|
||||
|
||||
|
|
@ -64,18 +49,17 @@ a triangle, or a polyhedron, is stored in `ch_object`.
|
|||
\attention This function does not compute the plane equations of the faces of `P`
|
||||
in case the result is a polyhedron.
|
||||
|
||||
\cgalRequires `InputIterator::value_type` is equivalent to `Traits::Point_3`.
|
||||
\cgalRequires `Traits` is a model of the concept `ConvexHullTraits_3`.
|
||||
\tparam InputIterator must be an input iterator with a value type equivalent to `Traits::Point_3`.
|
||||
\tparam Traits must be model of the concept `ConvexHullTraits_3`.
|
||||
For the purposes of checking the postcondition that the convex hull
|
||||
is valid, `Traits` should also be a model of the concept
|
||||
`IsStronglyConvexTraits_3`.
|
||||
\cgalRequires `Traits` defines a type `Polyhedron_3` that is a model of
|
||||
`IsStronglyConvexTraits_3`. Furthermore, `Traits` must define a type `Polyhedron_3` that is a model of
|
||||
`ConvexHullPolyhedron_3`.
|
||||
|
||||
If the kernel `R` of the points determined by `InputIterator::value_type`
|
||||
If the kernel `R` of the points determined by the value type of `InputIterator`
|
||||
is a kernel with exact predicates but inexact constructions
|
||||
(in practice we check `R::Has_filtered_predicates_tag` is `Tag_true` and `R::FT` is a floating point type),
|
||||
then the default traits class of `::convex_hull_3()` is `Convex_hull_traits_3<R>`, and `R` otherwise.
|
||||
then the default traits class of `convex_hull_3()` is `Convex_hull_traits_3<R>`, and `R` otherwise.
|
||||
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgConvexHull3Functions
|
||||
|
||||
The function `convex_hull_3_to_polyhedron_3` fills a polyhedron with the convex hull
|
||||
of a set of 3D points contained in a 3D triangulation of \cgal.
|
||||
fills a polyhedron with the convex hull of a set of 3D points contained in a 3D triangulation of \cgal.
|
||||
|
||||
The polyhedron `P` is cleared and the convex hull of the set of 3D points is stored in `P`.
|
||||
|
||||
|
|
@ -12,10 +11,10 @@ The polyhedron `P` is cleared and the convex hull of the set of 3D points is sto
|
|||
|
||||
\pre `T.dimension()`==3.
|
||||
|
||||
\cgalRequires `Triangulation` is a \cgal 3D triangulation.
|
||||
\cgalRequires `Polyhedron` is an instantiation of `CGAL::Polyhedron_3<Traits>`.
|
||||
\tparam Triangulation is a \cgal 3D triangulation.
|
||||
\tparam Polyhedron is an instantiation of `CGAL::Polyhedron_3<Traits>`.
|
||||
|
||||
\sa `CGAL::convex_hull_3`
|
||||
\sa `convex_hull_3`
|
||||
*/
|
||||
template <class Triangulation, class Polyhedron>
|
||||
void convex_hull_3_to_polyhedron_3(const Triangulation& T,Polyhedron& P);
|
||||
|
|
|
|||
|
|
@ -12,20 +12,22 @@ used to determine the correctness of the resulting polyhedron.
|
|||
|
||||
\attention This function is provided for completeness and educational
|
||||
purposes. When an efficient incremental implementation is needed,
|
||||
using `CGAL::Delaunay_triangulation_3` together with
|
||||
`CGAL::convex_hull_3_to_polyhedron_3` is highly recommended.
|
||||
using `Delaunay_triangulation_3` together with
|
||||
`convex_hull_3_to_polyhedron_3()` is highly recommended.
|
||||
|
||||
\cgalRequires `Polyhedron` must provide a type `Polyhedron::Traits`
|
||||
\tparam InputIterator must be an input iterator where the value type must be
|
||||
`Polyhedron::Traits::Point`.
|
||||
|
||||
\tparam Polyhedron must provide a type `Polyhedron::Traits`
|
||||
that defines the following types
|
||||
- `Polyhedron::Traits::R`, which is a model of
|
||||
the representation class `R` required by
|
||||
`CGAL::Convex_hull_d_traits_3<R>`
|
||||
`Convex_hull_d_traits_3<R>`
|
||||
- `Polyhedron::Traits::Point`
|
||||
\cgalRequires `InputIterator::value_type` must be the same as
|
||||
`Polyhedron::Traits::Point`.
|
||||
|
||||
|
||||
\sa `CGAL::convex_hull_3()`
|
||||
\sa `convex_hull_3()`
|
||||
\sa `Convex_hull_d`
|
||||
|
||||
### Implementation ###
|
||||
|
||||
|
|
@ -34,17 +36,6 @@ algorithm \cite cms-frric-93
|
|||
with `d` fixed to 3. The algorithm requires \f$ O(n^2)\f$ time in the
|
||||
worst case and \f$ O(n \log n)\f$ expected time.
|
||||
|
||||
\sa `CGAL::Convex_hull_d<R>`
|
||||
|
||||
### Example ###
|
||||
|
||||
The following example computes the convex hull of a set of 250 random
|
||||
points chosen uniformly in a sphere of radius 100.
|
||||
|
||||
\cgalExample{Convex_hull_3/incremental_hull_3.cpp}
|
||||
|
||||
|
||||
|
||||
*/
|
||||
template <class InputIterator, class Polyhedron>
|
||||
void
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgConvexityChecking
|
||||
|
||||
The function `is_strongly_convex_3` determines if the vertices of a given polyhedron
|
||||
determines if the vertices of a given polyhedron
|
||||
represents a strongly convex set of points or not. A set of points is said
|
||||
to be strongly convex if it consists of only extreme points (<I>i.e.</I>,
|
||||
to be strongly convex if it consists of only extreme points (i.e.,
|
||||
vertices of the convex hull).
|
||||
|
||||
The default traits class is the kernel in which the type
|
||||
|
|
|
|||
|
|
@ -6,8 +6,15 @@
|
|||
/// \defgroup PkgConvexHull3Traits Traits Classes
|
||||
/// \ingroup PkgConvexHull3
|
||||
|
||||
/// \defgroup PkgConvexHull3Functions Convex Hull Functions
|
||||
/// \ingroup PkgConvexHull3
|
||||
/*! \defgroup PkgConvexHull3Functions Convex Hull Functions
|
||||
\ingroup PkgConvexHull3
|
||||
The function `convex_hull_3()` computes the convex hull of a given set of
|
||||
three-dimensional points.
|
||||
|
||||
Two versions of this function are available. The first can be used when it
|
||||
is known that the result will be a polyhedron and the second when a
|
||||
degenerate hull may also be possible.
|
||||
*/
|
||||
|
||||
/// \defgroup PkgConvexityChecking Convexity Checking
|
||||
/// \ingroup PkgConvexHull3
|
||||
|
|
|
|||
Loading…
Reference in New Issue