mirror of https://github.com/CGAL/cgal
Add documentation
This commit is contained in:
parent
d6e6ce9dfb
commit
91e2e24d30
|
|
@ -0,0 +1,49 @@
|
||||||
|
/// \ingroup PkgPolygonMeshProcessingConcepts
|
||||||
|
/// \cgalConcept
|
||||||
|
///
|
||||||
|
/// The concept `PMPHolefillingVisitor` defines the requirements for the visitor
|
||||||
|
/// used in \link PMP_hole_filling_grp hole-filling-related functions \endlink to track
|
||||||
|
/// the creation of new faces and new edges.
|
||||||
|
/// The hole filling may use a 2D constrained triangulation
|
||||||
|
/// for almost planar holes. If that is not appropriate or fails it
|
||||||
|
/// may use an algorithm with at most quadratic running time. If that fails
|
||||||
|
/// it uses an algorithm with cubic running time.
|
||||||
|
///
|
||||||
|
/// \cgalRefines `CopyConstructible`
|
||||||
|
/// \cgalHasModel `CGAL::Polygon_mesh_processing::Holefilling::Default_visitor`.
|
||||||
|
|
||||||
|
class PMPHolefillingVisitor{
|
||||||
|
public:
|
||||||
|
|
||||||
|
/// called when the planar hole filling algorithm starts.
|
||||||
|
void start_planar_phase() const;
|
||||||
|
|
||||||
|
/// called when the planar hole filling algorithm stops.
|
||||||
|
/// @param success `true` when the hole could be filled in this phase.
|
||||||
|
void end_planar_phase(bool success) const;
|
||||||
|
|
||||||
|
/// called when the algorithm with quadratic running time starts.
|
||||||
|
/// @param N the upperbound on the number of steps
|
||||||
|
void start_quadratic_phase(int N) const;
|
||||||
|
|
||||||
|
/// called at each step. There may be less than `N` calls as this
|
||||||
|
/// is an upperbound.
|
||||||
|
void quadratic_step() const;
|
||||||
|
|
||||||
|
/// called when the algorithm with quadratic running time ends.
|
||||||
|
/// @param success `true` when the hole could be filled in this
|
||||||
|
/// phase.
|
||||||
|
void end_quadratic_phase(bool success) const;
|
||||||
|
|
||||||
|
/// called when the algorithm with cubic running time starts.
|
||||||
|
/// @param N the upperbound on the number of steps
|
||||||
|
void start_cubic_phase(int N) const;
|
||||||
|
|
||||||
|
/// called at each step. This will be called `N` times.
|
||||||
|
void cubic_step() const;
|
||||||
|
|
||||||
|
/// called when the algorithm with cubic running time ends.
|
||||||
|
void end_cubic_phase() const;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
@ -34,8 +34,15 @@
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
namespace Polygon_mesh_processing {
|
namespace Polygon_mesh_processing {
|
||||||
|
/** \ingroup PMP_hole_filling_grp
|
||||||
|
* Default hole filling visitor model of `PMPHolefillingVisitor`.
|
||||||
|
* All of its functions have an empty body. This class can be used as a
|
||||||
|
* base class if only some of the functions of the concept require to be
|
||||||
|
* overridden.
|
||||||
|
*/
|
||||||
|
namespace Hole_filling {
|
||||||
|
|
||||||
struct Hole_fill_visitor{
|
struct Default_visitor{
|
||||||
|
|
||||||
void start_planar_phase() const
|
void start_planar_phase() const
|
||||||
{}
|
{}
|
||||||
|
|
@ -63,6 +70,7 @@ namespace Polygon_mesh_processing {
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
} // namespace Hole_filling
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PMP_hole_filling_grp
|
\ingroup PMP_hole_filling_grp
|
||||||
|
|
@ -141,6 +149,12 @@ namespace Polygon_mesh_processing {
|
||||||
otherwise nothing will be done.}
|
otherwise nothing will be done.}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
|
|
||||||
|
\cgalParamNBegin{visitor}
|
||||||
|
\cgalParamDescription{a visitor used to track the progress made
|
||||||
|
in the algorithm}
|
||||||
|
\cgalParamType{}
|
||||||
|
\cgalParamNEnd
|
||||||
|
|
||||||
\cgalNamedParamsEnd
|
\cgalNamedParamsEnd
|
||||||
|
|
||||||
@return `out`
|
@return `out`
|
||||||
|
|
@ -206,7 +220,7 @@ namespace Polygon_mesh_processing {
|
||||||
CGAL_assertion(max_squared_distance >= typename GeomTraits::FT(0));
|
CGAL_assertion(max_squared_distance >= typename GeomTraits::FT(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
Hole_fill_visitor default_visitor;
|
Hole_filling::Default_visitor default_visitor;
|
||||||
|
|
||||||
return internal::triangulate_hole_polygon_mesh(
|
return internal::triangulate_hole_polygon_mesh(
|
||||||
pmesh,
|
pmesh,
|
||||||
|
|
@ -568,7 +582,7 @@ bool use_dt3 =
|
||||||
typedef typename std::iterator_traits<InIterator>::value_type Point;
|
typedef typename std::iterator_traits<InIterator>::value_type Point;
|
||||||
typedef typename CGAL::Kernel_traits<Point>::Kernel Kernel;
|
typedef typename CGAL::Kernel_traits<Point>::Kernel Kernel;
|
||||||
|
|
||||||
Hole_fill_visitor default_visitor;
|
Hole_filling::Default_visitor default_visitor;
|
||||||
|
|
||||||
#ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2
|
#ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2
|
||||||
if (use_cdt)
|
if (use_cdt)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue