Fixed Point / Point_3 issues in T3 and improved the documentation

-- Do not use concept names as template names in the doc
-- Fixed point / point_3 issues and other problems of coherence between concept
and model
-- Fixed some wrong refinement relationships
This commit is contained in:
Mael Rouxel-Labbé 2017-05-19 16:59:59 +02:00
parent 971d916f5d
commit b0162b7ac0
17 changed files with 191 additions and 185 deletions

View File

@ -7,60 +7,61 @@ namespace CGAL {
The class `Delaunay_triangulation_3` represents a three-dimensional The class `Delaunay_triangulation_3` represents a three-dimensional
Delaunay triangulation. Delaunay triangulation.
\tparam DelaunayTriangulationTraits_3 is the geometric traits class. \tparam Traits is the geometric traits class and must be a model of `DelaunayTriangulationTraits_3`.
\tparam TriangulationDataStructure_3 is the triangulation data structure. \tparam TDS is the triangulation data structure and must be a model of `TriangulationDataStructure_3`.
It has the default value `Triangulation_data_structure_3<Triangulation_vertex_base_3<DelaunayTriangulationTraits_3>, `Default` may be used, with default type `Triangulation_data_structure_3<Triangulation_vertex_base_3<Traits>,
Delaunay_triangulation_cell_base_3<DelaunayTriangulationTraits_3> >`. Delaunay_triangulation_cell_base_3<Traits> >`.
`Default` may be used. Any custom type can be used instead of `Triangulation_vertex_base_3`
and `Delaunay_triangulation_cell_base_3`, provided that they are models of the
concepts `TriangulationVertexBase_3` and `DelaunayTriangulationCellBase_3`,
respectively.
\tparam LocationPolicy is a tag which must be a `Location_policy<Tag>`: \tparam LP is a tag which must be a `Location_policy<Tag>`:
either `Fast_location` or `Compact_location`. either `CGAL::Fast_location` or `CGAL::Compact_location`.
`Fast_location` offers faster (\f$ O(\log n)\f$ time) point `CGAL::Fast_location` offers faster (\f$ O(\log n)\f$ time) point
location, which can be beneficial when performing point locations or random location, which can be beneficial when performing point locations or random
point insertions (with no good location hint) in large data sets. point insertions (with no good location hint) in large data sets.
It is currently implemented using an additional triangulation It is currently implemented using an additional triangulation
hierarchy data structure \cgalCite{cgal:d-dh-02}. hierarchy data structure \cgalCite{cgal:d-dh-02}.
The default is `Compact_location`, which saves memory (3-5%) by avoiding the need for this The default is `CGAL::Compact_location`, which saves memory (3-5%) by avoiding the need for this
separate data structure, and point location is then performed roughly in separate data structure, and point location is then performed roughly in
\f$ O(n^{1/3})\f$ time. \f$ O(n^{1/3})\f$ time.
If the triangulation is parallel (see user manual), the default compact If the triangulation is parallel (see user manual), the default compact
location policy must be used. location policy must be used.
Note that this argument can also come in second position, which can be useful when Note that this argument can also come in second position, which can be useful when
the default value for the `TriangulationDataStructure_3` parameter is the default value for the `TDS` parameter is
satisfactory (this is using so-called deduced parameters). satisfactory (this is achieved using so-called deduced parameters).
Note that this argument replaces the functionality Note that this argument replaces the functionality
provided before \cgal 3.6 by `Triangulation_hierarchy_3`. provided before \cgal 3.6 by `Triangulation_hierarchy_3`.
An example of use can be found in the user An example of use can be found in the user
manual \ref Triangulation3exfastlocation. manual \ref Triangulation3exfastlocation.
\tparam SurjectiveLockDataStructure is an optional parameter to specify the type of the spatial lock data structure. \tparam SLDS is an optional parameter to specify the type of the spatial lock data structure.
It is only used if the triangulation data structure used is concurrency-safe (i.e.\ when
`TriangulationDataStructure_3::Concurrency_tag` is `Parallel_tag`).
It must be a model of the `SurjectiveLockDataStructure` concept, It must be a model of the `SurjectiveLockDataStructure` concept,
with `Object` being a `Point`. with `Object` being a `Point` (as defined below).
It is only used if the triangulation data structure used is concurrency-safe (i.e.\ when
`TDS::Concurrency_tag` is `CGAL::Parallel_tag`).
The default value is `Spatial_lock_grid_3<Tag_priority_blocking>` if The default value is `Spatial_lock_grid_3<Tag_priority_blocking>` if
the triangulation data structure is concurrency-safe, and `void` otherwise. the triangulation data structure is concurrency-safe, and `void` otherwise.
In order to use concurrent operations, the user must provide a In order to use concurrent operations, the user must provide a
reference to a `SurjectiveLockDataStructure` reference to a `SurjectiveLockDataStructure`
instance via the constructor or `Triangulation_3::set_lock_data_structure()`. instance via the constructor or `Triangulation_3::set_lock_data_structure()`.
If `TriangulationDataStructure_3::Concurrency_tag` is `Parallel_tag`, some operations, If `TDS::Concurrency_tag` is `CGAL::Parallel_tag`, some operations,
such as insertion/removal of a range of points, are performed in parallel. See such as insertion/removal of a range of points, are performed in parallel. See
the documentation of the operations for more details. the documentation of the operations for more details.
\sa `CGAL::Triangulation_3`
\sa `CGAL::Regular_triangulation_3` \sa `CGAL::Regular_triangulation_3`
*/ */
template< typename DelaunayTriangulationTraits_3, typename TriangulationDataStructure_3, typename LocationPolicy, typename SurjectiveLockDataStructure > template< typename Traits, typename TDS, typename LP, typename SLDS >
class Delaunay_triangulation_3 : class Delaunay_triangulation_3 :
public Triangulation_3<DelaunayTriangulationTraits_3, public Triangulation_3<Traits,
Delaunay_triangulation_3<DelaunayTriangulationTraits_3, Delaunay_triangulation_3<
TriangulationDataStructure_3, Traits, TDS, LP>::Triangulation_data_structure,
LocationPolicy>::Triangulation_data_structure, SLDS>
SurjectiveLockDataStructure
>
{ {
public: public:
@ -71,12 +72,22 @@ public:
/*! /*!
*/ */
typedef LocationPolicy Location_policy; typedef Traits Geom_traits;
/*! /*!
*/ */
typedef SurjectiveLockDataStructure Lock_data_structure; typedef TDS Triangulation_data_structure;
/*!
*/
typedef LP Location_policy;
/*!
*/
typedef SLDS Lock_data_structure;
/// @} /// @}
@ -88,22 +99,22 @@ In addition to those inherited, the following types are defined, for use by the
/*! /*!
*/ */
typedef DelaunayTriangulationTraits_3::Line_3 Line; typedef Geom_traits::Line_3 Line;
/*! /*!
*/ */
typedef DelaunayTriangulationTraits_3::Ray_3 Ray; typedef Geom_traits::Ray_3 Ray;
/*! /*!
*/ */
typedef DelaunayTriangulationTraits_3::Plane_3 Plane; typedef Geom_traits::Plane_3 Plane;
/*! /*!
*/ */
typedef DelaunayTriangulationTraits_3::Object_3 Object; typedef Geom_traits::Object_3 Object;
/// @} /// @}
@ -116,9 +127,8 @@ Creates an empty Delaunay triangulation, possibly specifying a traits class
`lock_ds` is an optional pointer to the lock data structure for parallel operations. It `lock_ds` is an optional pointer to the lock data structure for parallel operations. It
must be provided if concurrency is enabled. must be provided if concurrency is enabled.
*/ */
Delaunay_triangulation_3 Delaunay_triangulation_3(const Geom_traits& traits = Geom_traits(),
(const DelaunayTriangulationTraits_3& traits = DelaunayTriangulationTraits_3(), Lock_data_structure *lock_ds = NULL);
Lock_data_structure *lock_ds = NULL);
/*! /*!
Copy constructor. Copy constructor.
@ -134,16 +144,16 @@ If parallelism is enabled, the points will be inserted in parallel.
*/ */
template < class InputIterator > template < class InputIterator >
Delaunay_triangulation_3 (InputIterator first, InputIterator last, Delaunay_triangulation_3 (InputIterator first, InputIterator last,
const DelaunayTriangulationTraits_3& traits = DelaunayTriangulationTraits_3(), const Geom_traits& traits = Geom_traits(),
Lock_data_structure *lock_ds = NULL); Lock_data_structure *lock_ds = NULL);
/*! /*!
Same as before, with last two parameters in reverse order. Same as before, with last two parameters in reverse order.
*/ */
template < class InputIterator > template < class InputIterator >
Delaunay_triangulation_3 (InputIterator first, InputIterator last, Delaunay_triangulation_3 (InputIterator first, InputIterator last,
Lock_data_structure *lock_ds, Lock_data_structure *lock_ds,
const DelaunayTriangulationTraits_3& traits = DelaunayTriangulationTraits_3()); const Geom_traits& traits = Geom_traits());
/// @} /// @}

View File

@ -8,11 +8,11 @@ The class `Delaunay_triangulation_cell_base_3` is a model of the concept
`DelaunayTriangulationCellBase_3`. It is the default cell base class `DelaunayTriangulationCellBase_3`. It is the default cell base class
of Delaunay triangulations. of Delaunay triangulations.
\tparam DelaunayTriangulationTraits_3 is the geometric traits class. \tparam Traits is the geometric traits class and must be a model of `DelaunayTriangulationTraits_3`.
\tparam Cb must be a model of `TriangulationCellBase_3`. \tparam Cb must be a model of `TriangulationCellBase_3`.
By default, this parameter is instantiated by By default, this parameter is instantiated by
`Triangulation_cell_base_3<DelaunayTriangulationTraits_3>`. `Triangulation_cell_base_3<Traits>`.
\cgalModels `DelaunayTriangulationCellBase_3` \cgalModels `DelaunayTriangulationCellBase_3`
@ -22,13 +22,13 @@ By default, this parameter is instantiated by
*/ */
template< typename DelaunayTriangulationTraits_3, typename Cb > template< typename Traits, typename Cb >
class Delaunay_triangulation_cell_base_3 : public Cb { class Delaunay_triangulation_cell_base_3 : public Cb {
public: public:
/// \name Types /// \name Types
/// @{ /// @{
typedef DelaunayTriangulationTraits_3::Point_3 Point_3; typedef Traits::Point_3 Point;
/// @} /// @}
/*! \name Access function /*! \name Access function
@ -42,8 +42,7 @@ provides a `circumcenter()` member fonction.
/*! /*!
Returns the circumcenter of the cell Returns the circumcenter of the cell
*/ */
const Point_3& circumcenter( const Point& circumcenter(const Traits& gt = Traits()) const;
const DelaunayTriangulationTraits_3& gt = DelaunayTriangulationTraits_3()) const;
/// @} /// @}

View File

@ -13,12 +13,12 @@ Note that input/output operators discard this additional information.
All functions modifying the vertices of the cell invalidate the cached All functions modifying the vertices of the cell invalidate the cached
circumcenter. circumcenter.
\tparam DelaunayTriangulationTraits_3 is the geometric traits class. \tparam Traits is the geometric traits class and must be a model of `DelaunayTriangulationTraits_3`.
\tparam Cb is a cell base class from which \tparam Cb is a cell base class from which
`Delaunay_triangulation_cell_base_with_circumcenter_3` derives. Cb should `Delaunay_triangulation_cell_base_with_circumcenter_3` derives. Cb should
be a model of `DelaunayTriangulationCellBase_3`. be a model of `DelaunayTriangulationCellBase_3`.
It has the default value `Triangulation_cell_base_3<DelaunayTriangulationTraits_3>`. It has the default value `Triangulation_cell_base_3<Traits>`.
\cgalModels `DelaunayTriangulationCellBase_3` \cgalModels `DelaunayTriangulationCellBase_3`
@ -27,13 +27,13 @@ It has the default value `Triangulation_cell_base_3<DelaunayTriangulationTraits_
\sa `CGAL::Delaunay_triangulation_cell_base_3` \sa `CGAL::Delaunay_triangulation_cell_base_3`
*/ */
template< typename DelaunayTriangulationTraits_3, typename Cb > template< typename Traits, typename Cb >
class Delaunay_triangulation_cell_base_with_circumcenter_3 : public Cb { class Delaunay_triangulation_cell_base_with_circumcenter_3 : public Cb {
public: public:
/// \name Types /// \name Types
/// @{ /// @{
typedef DelaunayTriangulationTraits_3::Point_3 Point_3; typedef Traits::Point_3 Point;
/// @} /// @}
/*! \name Access function /*! \name Access function
@ -51,8 +51,7 @@ If it has already been computed in the past, the cached value is returned.
Computes the circumcenter of the tetrahedron, or retrieves it if already Computes the circumcenter of the tetrahedron, or retrieves it if already
computed computed
*/ */
const Point_3& circumcenter( const Point& circumcenter(Traits&gt = Traits()) const;
const DelaunayTriangulationTraits_3&gt = DelaunayTriangulationTraits_3()) const;
/// @} /// @}

View File

@ -28,8 +28,13 @@ of all simplices are regular.
\tparam Traits is the geometric traits class, and must be a model of `RegularTriangulationTraits_3` \tparam Traits is the geometric traits class, and must be a model of `RegularTriangulationTraits_3`
\tparam TDS is the triangulation data structure`TriangulationDataStructure_3`. \tparam TDS is the triangulation data structure and must be a model of `TriangulationDataStructure_3`.
It has the default value `Triangulation_data_structure_3<Triangulation_vertex_base_3<Traits>, Regular_triangulation_cell_base_3<Traits> >`. TDS has default value `Triangulation_data_structure_3<Regular_triangulation_vertex_base_3<Traits>,
Regular_triangulation_cell_base_3<Traits> >`.
Any custom type can be used instead of `Regular_triangulation_vertex_base_3`
and `Regular_triangulation_cell_base_3`, provided that they are models of the
concepts `RegularTriangulationVertexBase_3` and `RegularTriangulationCellBase_3`,
respectively.
`Default` may be used. `Default` may be used.
\tparam SLDS is an optional parameter to specify the type of the spatial lock data structure. \tparam SLDS is an optional parameter to specify the type of the spatial lock data structure.
@ -47,7 +52,9 @@ If `TDS::Concurrency_tag` is `Parallel_tag`, some operations,
such as insertion/removal of a range of points, are performed in parallel. See such as insertion/removal of a range of points, are performed in parallel. See
the documentation of the operations for more details. the documentation of the operations for more details.
\sa `CGAL::Triangulation_3`
\sa `CGAL::Delaunay_triangulation_3` \sa `CGAL::Delaunay_triangulation_3`
*/ */
template< typename Traits, typename TDS, typename SLDS > template< typename Traits, typename TDS, typename SLDS >
class Regular_triangulation_3 class Regular_triangulation_3
@ -84,17 +91,15 @@ Creates an empty regular triangulation, possibly specifying a traits class
`lock_ds` is an optional pointer to the lock data structure for parallel operations. It `lock_ds` is an optional pointer to the lock data structure for parallel operations. It
must be provided if concurrency is enabled. must be provided if concurrency is enabled.
*/ */
Regular_triangulation_3 Regular_triangulation_3(const Traits & traits = Traits(),
(const Traits & traits = Traits(), Lock_data_structure *lock_ds = NULL);
Lock_data_structure *lock_ds = NULL);
/*! /*!
Copy constructor. Copy constructor.
The pointer to the lock data structure is not copied. Thus, the copy won't be The pointer to the lock data structure is not copied. Thus, the copy won't be
concurrency-safe as long as the user has not called `Triangulation_3::set_lock_data_structure`. concurrency-safe as long as the user has not called `Triangulation_3::set_lock_data_structure`.
*/ */
Regular_triangulation_3 Regular_triangulation_3(const Regular_triangulation_3 & rt1);
(const Regular_triangulation_3 & rt1);
/*! /*!
Equivalent to constructing an empty triangulation with the optional Equivalent to constructing an empty triangulation with the optional
@ -104,16 +109,16 @@ If parallelism is enabled, the points will be inserted in parallel.
*/ */
template < class InputIterator > template < class InputIterator >
Regular_triangulation_3 (InputIterator first, InputIterator last, Regular_triangulation_3 (InputIterator first, InputIterator last,
const Traits& traits = Traits(), const Traits& traits = Traits(),
Lock_data_structure *lock_ds = NULL); Lock_data_structure *lock_ds = NULL);
/*! /*!
Same as before, with last two parameters in reverse order. Same as before, with last two parameters in reverse order.
*/ */
template < class InputIterator > template < class InputIterator >
Regular_triangulation_3 (InputIterator first, InputIterator last, Regular_triangulation_3 (InputIterator first, InputIterator last,
Lock_data_structure *lock_ds, Lock_data_structure *lock_ds,
const Traits& traits = Traits()); const Traits& traits = Traits());
/// @} /// @}
/*!\name Insertion /*!\name Insertion

View File

@ -8,12 +8,12 @@ The class `Regular_triangulation_cell_base_with_weighted_circumcenter_3` derives
`Cb`, a cell base class of a 3D triangulation. `Cb`, a cell base class of a 3D triangulation.
It is the default cell base class of regular triangulations. It is the default cell base class of regular triangulations.
\tparam RT is the geometric traits class. It must be a model of `RegularTriangulationTraits_3`. \tparam Traits is the geometric traits class. It must be a model of `RegularTriangulationTraits_3`.
\tparam Cb is a cell base class from which `Regular_triangulation_cell_base_3` \tparam Cb is a cell base class from which `Regular_triangulation_cell_base_3`
derives. It must be a model of `TriangulationCellBase_3`. derives. It must be a model of `TriangulationCellBase_3`.
By default, this parameter is instantiated by By default, this parameter is instantiated by
`Triangulation_cell_base_3<RT>`. `Triangulation_cell_base_3<Traits>`.
\cgalModels `RegularTriangulationCellBase_3` \cgalModels `RegularTriangulationCellBase_3`
@ -23,15 +23,15 @@ By default, this parameter is instantiated by
*/ */
template< typename RT, typename Cb > template< typename Traits, typename Cb >
class Regular_triangulation_cell_base_3 : public Cb { class Regular_triangulation_cell_base_3 : public Cb {
public: public:
/// \name Types /// \name Types
/// @{ /// @{
typedef RT::Weighted_point_3 Point; typedef Traits::Point_3 Point_3;
typedef RT::Point_3 Point_3; typedef Traits::Weighted_point_3 Point;
typedef std::list<Point> Point_container; typedef std::list<Point> Point_container;
@ -73,8 +73,7 @@ circumcenter is not supposed to be computed
by the constructor `Construct_weighted_circumcenter_3` of the traits by the constructor `Construct_weighted_circumcenter_3` of the traits
class, hence the returned point has no weight. class, hence the returned point has no weight.
*/ */
const Point_3& weighted_circumcenter( const Point_3& weighted_circumcenter(const Traits& gt = Traits()) const;
const RegularTriangulationTraits_3& gt = RegularTriangulationTraits_3()) const;
/// @} /// @}

View File

@ -13,12 +13,12 @@ Note that input/output operators discard this additional information.
All functions modifying the vertices of the cell invalidate the cached All functions modifying the vertices of the cell invalidate the cached
circumcenter. circumcenter.
\tparam RegularTriangulationTraits_3 is the geometric traits class. \tparam Traits is the geometric traits class and must be a model of `RegularTriangulationTraits_3`.
\tparam Cb is a cell base class from which \tparam Cb is a cell base class from which
`Regular_triangulation_cell_base_with_weighted_circumcenter_3` derives. Cb should `Regular_triangulation_cell_base_with_weighted_circumcenter_3` derives. Cb should
be a model of `RegularTriangulationCellBase_3`. be a model of `RegularTriangulationCellBase_3`.
It has the default value `Regular_triangulation_cell_base_3<RegularTriangulationTraits_3>`. It has the default value `Regular_triangulation_cell_base_3<RT>`.
\cgalModels `RegularTriangulationCellBase_3` \cgalModels `RegularTriangulationCellBase_3`
@ -27,13 +27,15 @@ It has the default value `Regular_triangulation_cell_base_3<RegularTriangulation
\sa `CGAL::Regular_triangulation_cell_base_3` \sa `CGAL::Regular_triangulation_cell_base_3`
*/ */
template< typename RegularTriangulationTraits_3, typename Cb > template< typename Traits, typename Cb >
class Regular_triangulation_cell_base_with_weighted_circumcenter_3 : public Cb { class Regular_triangulation_cell_base_with_weighted_circumcenter_3 : public Cb {
public: public:
/// \name Types /// \name Types
/// @{ /// @{
typedef RegularTriangulationTraits_3::Point_3 Point_3; typedef Traits::Point_3 Point_3;
typedef Traits::Weighted_point_3 Point;
/// @} /// @}
/*! \name Access function /*! \name Access function
@ -59,8 +61,7 @@ computed.
The returned point has no weight. The returned point has no weight.
*/ */
const Point_3& weighted_circumcenter( const Point_3& weighted_circumcenter(const Traits&gt = Traits()) const;
const RegularTriangulationTraits_3&gt = RegularTriangulationTraits_3()) const;
/*! /*!
Swaps the Regular_triangulation_cell_base_with_weighted_circumcenter_3 and other. Swaps the Regular_triangulation_cell_base_with_weighted_circumcenter_3 and other.

View File

@ -13,15 +13,14 @@ with some additional attributes (a color for example) tuned for a specific
application. application.
\tparam TriangulationTraits_3 is the geometric traits class \tparam Traits is the geometric traits class and must be a model of `RegularTriangulationTraits_3`.
which provides the point type `Weighted_point_3`.
Users of the geometric triangulations are strongly advised to use the same Users of the geometric triangulations are strongly advised to use the same
geometric traits class `TriangulationTraits_3` as the one used for geometric traits class as the one used in `Regular_triangulation_3`.
`Triangulation_3`. This way, the point type defined by the base vertex is This way, the point type defined by the base vertex is
the same as the point type defined by the geometric traits class. the same as the point type defined by the geometric traits class.
\tparam TriangulationDSVertexBase_3_ is a combinatorial vertex base class from which \tparam TDSVb is a combinatorial vertex base class from which
`RegularTriangulation_vertex_base_3` derives. `Regular_triangulation_vertex_base_3` derives.
It must be a model of the `TriangulationDSVertexBase_3` concept. It must be a model of the `TriangulationDSVertexBase_3` concept.
It has the default value `Triangulation_ds_vertex_base_3<TDS>`. It has the default value `Triangulation_ds_vertex_base_3<TDS>`.
@ -32,8 +31,8 @@ It has the default value `Triangulation_ds_vertex_base_3<TDS>`.
\sa `CGAL::Triangulation_vertex_base_with_info_3` \sa `CGAL::Triangulation_vertex_base_with_info_3`
*/ */
template< typename TriangulationTraits_3, typename TriangulationDSVertexBase_3_ > template< typename Traits, typename TDSVb >
class Regular_triangulation_vertex_base_3 : public TriangulationDSVertexBase_3_ { class Regular_triangulation_vertex_base_3 : public TDSVb {
public: public:
/// \name Types /// \name Types
@ -42,7 +41,7 @@ public:
/*! /*!
*/ */
typedef TriangulationTraits_3::Weighted_point_3 Point; typedef Traits::Weighted_point_3 Point;
/// @} /// @}

View File

@ -7,34 +7,36 @@ namespace CGAL {
The class `Triangulation_3` represents a 3-dimensional tetrahedralization The class `Triangulation_3` represents a 3-dimensional tetrahedralization
of points. of points.
\tparam TriangulationTraits_3 is the geometric traits class. \tparam Traits is the geometric traits class and must be a model of `TriangulationTraits_3`.
\tparam TriangulationDataStructure_3 is the triangulation data structure. \tparam TDS is the triangulation data structure and must be a model of `TriangulationDataStructure_3`.
It has the default value `Triangulation_data_structure_3< Triangulation_vertex_base_3<TriangulationTraits_3>,Triangulation_cell_base_3<TriangulationTraits_3> >`. `Default` may be used, with default type is `Triangulation_data_structure_3<Triangulation_vertex_base_3<Traits>,
`Default` may be used. Triangulation_cell_base_3<Traits> >`.
Any custom type can be used instead of `Triangulation_vertex_base_3`
and `Triangulation_cell_base_3`, provided that they are models of the
concepts `TriangulationVertexBase_3` and `TriangulationCellBase_3`,
respectively.
\tparam SurjectiveLockDataStructure is an optional parameter to specify the type of the spatial lock data structure. \tparam SLDS is an optional parameter to specify the type of the spatial lock data structure.
It must be a model of the `SurjectiveLockDataStructure` concept,
with `Object` being a `Point` (as defined below).
It is only used if the triangulation data structure used is concurrency-safe (i.e.\ when It is only used if the triangulation data structure used is concurrency-safe (i.e.\ when
`TriangulationDataStructure_3::Concurrency_tag` is `Parallel_tag`). `TriangulationDataStructure_3::Concurrency_tag` is `Parallel_tag`).
It must be a model of the `SurjectiveLockDataStructure` concept,
with `Object` being a `Point`.
The default value is `Spatial_lock_grid_3<Tag_priority_blocking>` if The default value is `Spatial_lock_grid_3<Tag_priority_blocking>` if
the triangulation data structure is concurrency-safe, and `void` otherwise. the triangulation data structure is concurrency-safe, and `void` otherwise.
In order to use concurrent operations, the user must provide a In order to use concurrent operations, the user must provide a
reference to a `SurjectiveLockDataStructure` reference to a SLDS instance via the constructor or `Triangulation_3::set_lock_data_structure`.
instance via the constructor or `Triangulation_3::set_lock_data_structure`.
\cgalHeading{Traversal of the Triangulation} \cgalHeading{Traversal of the Triangulation}
The triangulation class provides several iterators and circulators The triangulation class provides several iterators and circulators
that allow one to traverse it (completely or partially). that allow one to traverse it (completely or partially).
\sa `TriangulationDataStructure_3::Vertex` \sa `CGAL::Delaunay_triangulation_3`
\sa `TriangulationDataStructure_3::Cell` \sa `CGAL::Regular_triangulation_3`
*/ */
template< typename TriangulationTraits_3, typename TriangulationDataStructure_3, template< typename Traits, typename TDS, typename SLDS >
typename SurjectiveLockDataStructure >
class Triangulation_3 : public Triangulation_utils_3 { class Triangulation_3 : public Triangulation_utils_3 {
public: public:
@ -53,37 +55,37 @@ public:
/*! /*!
*/ */
typedef TriangulationDataStructure_3 Triangulation_data_structure; typedef Traits Geom_traits;
/*! /*!
*/ */
typedef SurjectiveLockDataStructure Lock_data_structure; typedef TDS Triangulation_data_structure;
/*! /*!
*/ */
typedef TriangulationTraits_3 Geom_traits; typedef SLDS Lock_data_structure;
/*! /*!
*/ */
typedef TriangulationDataStructure_3::Vertex::Point_3 Point; typedef Triangulation_data_structure::Vertex::Point Point;
/*! /*!
*/ */
typedef TriangulationTraits_3::Segment_3 Segment; typedef Geom_traits::Segment_3 Segment;
/*! /*!
*/ */
typedef TriangulationTraits_3::Triangle_3 Triangle; typedef Geom_traits::Triangle_3 Triangle;
/*! /*!
*/ */
typedef TriangulationTraits_3::Tetrahedron_3 Tetrahedron; typedef Geom_traits::Tetrahedron_3 Tetrahedron;
/// @} /// @}
@ -96,22 +98,22 @@ Only vertices (0-faces) and cells (3-faces) are stored. Edges (1-faces) and face
/*! /*!
*/ */
typedef TriangulationDataStructure_3::Vertex Vertex; typedef Triangulation_data_structure::Vertex Vertex;
/*! /*!
*/ */
typedef TriangulationDataStructure_3::Cell Cell; typedef Triangulation_data_structure::Cell Cell;
/*! /*!
*/ */
typedef TriangulationDataStructure_3::Facet Facet; typedef Triangulation_data_structure::Facet Facet;
/*! /*!
*/ */
typedef TriangulationDataStructure_3::Edge Edge; typedef Triangulation_data_structure::Edge Edge;
/// @} /// @}
@ -136,12 +138,12 @@ in containers such as `std::map` and `boost::unordered_map`.
/*! /*!
handle to a vertex handle to a vertex
*/ */
typedef TriangulationDataStructure_3::Vertex_handle Vertex_handle; typedef Triangulation_data_structure::Vertex_handle Vertex_handle;
/*! /*!
handle to a cell handle to a cell
*/ */
typedef TriangulationDataStructure_3::Cell_handle Cell_handle; typedef Triangulation_data_structure::Cell_handle Cell_handle;
/*! /*!
Reference to a simplex (vertex, edge, facet or cell) of the triangulation Reference to a simplex (vertex, edge, facet or cell) of the triangulation
@ -151,32 +153,32 @@ typedef Triangulation_simplex_3<Self> Simplex;
/*! /*!
Size type (an unsigned integral type) Size type (an unsigned integral type)
*/ */
typedef TriangulationDataStructure_3::size_type size_type; typedef Triangulation_data_structure::size_type size_type;
/*! /*!
Difference type (a signed integral type) Difference type (a signed integral type)
*/ */
typedef TriangulationDataStructure_3::difference_type difference_type; typedef Triangulation_data_structure::difference_type difference_type;
/*! /*!
iterator over cells iterator over cells
*/ */
typedef TriangulationDataStructure_3::Cell_iterator All_cells_iterator; typedef Triangulation_data_structure::Cell_iterator All_cells_iterator;
/*! /*!
iterator over facets iterator over facets
*/ */
typedef TriangulationDataStructure_3::Facet_iterator All_facets_iterator; typedef Triangulation_data_structure::Facet_iterator All_facets_iterator;
/*! /*!
iterator over edges iterator over edges
*/ */
typedef TriangulationDataStructure_3::Edge_iterator All_edges_iterator; typedef Triangulation_data_structure::Edge_iterator All_edges_iterator;
/*! /*!
iterator over vertices iterator over vertices
*/ */
typedef TriangulationDataStructure_3::Vertex_iterator All_vertices_iterator; typedef Triangulation_data_structure::Vertex_iterator All_vertices_iterator;
/*! /*!
iterator over finite cells iterator over finite cells
@ -207,17 +209,17 @@ typedef unspecified_type Point_iterator;
/*! /*!
circulator over all cells incident to a given edge circulator over all cells incident to a given edge
*/ */
typedef TriangulationDataStructure_3::Cell_circulator Cell_circulator; typedef Triangulation_data_structure::Cell_circulator Cell_circulator;
/*! /*!
circulator over all facets incident to a given edge circulator over all facets incident to a given edge
*/ */
typedef TriangulationDataStructure_3::Facet_circulator Facet_circulator; typedef Triangulation_data_structure::Facet_circulator Facet_circulator;
/*! /*!
Concurrency tag (from the TDS). Concurrency tag (from the TDS).
*/ */
typedef TriangulationDataStructure_3::Concurrency_tag Concurrency_tag; typedef Triangulation_data_structure::Concurrency_tag Concurrency_tag;
/// @} /// @}
@ -230,16 +232,14 @@ infinite vertex.
`lock_ds` is an optional pointer to the lock data structure for parallel operations. It `lock_ds` is an optional pointer to the lock data structure for parallel operations. It
must be provided if concurrency is enabled. must be provided if concurrency is enabled.
*/ */
Triangulation_3 Triangulation_3(const Geom_traits & traits = Geom_traits(),
(const TriangulationTraits_3 & traits = TriangulationTraits_3(),
Lock_data_structure *lock_ds = NULL); Lock_data_structure *lock_ds = NULL);
/*! /*!
Same as the previous one, but with parameters in reverse order. Same as the previous one, but with parameters in reverse order.
*/ */
Triangulation_3 Triangulation_3(Lock_data_structure *lock_ds = NULL,
(Lock_data_structure *lock_ds = NULL, const Geom_traits & traits = Geom_traits());
const TriangulationTraits_3 & traits = TriangulationTraits_3());
/*! /*!
Copy constructor. All vertices and faces are duplicated. Copy constructor. All vertices and faces are duplicated.
@ -254,8 +254,8 @@ traits class argument and calling `insert(first,last)`.
*/ */
template < class InputIterator> template < class InputIterator>
Triangulation_3 (InputIterator first, InputIterator last, Triangulation_3 (InputIterator first, InputIterator last,
const TriangulationTraits_3 & traits = TriangulationTraits_3(), const Geom_traits & traits = Geom_traits(),
Lock_data_structure *lock_ds = NULL); Lock_data_structure *lock_ds = NULL);
/// @} /// @}
@ -307,12 +307,12 @@ bool operator!=(const Triangulation_3<GT, Tds1> & t1, const Triangulation_3<GT,
/*! /*!
Returns a const reference to the geometric traits object. Returns a const reference to the geometric traits object.
*/ */
const TriangulationTraits_3 & geom_traits() const; const Geom_traits & geom_traits() const;
/*! /*!
Returns a const reference to the triangulation data structure. Returns a const reference to the triangulation data structure.
*/ */
const TriangulationDataStructure_3 & tds() const; const Triangulation_data_structure & tds() const;
/*! /*!
@ -322,7 +322,7 @@ This method is mainly a help for users implementing their own triangulation algo
The responsibility of keeping a valid triangulation belongs to the user when using advanced operations allowing a direct manipulation of the `tds`. The responsibility of keeping a valid triangulation belongs to the user when using advanced operations allowing a direct manipulation of the `tds`.
\cgalAdvancedEnd \cgalAdvancedEnd
*/ */
TriangulationDataStructure_3 & tds(); Triangulation_data_structure & tds();
/*! /*!
Returns the dimension of the affine hull. Returns the dimension of the affine hull.
@ -1358,7 +1358,7 @@ is_valid(bool verbose = false) const;
\cgalDebugFunction \cgalDebugFunction
\cgalDebugBegin \cgalDebugBegin
Checks the combinatorial validity of the cell by calling the Checks the combinatorial validity of the cell by calling the
`is_valid` method of the `TriangulationDataStructure_3` cell class. Also checks the `is_valid` method of the cell class. Also checks the
geometric validity of `c`, if `c` is finite. (See geometric validity of `c`, if `c` is finite. (See
Section \ref Triangulation3secintro.) Section \ref Triangulation3secintro.)

View File

@ -12,9 +12,10 @@ with some additional attributes (a color for example) tuned for a specific
application. application.
\tparam TriangulationTraits_3 is the geometric traits class. It is actually not used by this class. \tparam Traits is the geometric traits class and must be a model of `TriangulationTraits_3`.
It is actually not used by this class.
\tparam TriangulationDSCellBase_3_ is a combinatorial cell base class from which \tparam TDSCb is a combinatorial cell base class from which
`Triangulation_cell_base_3` derives. `Triangulation_cell_base_3` derives.
It must be a model of the `TriangulationDSCellBase_3` concept. It must be a model of the `TriangulationDSCellBase_3` concept.
It has the default value `Triangulation_ds_cell_base_3`. It has the default value `Triangulation_ds_cell_base_3`.
@ -23,11 +24,12 @@ It has the default value `Triangulation_ds_cell_base_3`.
\sa `CGAL::Triangulation_ds_cell_base_3` \sa `CGAL::Triangulation_ds_cell_base_3`
\sa `CGAL::Triangulation_cell_base_with_info_3` \sa `CGAL::Triangulation_cell_base_with_info_3`
\sa `CGAL::Triangulation_cell_base_with_circumcenter_3`
\sa `CGAL::Triangulation_vertex_base_3` \sa `CGAL::Triangulation_vertex_base_3`
*/ */
template< typename TriangulationTraits_3, typename TriangulationDSCellBase_3_ > template< typename Traits, typename TDSCb >
class Triangulation_cell_base_3 : public TriangulationDSCellBase_3_ { class Triangulation_cell_base_3 : public TDSCb {
public: public:
/// @} /// @}

View File

@ -18,26 +18,26 @@ Note that input/output operators discard this additional information.
All functions modifying the vertices of the cell, invalidate the cached All functions modifying the vertices of the cell, invalidate the cached
circumcenter. circumcenter.
\tparam TriangulationTraits_3 is the geometric traits class. \tparam Traits is the geometric traits class and must be a model of `TriangulationTraits_3`.
\tparam Cb is a cell base class from which \tparam Cb is a cell base class from which
`Triangulation_cell_base_with_circumcenter_3` derives. Cb should `Triangulation_cell_base_with_circumcenter_3` derives. Cb should
be a model of `TriangulationCellBase_3` or `DelaunayTriangulationCellBase_3`. be a model of `TriangulationCellBase_3` or `DelaunayTriangulationCellBase_3`.
It has the default value `Triangulation_cell_base_3<DelaunayTriangulationTraits_3>`. It has the default value `Triangulation_cell_base_3<Traits>`.
\cgalModels `TriangulationCellBase_3` \cgalModels `DelaunayTriangulationCellBase_3`
\sa `CGAL::Triangulation_cell_base_3` \sa `CGAL::Triangulation_cell_base_3`
\sa `CGAL::Triangulation_cell_base_with_info_3` \sa `CGAL::Triangulation_cell_base_with_info_3`
*/ */
template< typename TriangulationTraits_3, typename Cb > template< typename Traits, typename Cb >
class Triangulation_cell_base_with_circumcenter_3 : public Cb { class Triangulation_cell_base_with_circumcenter_3 : public Cb {
public: public:
/// \name Types /// \name Types
/// @{ /// @{
typedef TriangulationTraits_3::Point_3 Point_3; typedef Traits::Point_3 Point;
/// @} /// @}
/// \name Access Functions /// \name Access Functions
@ -47,8 +47,7 @@ typedef TriangulationTraits_3::Point_3 Point_3;
Computes the circumcenter of the tetrahedron, or retrieves it if already Computes the circumcenter of the tetrahedron, or retrieves it if already
computed computed
*/ */
const Point_3& circumcenter( const Point& circumcenter(const Traits& gt = Traits()) const;
const TriangulationTraits_3&gt = TriangulationTraits_3()) const;
/// @} /// @}

View File

@ -13,14 +13,13 @@ with some additional attributes (a color for example) tuned for a specific
application. application.
\tparam TriangulationTraits_3 is the geometric traits class \tparam Traits is the geometric traits class and must be a model of `TriangulationTraits_3`.
which provides the point type `Point_3`.
Users of the geometric triangulations are strongly advised to use the same Users of the geometric triangulations are strongly advised to use the same
geometric traits class `TriangulationTraits_3` as the one used for geometric traits class as the one used in `Triangulation_3`.
`Triangulation_3`. This way, the point type defined by the base vertex is This way, the point type defined by the base vertex is
the same as the point type defined by the geometric traits class. the same as the point type defined by the geometric traits class.
\tparam TriangulationDSVertexBase_3_ is a combinatorial vertex base class from which \tparam TDSVb is a combinatorial vertex base class from which
`Triangulation_vertex_base_3` derives. `Triangulation_vertex_base_3` derives.
It must be a model of the `TriangulationDSVertexBase_3` concept. It must be a model of the `TriangulationDSVertexBase_3` concept.
It has the default value `Triangulation_ds_vertex_base_3<TDS>`. It has the default value `Triangulation_ds_vertex_base_3<TDS>`.
@ -32,8 +31,8 @@ It has the default value `Triangulation_ds_vertex_base_3<TDS>`.
\sa `CGAL::Triangulation_vertex_base_with_info_3` \sa `CGAL::Triangulation_vertex_base_with_info_3`
*/ */
template< typename TriangulationTraits_3, typename TriangulationDSVertexBase_3_ > template< typename Traits, typename TDSVb >
class Triangulation_vertex_base_3 : public TriangulationDSVertexBase_3_ { class Triangulation_vertex_base_3 : public TDSVb {
public: public:
/// \name Types /// \name Types
@ -42,7 +41,7 @@ public:
/*! /*!
*/ */
typedef TriangulationTraits_3::Point_3 Point; typedef Traits::Point_3 Point;
/// @} /// @}

View File

@ -12,14 +12,12 @@ Note that input/output operators discard this additional information.
\tparam Info is the information the user would like to add \tparam Info is the information the user would like to add
to a vertex. It has to be `DefaultConstructible` and `Assignable`. to a vertex. It has to be `DefaultConstructible` and `Assignable`.
\tparam TriangulationTraits_3 is the geometric traits class \tparam Traits is the geometric traits class and must be a model of `TriangulationTraits_3`.
which provides the `Point_3`.
\tparam TriangulationVertexBase_3_ is a vertex base class from which \tparam Vb is a vertex base class from which
`Triangulation_vertex_base_with_info_3` derives. `Triangulation_vertex_base_with_info_3` derives.
It must be a model of the `TriangulationVertexBase_3` concept. It must be a model of the `TriangulationVertexBase_3` concept.
It has the default It has the default value `Triangulation_vertex_base_3<Traits>`.
value `Triangulation_vertex_base_3<TriangulationTraits_3>`.
\cgalModels `TriangulationVertexBase_3` \cgalModels `TriangulationVertexBase_3`
\cgalModels `TriangulationVertexBaseWithInfo_3` \cgalModels `TriangulationVertexBaseWithInfo_3`
@ -28,8 +26,8 @@ value `Triangulation_vertex_base_3<TriangulationTraits_3>`.
\sa `CGAL::Triangulation_vertex_base_3` \sa `CGAL::Triangulation_vertex_base_3`
*/ */
template< typename Info, typename TriangulationTraits_3, typename TriangulationVertexBase_3_ > template< typename Info, typename Traits, typename Vb >
class Triangulation_vertex_base_with_info_3 : public TriangulationVertexBase_3_ { class Triangulation_vertex_base_with_info_3 : public Vb {
public: public:
/// \name Types /// \name Types

View File

@ -22,6 +22,11 @@ in the cell an operator that computes its circumcenter.
class DelaunayTriangulationCellBase_3 { class DelaunayTriangulationCellBase_3 {
public: public:
/// \name Types
/// @{
typedef DelaunayTriangulationTraits_3::Point_3 Point;
/// @}
/// \name Access functions /// \name Access functions
/// @{ /// @{
/*! /*!
@ -30,8 +35,7 @@ Returns the circumcenter of the cell.
This operator is required only when the dual functions are called. This operator is required only when the dual functions are called.
*/ */
const DelaunayTriangulationTraits_3::Point_3& circumcenter( const Point& circumcenter(DelaunayTriangulationTraits_3&gt = DelaunayTriangulationTraits_3()) const;
const DelaunayTriangulationTraits_3&gt = DelaunayTriangulationTraits_3()) const;
/// @} /// @}

View File

@ -51,14 +51,10 @@ The ray type.
typedef unspecified_type Ray_3; typedef unspecified_type Ray_3;
/*! /*!
The (unweighted) point type. The weighted point type. It has to be a model of the concept `Kernel::WeightedPoint_3`.
It has to be a model of the concept `Kernel::Point_3`.
*/
typedef unspecified_type Point_3;
/*! \note The unweighted point type `Point_3` is requested by the concept
The weighted point type. It has to be a model of the concept `Kernel::WeightedPoint_3`, `TriangulationTraits_3`, which this concept refines.
and it must be implicitely convertible from and to `Point_3`.
*/ */
typedef unspecified_type Weighted_point_3; typedef unspecified_type Weighted_point_3;

View File

@ -43,13 +43,12 @@ class Delaunay_triangulation_cell_base_3
{ {
public: public:
typedef GT Geom_traits; typedef GT Geom_traits;
typedef typename Geom_traits::Point_3 Point_3; typedef typename Geom_traits::Point_3 Point;
template <typename GT_> template <typename GT_>
Point_3 Point circumcenter(const GT_& gt) const
circumcenter(const GT_& gt) const
{ {
BOOST_STATIC_ASSERT(boost::is_same<Point_3, BOOST_STATIC_ASSERT(boost::is_same<Point,
typename GT_::Construct_circumcenter_3::result_type>::value); typename GT_::Construct_circumcenter_3::result_type>::value);
return gt.construct_circumcenter_3_object()(this->vertex(0)->point(), return gt.construct_circumcenter_3_object()(this->vertex(0)->point(),
this->vertex(1)->point(), this->vertex(1)->point(),
@ -57,8 +56,7 @@ public:
this->vertex(3)->point()); this->vertex(3)->point());
} }
Point_3 Point circumcenter() const
circumcenter() const
{ {
return circumcenter(Geom_traits()); return circumcenter(Geom_traits());
} }

View File

@ -38,9 +38,9 @@ template < typename GT, typename Cb = Triangulation_cell_base_3<GT> >
class Delaunay_triangulation_cell_base_with_circumcenter_3 class Delaunay_triangulation_cell_base_with_circumcenter_3
: public Cb : public Cb
{ {
typedef typename GT::Point_3 Point_3; typedef typename GT::Point_3 Point;
mutable Point_3 * circumcenter_; mutable Point * circumcenter_;
public: public:
void invalidate_circumcenter() void invalidate_circumcenter()
@ -68,7 +68,7 @@ public:
Delaunay_triangulation_cell_base_with_circumcenter_3 Delaunay_triangulation_cell_base_with_circumcenter_3
(const Delaunay_triangulation_cell_base_with_circumcenter_3 &c) (const Delaunay_triangulation_cell_base_with_circumcenter_3 &c)
: Cb(c), circumcenter_(c.circumcenter_ != NULL ? new Point_3(*(c.circumcenter_)) : NULL) : Cb(c), circumcenter_(c.circumcenter_ != NULL ? new Point(*(c.circumcenter_)) : NULL)
{} {}
Delaunay_triangulation_cell_base_with_circumcenter_3& Delaunay_triangulation_cell_base_with_circumcenter_3&
@ -118,11 +118,10 @@ public:
Cb::set_vertices(v0, v1, v2, v3); Cb::set_vertices(v0, v1, v2, v3);
} }
const Point_3 & const Point& circumcenter(const Geom_traits& gt = Geom_traits()) const
circumcenter(const Geom_traits& gt = Geom_traits()) const
{ {
if (circumcenter_ == NULL) { if (circumcenter_ == NULL) {
circumcenter_ = new Point_3(this->Cb::circumcenter(gt)); circumcenter_ = new Point(this->Cb::circumcenter(gt));
} else { } else {
CGAL_expensive_assertion( CGAL_expensive_assertion(
this->Cb::circumcenter(gt) == *circumcenter); this->Cb::circumcenter(gt) == *circumcenter);

View File

@ -43,9 +43,9 @@ template < typename GT, typename Cb = Triangulation_cell_base_3<GT> >
class Triangulation_cell_base_with_circumcenter_3 class Triangulation_cell_base_with_circumcenter_3
: public Cb : public Cb
{ {
typedef typename GT::Point_3 Point_3; typedef typename GT::Point_3 Point;
mutable Point_3 * circumcenter_; mutable Point* circumcenter_;
public: public:
void invalidate_circumcenter() void invalidate_circumcenter()
@ -73,7 +73,7 @@ public:
Triangulation_cell_base_with_circumcenter_3 Triangulation_cell_base_with_circumcenter_3
(const Triangulation_cell_base_with_circumcenter_3 &c) (const Triangulation_cell_base_with_circumcenter_3 &c)
: Cb(c), circumcenter_(c.circumcenter_ != NULL ? new Point_3(*(c.circumcenter_)) : NULL) : Cb(c), circumcenter_(c.circumcenter_ != NULL ? new Point(*(c.circumcenter_)) : NULL)
{} {}
Triangulation_cell_base_with_circumcenter_3& Triangulation_cell_base_with_circumcenter_3&
@ -123,11 +123,10 @@ public:
Cb::set_vertices(v0, v1, v2, v3); Cb::set_vertices(v0, v1, v2, v3);
} }
const Point_3 & const Point& circumcenter(const Geom_traits& gt = Geom_traits()) const
circumcenter(const Geom_traits& gt = Geom_traits()) const
{ {
if (circumcenter_ == NULL) { if (circumcenter_ == NULL) {
circumcenter_ = new Point_3(this->Cb::circumcenter(gt)); circumcenter_ = new Point(this->Cb::circumcenter(gt));
} else { } else {
CGAL_expensive_assertion( CGAL_expensive_assertion(
this->Cb::circumcenter(gt) == *circumcenter); this->Cb::circumcenter(gt) == *circumcenter);