diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h index 8213182be30..6ccff4252fc 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_3.h @@ -7,60 +7,61 @@ namespace CGAL { The class `Delaunay_triangulation_3` represents a three-dimensional 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. -It has the default value `Triangulation_data_structure_3, - Delaunay_triangulation_cell_base_3 >`. -`Default` may be used. +\tparam TDS is the triangulation data structure and must be a model of `TriangulationDataStructure_3`. +`Default` may be used, with default type `Triangulation_data_structure_3, + Delaunay_triangulation_cell_base_3 >`. +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`: -either `Fast_location` or `Compact_location`. -`Fast_location` offers faster (\f$ O(\log n)\f$ time) point +\tparam LP is a tag which must be a `Location_policy`: +either `CGAL::Fast_location` or `CGAL::Compact_location`. +`CGAL::Fast_location` offers faster (\f$ O(\log n)\f$ time) point location, which can be beneficial when performing point locations or random point insertions (with no good location hint) in large data sets. It is currently implemented using an additional triangulation 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 \f$ O(n^{1/3})\f$ time. If the triangulation is parallel (see user manual), the default compact location policy must be used. Note that this argument can also come in second position, which can be useful when -the default value for the `TriangulationDataStructure_3` parameter is -satisfactory (this is using so-called deduced parameters). +the default value for the `TDS` parameter is +satisfactory (this is achieved using so-called deduced parameters). Note that this argument replaces the functionality provided before \cgal 3.6 by `Triangulation_hierarchy_3`. An example of use can be found in the user manual \ref Triangulation3exfastlocation. -\tparam SurjectiveLockDataStructure 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`). +\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`. + 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` if the triangulation data structure is concurrency-safe, and `void` otherwise. In order to use concurrent operations, the user must provide a reference to a `SurjectiveLockDataStructure` 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 the documentation of the operations for more details. +\sa `CGAL::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 : - public Triangulation_3::Triangulation_data_structure, - SurjectiveLockDataStructure - > - + public Triangulation_3::Triangulation_data_structure, + SLDS> { public: @@ -70,13 +71,23 @@ public: /*! -*/ -typedef LocationPolicy Location_policy; +*/ +typedef Traits Geom_traits; + +/*! + +*/ +typedef TDS Triangulation_data_structure; /*! */ -typedef SurjectiveLockDataStructure Lock_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 must be provided if concurrency is enabled. */ -Delaunay_triangulation_3 -(const DelaunayTriangulationTraits_3& traits = DelaunayTriangulationTraits_3(), -Lock_data_structure *lock_ds = NULL); +Delaunay_triangulation_3(const Geom_traits& traits = Geom_traits(), + Lock_data_structure *lock_ds = NULL); /*! Copy constructor. @@ -134,16 +144,16 @@ If parallelism is enabled, the points will be inserted in parallel. */ template < class InputIterator > Delaunay_triangulation_3 (InputIterator first, InputIterator last, -const DelaunayTriangulationTraits_3& traits = DelaunayTriangulationTraits_3(), -Lock_data_structure *lock_ds = NULL); + const Geom_traits& traits = Geom_traits(), + Lock_data_structure *lock_ds = NULL); /*! Same as before, with last two parameters in reverse order. */ template < class InputIterator > Delaunay_triangulation_3 (InputIterator first, InputIterator last, -Lock_data_structure *lock_ds, -const DelaunayTriangulationTraits_3& traits = DelaunayTriangulationTraits_3()); + Lock_data_structure *lock_ds, + const Geom_traits& traits = Geom_traits()); /// @} diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_3.h index 9f9d3d947b0..81c84bbffa4 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_3.h @@ -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 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`. By default, this parameter is instantiated by -`Triangulation_cell_base_3`. +`Triangulation_cell_base_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 { public: /// \name Types /// @{ -typedef DelaunayTriangulationTraits_3::Point_3 Point_3; +typedef Traits::Point_3 Point; /// @} /*! \name Access function @@ -42,8 +42,7 @@ provides a `circumcenter()` member fonction. /*! Returns the circumcenter of the cell */ -const Point_3& circumcenter( - const DelaunayTriangulationTraits_3& gt = DelaunayTriangulationTraits_3()) const; +const Point& circumcenter(const Traits& gt = Traits()) const; /// @} diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h index d4101439d5b..c5f1dedfe98 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h @@ -13,12 +13,12 @@ Note that input/output operators discard this additional information. All functions modifying the vertices of the cell invalidate the cached 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 `Delaunay_triangulation_cell_base_with_circumcenter_3` derives. Cb should be a model of `DelaunayTriangulationCellBase_3`. -It has the default value `Triangulation_cell_base_3`. +It has the default value `Triangulation_cell_base_3`. \cgalModels `DelaunayTriangulationCellBase_3` @@ -27,13 +27,13 @@ It has the default value `Triangulation_cell_base_3 +template< typename Traits, typename Cb > class Delaunay_triangulation_cell_base_with_circumcenter_3 : public Cb { public: /// \name Types /// @{ -typedef DelaunayTriangulationTraits_3::Point_3 Point_3; +typedef Traits::Point_3 Point; /// @} /*! \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 computed */ -const Point_3& circumcenter( -const DelaunayTriangulationTraits_3> = DelaunayTriangulationTraits_3()) const; +const Point& circumcenter(Traits> = Traits()) const; /// @} diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h index b1a5b5e929d..2f6369302ed 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h @@ -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 TDS is the triangulation data structure`TriangulationDataStructure_3`. -It has the default value `Triangulation_data_structure_3, Regular_triangulation_cell_base_3 >`. +\tparam TDS is the triangulation data structure and must be a model of `TriangulationDataStructure_3`. +TDS has default value `Triangulation_data_structure_3, + Regular_triangulation_cell_base_3 >`. +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. \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 the documentation of the operations for more details. -\sa `CGAL::Delaunay_triangulation_3` +\sa `CGAL::Triangulation_3` +\sa `CGAL::Delaunay_triangulation_3` + */ template< typename Traits, typename TDS, typename SLDS > 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 must be provided if concurrency is enabled. */ -Regular_triangulation_3 -(const Traits & traits = Traits(), -Lock_data_structure *lock_ds = NULL); +Regular_triangulation_3(const Traits & traits = Traits(), + Lock_data_structure *lock_ds = NULL); /*! Copy constructor. 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`. */ -Regular_triangulation_3 -(const Regular_triangulation_3 & rt1); +Regular_triangulation_3(const Regular_triangulation_3 & rt1); /*! 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 > Regular_triangulation_3 (InputIterator first, InputIterator last, -const Traits& traits = Traits(), -Lock_data_structure *lock_ds = NULL); + const Traits& traits = Traits(), + Lock_data_structure *lock_ds = NULL); /*! Same as before, with last two parameters in reverse order. */ template < class InputIterator > Regular_triangulation_3 (InputIterator first, InputIterator last, -Lock_data_structure *lock_ds, -const Traits& traits = Traits()); + Lock_data_structure *lock_ds, + const Traits& traits = Traits()); /// @} /*!\name Insertion diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_3.h index c1cc10e9343..2ec4a8331cb 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_3.h @@ -8,12 +8,12 @@ The class `Regular_triangulation_cell_base_with_weighted_circumcenter_3` derives `Cb`, a cell base class of a 3D triangulation. 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` derives. It must be a model of `TriangulationCellBase_3`. By default, this parameter is instantiated by -`Triangulation_cell_base_3`. +`Triangulation_cell_base_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 { public: /// \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_container; @@ -73,8 +73,7 @@ circumcenter is not supposed to be computed by the constructor `Construct_weighted_circumcenter_3` of the traits class, hence the returned point has no weight. */ -const Point_3& weighted_circumcenter( - const RegularTriangulationTraits_3& gt = RegularTriangulationTraits_3()) const; +const Point_3& weighted_circumcenter(const Traits& gt = Traits()) const; /// @} diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h index c0a1a2913b4..f0490c9fe3f 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h @@ -13,12 +13,12 @@ Note that input/output operators discard this additional information. All functions modifying the vertices of the cell invalidate the cached 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 `Regular_triangulation_cell_base_with_weighted_circumcenter_3` derives. Cb should be a model of `RegularTriangulationCellBase_3`. -It has the default value `Regular_triangulation_cell_base_3`. +It has the default value `Regular_triangulation_cell_base_3`. \cgalModels `RegularTriangulationCellBase_3` @@ -27,13 +27,15 @@ It has the default value `Regular_triangulation_cell_base_3 +template< typename Traits, typename Cb > class Regular_triangulation_cell_base_with_weighted_circumcenter_3 : public Cb { public: /// \name Types /// @{ -typedef RegularTriangulationTraits_3::Point_3 Point_3; +typedef Traits::Point_3 Point_3; + +typedef Traits::Weighted_point_3 Point; /// @} /*! \name Access function @@ -59,8 +61,7 @@ computed. The returned point has no weight. */ -const Point_3& weighted_circumcenter( - const RegularTriangulationTraits_3> = RegularTriangulationTraits_3()) const; +const Point_3& weighted_circumcenter(const Traits> = Traits()) const; /*! Swaps the Regular_triangulation_cell_base_with_weighted_circumcenter_3 and other. diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_vertex_base_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_vertex_base_3.h index d99284da83f..2d0a4afb5bd 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_vertex_base_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_vertex_base_3.h @@ -13,15 +13,14 @@ with some additional attributes (a color for example) tuned for a specific application. -\tparam TriangulationTraits_3 is the geometric traits class - which provides the point type `Weighted_point_3`. +\tparam Traits is the geometric traits class and must be a model of `RegularTriangulationTraits_3`. Users of the geometric triangulations are strongly advised to use the same -geometric traits class `TriangulationTraits_3` as the one used for -`Triangulation_3`. This way, the point type defined by the base vertex is +geometric traits class as the one used in `Regular_triangulation_3`. +This way, the point type defined by the base vertex is the same as the point type defined by the geometric traits class. -\tparam TriangulationDSVertexBase_3_ is a combinatorial vertex base class from which -`RegularTriangulation_vertex_base_3` derives. +\tparam TDSVb is a combinatorial vertex base class from which +`Regular_triangulation_vertex_base_3` derives. It must be a model of the `TriangulationDSVertexBase_3` concept. It has the default value `Triangulation_ds_vertex_base_3`. @@ -32,8 +31,8 @@ It has the default value `Triangulation_ds_vertex_base_3`. \sa `CGAL::Triangulation_vertex_base_with_info_3` */ -template< typename TriangulationTraits_3, typename TriangulationDSVertexBase_3_ > -class Regular_triangulation_vertex_base_3 : public TriangulationDSVertexBase_3_ { +template< typename Traits, typename TDSVb > +class Regular_triangulation_vertex_base_3 : public TDSVb { public: /// \name Types @@ -42,7 +41,7 @@ public: /*! */ -typedef TriangulationTraits_3::Weighted_point_3 Point; +typedef Traits::Weighted_point_3 Point; /// @} diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 26be944932e..7870cabc94a 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -7,34 +7,36 @@ namespace CGAL { The class `Triangulation_3` represents a 3-dimensional tetrahedralization 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. -It has the default value `Triangulation_data_structure_3< Triangulation_vertex_base_3,Triangulation_cell_base_3 >`. -`Default` may be used. +\tparam TDS is the triangulation data structure and must be a model of `TriangulationDataStructure_3`. +`Default` may be used, with default type is `Triangulation_data_structure_3, + Triangulation_cell_base_3 >`. +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 `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` if the triangulation data structure is concurrency-safe, and `void` otherwise. In order to use concurrent operations, the user must provide a - reference to a `SurjectiveLockDataStructure` - instance via the constructor or `Triangulation_3::set_lock_data_structure`. + reference to a SLDS instance via the constructor or `Triangulation_3::set_lock_data_structure`. \cgalHeading{Traversal of the Triangulation} The triangulation class provides several iterators and circulators that allow one to traverse it (completely or partially). -\sa `TriangulationDataStructure_3::Vertex` -\sa `TriangulationDataStructure_3::Cell` +\sa `CGAL::Delaunay_triangulation_3` +\sa `CGAL::Regular_triangulation_3` */ -template< typename TriangulationTraits_3, typename TriangulationDataStructure_3, - typename SurjectiveLockDataStructure > +template< typename Traits, typename TDS, typename SLDS > class Triangulation_3 : public Triangulation_utils_3 { public: @@ -52,38 +54,38 @@ 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 */ -typedef TriangulationDataStructure_3::Vertex_handle Vertex_handle; +typedef Triangulation_data_structure::Vertex_handle Vertex_handle; /*! 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 @@ -151,32 +153,32 @@ typedef Triangulation_simplex_3 Simplex; /*! 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) */ -typedef TriangulationDataStructure_3::difference_type difference_type; +typedef Triangulation_data_structure::difference_type difference_type; /*! iterator over cells */ -typedef TriangulationDataStructure_3::Cell_iterator All_cells_iterator; +typedef Triangulation_data_structure::Cell_iterator All_cells_iterator; /*! iterator over facets */ -typedef TriangulationDataStructure_3::Facet_iterator All_facets_iterator; +typedef Triangulation_data_structure::Facet_iterator All_facets_iterator; /*! iterator over edges */ -typedef TriangulationDataStructure_3::Edge_iterator All_edges_iterator; +typedef Triangulation_data_structure::Edge_iterator All_edges_iterator; /*! iterator over vertices */ -typedef TriangulationDataStructure_3::Vertex_iterator All_vertices_iterator; +typedef Triangulation_data_structure::Vertex_iterator All_vertices_iterator; /*! iterator over finite cells @@ -207,17 +209,17 @@ typedef unspecified_type Point_iterator; /*! 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 */ -typedef TriangulationDataStructure_3::Facet_circulator Facet_circulator; +typedef Triangulation_data_structure::Facet_circulator Facet_circulator; /*! 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 must be provided if concurrency is enabled. */ -Triangulation_3 -(const TriangulationTraits_3 & traits = TriangulationTraits_3(), - Lock_data_structure *lock_ds = NULL); +Triangulation_3(const Geom_traits & traits = Geom_traits(), + Lock_data_structure *lock_ds = NULL); /*! Same as the previous one, but with parameters in reverse order. */ -Triangulation_3 -(Lock_data_structure *lock_ds = NULL, - const TriangulationTraits_3 & traits = TriangulationTraits_3()); +Triangulation_3(Lock_data_structure *lock_ds = NULL, + const Geom_traits & traits = Geom_traits()); /*! Copy constructor. All vertices and faces are duplicated. @@ -254,8 +254,8 @@ traits class argument and calling `insert(first,last)`. */ template < class InputIterator> Triangulation_3 (InputIterator first, InputIterator last, -const TriangulationTraits_3 & traits = TriangulationTraits_3(), -Lock_data_structure *lock_ds = NULL); + const Geom_traits & traits = Geom_traits(), + Lock_data_structure *lock_ds = NULL); /// @} @@ -307,12 +307,12 @@ bool operator!=(const Triangulation_3 & t1, const Triangulation_3 -class Triangulation_cell_base_3 : public TriangulationDSCellBase_3_ { +template< typename Traits, typename TDSCb > +class Triangulation_cell_base_3 : public TDSCb { public: /// @} diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_cell_base_with_circumcenter_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_cell_base_with_circumcenter_3.h index e7f07fb19a3..cf38763b578 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_cell_base_with_circumcenter_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_cell_base_with_circumcenter_3.h @@ -18,26 +18,26 @@ Note that input/output operators discard this additional information. All functions modifying the vertices of the cell, invalidate the cached 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 `Triangulation_cell_base_with_circumcenter_3` derives. Cb should be a model of `TriangulationCellBase_3` or `DelaunayTriangulationCellBase_3`. -It has the default value `Triangulation_cell_base_3`. +It has the default value `Triangulation_cell_base_3`. -\cgalModels `TriangulationCellBase_3` +\cgalModels `DelaunayTriangulationCellBase_3` \sa `CGAL::Triangulation_cell_base_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 { public: /// \name Types /// @{ -typedef TriangulationTraits_3::Point_3 Point_3; +typedef Traits::Point_3 Point; /// @} /// \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 computed */ -const Point_3& circumcenter( -const TriangulationTraits_3> = TriangulationTraits_3()) const; +const Point& circumcenter(const Traits& gt = Traits()) const; /// @} diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_vertex_base_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_vertex_base_3.h index da60403f75d..160b3074575 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_vertex_base_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_vertex_base_3.h @@ -13,14 +13,13 @@ with some additional attributes (a color for example) tuned for a specific application. -\tparam TriangulationTraits_3 is the geometric traits class - which provides the point type `Point_3`. +\tparam Traits is the geometric traits class and must be a model of `TriangulationTraits_3`. Users of the geometric triangulations are strongly advised to use the same -geometric traits class `TriangulationTraits_3` as the one used for -`Triangulation_3`. This way, the point type defined by the base vertex is +geometric traits class as the one used in `Triangulation_3`. +This way, the point type defined by the base vertex is 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. It must be a model of the `TriangulationDSVertexBase_3` concept. It has the default value `Triangulation_ds_vertex_base_3`. @@ -32,8 +31,8 @@ It has the default value `Triangulation_ds_vertex_base_3`. \sa `CGAL::Triangulation_vertex_base_with_info_3` */ -template< typename TriangulationTraits_3, typename TriangulationDSVertexBase_3_ > -class Triangulation_vertex_base_3 : public TriangulationDSVertexBase_3_ { +template< typename Traits, typename TDSVb > +class Triangulation_vertex_base_3 : public TDSVb { public: /// \name Types @@ -42,7 +41,7 @@ public: /*! */ -typedef TriangulationTraits_3::Point_3 Point; +typedef Traits::Point_3 Point; /// @} diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_vertex_base_with_info_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_vertex_base_with_info_3.h index 4a9f48e4cca..8c55cfe0610 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_vertex_base_with_info_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_vertex_base_with_info_3.h @@ -12,14 +12,12 @@ Note that input/output operators discard this additional information. \tparam Info is the information the user would like to add to a vertex. It has to be `DefaultConstructible` and `Assignable`. -\tparam TriangulationTraits_3 is the geometric traits class - which provides the `Point_3`. +\tparam Traits is the geometric traits class and must be a model of `TriangulationTraits_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. It must be a model of the `TriangulationVertexBase_3` concept. -It has the default -value `Triangulation_vertex_base_3`. +It has the default value `Triangulation_vertex_base_3`. \cgalModels `TriangulationVertexBase_3` \cgalModels `TriangulationVertexBaseWithInfo_3` @@ -28,8 +26,8 @@ value `Triangulation_vertex_base_3`. \sa `CGAL::Triangulation_vertex_base_3` */ -template< typename Info, typename TriangulationTraits_3, typename TriangulationVertexBase_3_ > -class Triangulation_vertex_base_with_info_3 : public TriangulationVertexBase_3_ { +template< typename Info, typename Traits, typename Vb > +class Triangulation_vertex_base_with_info_3 : public Vb { public: /// \name Types diff --git a/Triangulation_3/doc/Triangulation_3/Concepts/DelaunayTriangulationCellBase_3.h b/Triangulation_3/doc/Triangulation_3/Concepts/DelaunayTriangulationCellBase_3.h index ac00407bb13..3b1b2dc92ee 100644 --- a/Triangulation_3/doc/Triangulation_3/Concepts/DelaunayTriangulationCellBase_3.h +++ b/Triangulation_3/doc/Triangulation_3/Concepts/DelaunayTriangulationCellBase_3.h @@ -22,6 +22,11 @@ in the cell an operator that computes its circumcenter. class DelaunayTriangulationCellBase_3 { public: +/// \name Types +/// @{ +typedef DelaunayTriangulationTraits_3::Point_3 Point; +/// @} + /// \name Access functions /// @{ /*! @@ -30,8 +35,7 @@ Returns the circumcenter of the cell. This operator is required only when the dual functions are called. */ -const DelaunayTriangulationTraits_3::Point_3& circumcenter( -const DelaunayTriangulationTraits_3> = DelaunayTriangulationTraits_3()) const; +const Point& circumcenter(DelaunayTriangulationTraits_3> = DelaunayTriangulationTraits_3()) const; /// @} diff --git a/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationTraits_3.h b/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationTraits_3.h index 7e24e51bf85..bf16e8b37ef 100644 --- a/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationTraits_3.h +++ b/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationTraits_3.h @@ -51,14 +51,10 @@ The ray type. typedef unspecified_type Ray_3; /*! -The (unweighted) point type. -It has to be a model of the concept `Kernel::Point_3`. -*/ -typedef unspecified_type Point_3; +The weighted point type. It has to be a model of the concept `Kernel::WeightedPoint_3`. -/*! -The weighted point type. It has to be a model of the concept `Kernel::WeightedPoint_3`, -and it must be implicitely convertible from and to `Point_3`. +\note The unweighted point type `Point_3` is requested by the concept +`TriangulationTraits_3`, which this concept refines. */ typedef unspecified_type Weighted_point_3; diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_3.h index 2841d5d5d72..5e100ccdf78 100644 --- a/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_3.h +++ b/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_3.h @@ -43,13 +43,12 @@ class Delaunay_triangulation_cell_base_3 { public: typedef GT Geom_traits; - typedef typename Geom_traits::Point_3 Point_3; + typedef typename Geom_traits::Point_3 Point; template - Point_3 - circumcenter(const GT_& gt) const + Point circumcenter(const GT_& gt) const { - BOOST_STATIC_ASSERT(boost::is_same::value); return gt.construct_circumcenter_3_object()(this->vertex(0)->point(), this->vertex(1)->point(), @@ -57,8 +56,7 @@ public: this->vertex(3)->point()); } - Point_3 - circumcenter() const + Point circumcenter() const { return circumcenter(Geom_traits()); } diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h index 6845f35ce3d..d8e67ee9a5f 100644 --- a/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h +++ b/Triangulation_3/include/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h @@ -38,9 +38,9 @@ template < typename GT, typename Cb = Triangulation_cell_base_3 > class Delaunay_triangulation_cell_base_with_circumcenter_3 : public Cb { - typedef typename GT::Point_3 Point_3; + typedef typename GT::Point_3 Point; - mutable Point_3 * circumcenter_; + mutable Point * circumcenter_; public: void invalidate_circumcenter() @@ -68,7 +68,7 @@ public: Delaunay_triangulation_cell_base_with_circumcenter_3 (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& @@ -118,11 +118,10 @@ public: Cb::set_vertices(v0, v1, v2, v3); } - const Point_3 & - circumcenter(const Geom_traits& gt = Geom_traits()) const + const Point& circumcenter(const Geom_traits& gt = Geom_traits()) const { if (circumcenter_ == NULL) { - circumcenter_ = new Point_3(this->Cb::circumcenter(gt)); + circumcenter_ = new Point(this->Cb::circumcenter(gt)); } else { CGAL_expensive_assertion( this->Cb::circumcenter(gt) == *circumcenter); diff --git a/Triangulation_3/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h b/Triangulation_3/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h index 6bc10e85ee2..f3bb2c39de9 100644 --- a/Triangulation_3/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_cell_base_with_circumcenter_3.h @@ -43,9 +43,9 @@ template < typename GT, typename Cb = Triangulation_cell_base_3 > class Triangulation_cell_base_with_circumcenter_3 : public Cb { - typedef typename GT::Point_3 Point_3; + typedef typename GT::Point_3 Point; - mutable Point_3 * circumcenter_; + mutable Point* circumcenter_; public: void invalidate_circumcenter() @@ -73,7 +73,7 @@ public: Triangulation_cell_base_with_circumcenter_3 (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& @@ -123,11 +123,10 @@ public: Cb::set_vertices(v0, v1, v2, v3); } - const Point_3 & - circumcenter(const Geom_traits& gt = Geom_traits()) const + const Point& circumcenter(const Geom_traits& gt = Geom_traits()) const { if (circumcenter_ == NULL) { - circumcenter_ = new Point_3(this->Cb::circumcenter(gt)); + circumcenter_ = new Point(this->Cb::circumcenter(gt)); } else { CGAL_expensive_assertion( this->Cb::circumcenter(gt) == *circumcenter);