Fixed abusing Triangulation_cell_base_3 for Delaunay triangulations

TriangulationCellBase_3 does not request a circumcenter;
DelaunayTriangulationCellBase_3 does.

Delaunay_triangulation_3 only compiled because
Triangulation_cell_base_3 (and Triangulation_ds_cell_base_3 !)
provided circumcenter() operators and DT3 inherited T3's TDS.

- The circumcenter() functions are removed where they shouldn't exist
- DT3 uses DT_cell_base_3 as cell base instead of T_cell_base_3
- Concepts/Classes that supposedly only required TriangulationCellBase_3
  and then built Delaunay triangulations with that (Alpha Shapes, etc.)
  are upgraded to request DelaunayTriangulationCellBase_3 (anyway, it
  wouldn't compile if you actually provided a model of
  TriangulationCellBase_3)
- Fixed various wrong templates in classes/concepts such as
  MeshVertexBase_3 not refining RegularTriangulationVertexBase_3
  and (only in the doc) defaulting to Triangulation_vertex_base_3
- Removed the deprecated class (for 4+ years) T_cell_base_with_circumcenter
This commit is contained in:
Mael Rouxel-Labbé 2018-04-26 13:06:21 +02:00
parent a8e28b02c6
commit a0427ec756
48 changed files with 234 additions and 220 deletions

View File

@ -23,8 +23,7 @@
#include <CGAL/license/Advancing_front_surface_reconstruction.h>
#include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
namespace CGAL {
@ -36,9 +35,9 @@ namespace CGAL {
\tparam Traits has to be a model of `DelaunayTriangulationTraits_3`.
\tparam Cb has to be a model of `TriangulationCellBase_3`.
\tparam Cb has to be a model of `DelaunayTriangulationCellBase_3`.
*/
template < typename Traits, typename Cb = Triangulation_cell_base_3<Traits> >
template < typename Traits, typename Cb = Delaunay_triangulation_cell_base_3<Traits> >
class Advancing_front_surface_reconstruction_cell_base_3 : public Cb
{

View File

@ -10,7 +10,7 @@ The class `Alpha_shape_cell_base_3` is the default model for the concept
\tparam Traits is the geometric traits class that is provided
to the `Alpha_shape_3` class.
\tparam Cb must be a cell base class adapted to the type of triangulation that is being used.
By default, it is instantiated with `Triangulation_cell_base_3<Traits>`,
By default, it is instantiated with `Delaunay_triangulation_cell_base_3<Traits>`,
which is appropriate for basic alpha shapes.
\tparam ExactAlphaComparisonTag is a tag that, when set to
\link Tag_true `Tag_true`\endlink, triggers exact comparisons between alpha values. See the description
@ -21,7 +21,7 @@ and \link Tag_false `Tag_false`\endlink otherwise. The default is \link Tag_fals
\cgalModels `AlphaShapeCell_3`
\sa `Triangulation_cell_base_3`
\sa `Delaunay_triangulation_cell_base_3`
\sa `Regular_triangulation_cell_base_3`
\sa `Periodic_3_triangulation_ds_cell_base_3`
*/

View File

@ -10,13 +10,13 @@ The class `Fixed_alpha_shape_cell_base_3` is the default model for the concept
\tparam Traits is the geometric traits class that is provided
to the `Alpha_shape_3` class.
\tparam Cb must be a cell base class adapted to the type of triangulation that is being used.
By default, it is instantiated with `Triangulation_cell_base_3<Traits>`,
By default, it is instantiated with `Delaunay_triangulation_cell_base_3<Traits>`,
which is appropriate for basic alpha shapes.
\cgalModels `FixedAlphaShapeCell_3`
\sa `Alpha_shape_cell_base_3`
\sa `Triangulation_cell_base_3`
\sa `Delaunay_triangulation_cell_base_3`
\sa `Regular_triangulation_cell_base_3`
\sa `Periodic_3_triangulation_ds_cell_base_3`
*/

View File

@ -5,7 +5,7 @@
The concept `AlphaShapeCell_3` describes the requirements for the base cell of an alpha shape.
\cgalRefines `TriangulationCellBase_3`, if the underlying triangulation of the alpha shape is a Delaunay triangulation.
\cgalRefines `DelaunayTriangulationCellBase_3`, if the underlying triangulation of the alpha shape is a Delaunay triangulation.
\cgalRefines `RegularTriangulationCellBase_3`, if the underlying triangulation of the alpha shape is a regular triangulation.
\cgalRefines `Periodic_3TriangulationDSCellBase_3`, if the underlying triangulation of the alpha shape is a periodic triangulation.

View File

@ -5,7 +5,7 @@
The concept `FixedAlphaShapeCell_3` describes the requirements for the base cell of a alpha shape with a fixed value alpha.
\cgalRefines `TriangulationCellBase_3`, if the underlying triangulation of the alpha shape is a Delaunay triangulation.
\cgalRefines `DelaunayTriangulationCellBase_3`, if the underlying triangulation of the alpha shape is a Delaunay triangulation.
\cgalRefines `RegularTriangulationCellBase_3`, if the underlying triangulation of the alpha shape is a regular triangulation.
\cgalRefines `Periodic_3TriangulationDSCellBase_3`, if the underlying triangulation of the alpha shape is a periodic triangulation.

View File

@ -25,7 +25,7 @@
#include <vector>
#include <CGAL/Compact_container.h>
#include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/internal/Lazy_alpha_nt_3.h>
#include <CGAL/Default.h>
@ -61,9 +61,9 @@ template < class Gt,
class ExactAlphaComparisonTag = Tag_false,
class Weighted_tag = Tag_false >
class Alpha_shape_cell_base_3
: public Default::Get<Cb_, Triangulation_cell_base_3<Gt> >::type
: public Default::Get<Cb_, Delaunay_triangulation_cell_base_3<Gt> >::type
{
typedef typename Default::Get<Cb_, Triangulation_cell_base_3<Gt> >::type Cb;
typedef typename Default::Get<Cb_, Delaunay_triangulation_cell_base_3<Gt> >::type Cb;
public:
typedef typename Cb::Vertex_handle Vertex_handle;
typedef typename Cb::Cell_handle Cell_handle;

View File

@ -28,12 +28,12 @@
#include <vector>
#include <CGAL/Compact_container.h>
#include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/internal/Classification_type.h>
namespace CGAL {
template < class Gt, class Cb = Triangulation_cell_base_3<Gt> >
template < class Gt, class Cb = Delaunay_triangulation_cell_base_3<Gt> >
class Fixed_alpha_shape_cell_base_3
: public Cb
{

View File

@ -6,6 +6,7 @@
#include <CGAL/Surface_mesh.h>
#include <CGAL/Triangulation_2.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Linear_cell_complex_for_combinatorial_map.h>
#include <CGAL/Linear_cell_complex_for_generalized_map.h>
#include <CGAL/boost/graph/graph_traits_Arrangement_2.h>
@ -27,7 +28,7 @@ typedef CGAL::Triangulation_2<Kernel> Triangulation_2;
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Triangulation_data_structure_3<
CGAL::Triangulation_vertex_base_3<Kernel>,
CGAL::Triangulation_cell_base_3<Kernel>,
CGAL::Delaunay_triangulation_cell_base_3<Kernel>,
CGAL::Parallel_tag> Tds;
typedef CGAL::Delaunay_triangulation_3<Kernel, Tds> Triangulation_3;
#endif

View File

@ -16,8 +16,8 @@ the faces of the input complex. It must be a model
of the concept `MeshDomain_3`.
\tparam Vb is the vertex base class. It has to be a model
of the concept `TriangulationVertexBase_3` and defaults to
`Triangulation_vertex_base_3<Gt>`.
of the concept `RegularTriangulationVertexBase_3` and defaults to
`Regular_triangulation_vertex_base_3<Gt>`.
\cgalModels `MeshVertexBase_3`

View File

@ -4,9 +4,8 @@
The concept `MeshVertexBase_3` describes the requirements
for the `Vertex` type of the triangulation
used by a 3D mesh generation process. The type `MeshVertexBase_3` refines both the concept `TriangulationVertexBase_3`
and
the concept `SurfaceMeshVertexBase_3`.
used by a 3D mesh generation process. The type `MeshVertexBase_3` refines both
the concept `RegularTriangulationVertexBase_3` and the concept `SurfaceMeshVertexBase_3`.
It provides additional members to store and retrieve
information about the location of the vertex with respect
to the input domain describing the domain to be discretized.

View File

@ -29,10 +29,11 @@
#include <CGAL/license/Mesh_3.h>
#include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/Triangulation_data_structure_3.h>
#include <CGAL/Regular_triangulation_3.h>
#include <CGAL/Regular_triangulation_cell_base_3.h>
#include <CGAL/Regular_triangulation_vertex_base_3.h>
#include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <CGAL/boost/iterator/transform_iterator.hpp>
@ -54,8 +55,11 @@ class Triangulation_sizing_field
typedef typename Tr::Weighted_point Weighted_point;
typedef typename Gt::FT FT;
typedef Triangulation_vertex_base_with_info_3<FT, Gt> Vb;
typedef Triangulation_cell_base_3<Gt> Cb;
typedef Triangulation_vertex_base_with_info_3<FT, Gt> Vbb;
typedef Regular_triangulation_vertex_base_3<Gt, Vb> Vb;
typedef Triangulation_cell_base_3<Gt> Cbb;
typedef Regular_triangulation_cell_base_3<
Gt, Cbb, Discard_hidden_points> Cb;
typedef Triangulation_data_structure_3<Vb, Cb> Tds;
typedef Regular_triangulation_3<Gt,Tds> Compact_triangulation;
typedef Compact_triangulation Ctr;

View File

@ -12,10 +12,10 @@ the triangulation type to be used for the 3D periodic triangulation embedding th
`Default` may be used, with default value `Kernel_traits<MD>::%Kernel`.
\tparam Vertex_base must be a model of `MeshVertexBase_3` and `Periodic_3TriangulationDSVertexBase_3`.
`Default` may be used, with default value `Mesh_vertex_base_3<Gt, MD, Triangulation_vertex_base_3<Gt, Periodic_3_triangulation_ds_vertex_base_3> >`.
`Default` may be used, with default value `Mesh_vertex_base_3<Gt, MD, Regular_triangulation_vertex_base_3<Gt, Periodic_3_triangulation_ds_vertex_base_3> >`.
\tparam Cell_base must be a model of `MeshCellBase_3` and `Periodic_3TriangulationDSCellBase_3`.
`Default` may be used, with default value `Mesh_cell_base_3<Gt, MD, Triangulation_cell_base_with_circumcenter_3<Gt, Triangulation_cell_base_3<Gt, Periodic_3_triangulation_ds_cell_base_3> > >`.
`Default` may be used, with default value `Mesh_cell_base_3<Gt, MD, Regular_triangulation_cell_base_with_weighted_circumcenter_3<Gt, Regular_triangulation_cell_base_3<Gt, Periodic_3_triangulation_ds_cell_base_3> > >`.
\warning The input traits `Gt` are wrapped multiple times to handle periodicity
and to improve the robustness of the meshing process: for example,

View File

@ -33,6 +33,7 @@
#include <CGAL/surface_reconstruction_points_assertions.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_cell_base_with_info_3.h>
#include <CGAL/algorithm.h>
@ -173,8 +174,12 @@ struct Reconstruction_triangulation_default_geom_traits_3 : public BaseGt
template <class BaseGt,
class Gt = Reconstruction_triangulation_default_geom_traits_3<BaseGt>,
class Tds_ = Triangulation_data_structure_3<Reconstruction_vertex_base_3<Gt>, Triangulation_cell_base_with_info_3<int,Gt> > >
class Reconstruction_triangulation_3 : public Delaunay_triangulation_3<Gt,Tds_>
class Tds_ = Triangulation_data_structure_3<
Reconstruction_vertex_base_3<Gt>,
Delaunay_triangulation_cell_base_3<
Gt, Triangulation_cell_base_with_info_3<int, Gt> > > >
class Reconstruction_triangulation_3
: public Delaunay_triangulation_3<Gt, Tds_>
{
// Private types
private:

View File

@ -27,6 +27,7 @@
#include <CGAL/value_type_traits.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <CGAL/iterator.h>
#include <CGAL/use.h>
@ -755,7 +756,8 @@ public:
typedef std::vector<Point_3> Polyline_3;
typedef Triangulation_vertex_base_with_info_3<int, Kernel> VB_with_id;
typedef Triangulation_data_structure_3<VB_with_id> TDS;
typedef Delaunay_triangulation_cell_base_3<Kernel> CB;
typedef Triangulation_data_structure_3<VB_with_id, CB> TDS;
typedef Delaunay_triangulation_3<Kernel, TDS> Triangulation;
typedef typename Triangulation::Finite_edges_iterator Finite_edges_iterator;

View File

@ -7,6 +7,7 @@
#include "Color_ramp.h"
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <CGAL/Timer.h>
#include <CGAL/Memory_sizer.h>
@ -245,8 +246,9 @@ Cluster_classification::Cluster_classification(Scene_points_with_normal_item* po
#endif
// Compute neighborhood
typedef CGAL::Triangulation_vertex_base_with_info_3<int, Kernel> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Triangulation_vertex_base_with_info_3<int, Kernel> Vb;
typedef CGAL::Delaunay_triangulation_cell_base_3<Kernel> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<Kernel, Tds> Delaunay;
Delaunay dt (boost::make_transform_iterator

View File

@ -38,8 +38,8 @@ typedef K::Triangle_3 Triangle_3;
typedef K::Iso_cuboid_3 Iso_cuboid_3;
typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned int, K> Vb1;
typedef CGAL::Alpha_shape_vertex_base_3<K, Vb1> Vb;
typedef CGAL::Alpha_shape_cell_base_3<K> Fb;
typedef CGAL::Alpha_shape_vertex_base_3<K, Vb1> Vb;
typedef CGAL::Alpha_shape_cell_base_3<K> Fb;
typedef CGAL::Triangulation_data_structure_3<Vb,Fb> Tds;
typedef CGAL::Delaunay_triangulation_3<K,Tds> Triangulation_3;

View File

@ -72,12 +72,14 @@ namespace CGAL {
* scale. It must be a Boolean_tag type.
*/
template < class GeomTraits, class FixedSurface >
class Shape_construction_3 {
class Shape_construction_3
{
typedef Triangulation_vertex_base_with_info_3< unsigned int, GeomTraits > Vb;
typedef Alpha_shape_vertex_base_3< GeomTraits, Vb > aVb;
typedef Triangulation_cell_base_with_info_3< unsigned int, GeomTraits > Cb;
typedef Alpha_shape_cell_base_3< GeomTraits, Cb > aCb;
typedef Triangulation_data_structure_3<aVb,aCb> Tds;
typedef Alpha_shape_vertex_base_3< GeomTraits, Vb > aVb;
typedef Triangulation_cell_base_with_info_3< unsigned int, GeomTraits > Cbb;
typedef Delaunay_triangulation_cell_base_3< GeomTraits, Cbb > Cb;
typedef Alpha_shape_cell_base_3< GeomTraits, Cb > aCb;
typedef Triangulation_data_structure_3<aVb,aCb> Tds;
public:
/// \name Types
@ -157,14 +159,15 @@ public:
// The type for the shape of a set of points with fixed scale.
template < class GeomTraits >
class Shape_construction_3 < GeomTraits, Tag_true > {
class Shape_construction_3 < GeomTraits, Tag_true >
{
typedef Triangulation_vertex_base_with_info_3< unsigned int, GeomTraits > Vb;
typedef Fixed_alpha_shape_vertex_base_3< GeomTraits, Vb > aVb;
typedef Triangulation_cell_base_with_info_3< unsigned int, GeomTraits > Cb;
typedef Fixed_alpha_shape_cell_base_3< GeomTraits, Cb > aCb;
typedef Fixed_alpha_shape_vertex_base_3< GeomTraits, Vb > aVb;
typedef Triangulation_cell_base_with_info_3< unsigned int, GeomTraits > Cbb;
typedef Delaunay_triangulation_cell_base_3< GeomTraits, Cbb > Cb;
typedef Fixed_alpha_shape_cell_base_3< GeomTraits, Cb > aCb;
typedef Triangulation_data_structure_3<aVb,aCb> Tds;
typedef Triangulation_data_structure_3<aVb,aCb> Tds;
public:
typedef Tds Triangulation_data_structure;

View File

@ -59,6 +59,7 @@
// For Voronoi diagram
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
// For debugging macro
@ -247,7 +248,8 @@ public:
typedef CGAL::Exact_predicates_exact_constructions_kernel Exact_kernel;
typedef CGAL::Triangulation_vertex_base_with_info_3
<vertex_descriptor, Exact_kernel> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Delaunay_triangulation_cell_base_3<Exact_kernel> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<Exact_kernel, Tds> Delaunay;
typedef typename Delaunay::Point Exact_point;
typedef typename Delaunay::Cell_handle Cell_handle;

View File

@ -62,16 +62,19 @@ class QTreeWidgetItem;
#include <CGAL/Surface_mesh_vertex_base_3.h>
#include <CGAL/Triangulation_cell_base_with_info_3.h>
#include <CGAL/Surface_mesh_cell_base_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Surface_mesh_complex_2_in_triangulation_3.h>
#include <CGAL/Surface_mesh_default_criteria_3.h>
#include <CGAL/Implicit_surface_3.h>
#include <CGAL/Surface_mesh_traits_generator_3.h>
typedef CGAL::Surface_mesh_vertex_base_3<Kernel> Vb;
typedef CGAL::Triangulation_cell_base_with_info_3<unsigned char, Kernel> Cb1;
typedef CGAL::Surface_mesh_cell_base_3<Kernel, Cb1> Cb2;
typedef CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3<Kernel, Cb2> Cb;
typedef CGAL::Delaunay_triangulation_cell_base_3<Kernel, Cb1> Cb2;
typedef CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3<Kernel, Cb2> Cb3;
typedef CGAL::Surface_mesh_cell_base_3<Kernel, Cb3> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<Kernel, Tds> Tr;
typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<Tr> C2t3;

View File

@ -6,15 +6,15 @@ namespace CGAL {
The class `Surface_mesh_cell_base_3` is a model of the concept
`SurfaceMeshCellBase_3`.
It is designed to serve as vertex base class
It is designed to serve as cell base class
in a triangulation class `Tr`
plugged in a `Surface_mesh_complex_2_in_triangulation_3<Tr>`
class.
\tparam Gt is the geometric traits class.
\tparam Cb must be a model of the concept `TriangulationCellBase_3`
and defaults to `Triangulation_cell_base_3 <GT>`.
\tparam Cb must be a model of the concept `DelaunayTriangulationCellBase_3`
and defaults to `Delaunay_triangulation_cell_base_3<GT>`.
\cgalModels `SurfaceMeshCellBase_3`

View File

@ -21,7 +21,8 @@ a three dimensional triangulation type
The concept `SurfaceMeshCellBase_3` describes the cell base type
required in this triangulation type.
\cgalRefines `TriangulationCellBase_3`
\cgalRefines `DelaunayTriangulationCellBase_3`
The concept `SurfaceMeshCellBase_3` adds four markers to mark
the facets of the triangulation that belong to the two dimensional
complex, and four markers that are helpers used in some operations to

View File

@ -26,9 +26,7 @@
#include <CGAL/license/Surface_mesher.h>
#include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <bitset>
#include <string>
@ -36,7 +34,7 @@
namespace CGAL {
template < class GT, class Cb = Triangulation_cell_base_3 <GT> >
template < class GT, class Cb = Delaunay_triangulation_cell_base_3 <GT> >
class Complex_2_in_triangulation_cell_base_3 : public Cb {
public:

View File

@ -105,4 +105,4 @@ namespace CGAL {
} // namespace CGAL
#endif // CGAL_COMPLEX_2_IN_TRIANGULATION_CELL_BASE_3_H
#endif // CGAL_COMPLEX_2_IN_TRIANGULATION_VERTEX_BASE_3_H

View File

@ -23,8 +23,8 @@
#include <CGAL/license/Surface_mesher.h>
#include <CGAL/Complex_2_in_triangulation_cell_base_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#ifdef CGAL_MESH_3_IO_H
#include <string>
@ -36,7 +36,7 @@
namespace CGAL {
template < class GT, class Cb=Triangulation_cell_base_3<GT> >
template < class GT, class Cb = Delaunay_triangulation_cell_base_3<GT> >
class Surface_mesh_cell_base_3 :
public Complex_2_in_triangulation_cell_base_3<GT, Cb>
{

View File

@ -208,19 +208,6 @@ public:
bool is_valid(bool = false, int = 0) const
{ return true; }
// This is here in the *ds*_cell_base to ease its use as default
// template parameter, so that the .dual() functions of Delaunay_3
// still work.
template < typename Traits >
typename Traits::Point_3
circumcenter(const Traits& gt) const
{
return gt.construct_circumcenter_3_object()(this->vertex(0)->point(),
this->vertex(1)->point(),
this->vertex(2)->point(),
this->vertex(3)->point());
}
// For use by Compact_container.
void * for_compact_container() const { return N[0].for_compact_container(); }
void * & for_compact_container() { return N[0].for_compact_container(); }

View File

@ -95,7 +95,7 @@ typedef CGAL::Spatial_lock_grid_3<CGAL::Tag_priority_blocking> Lock_ds;
// Delaunay T3
typedef CGAL::Triangulation_data_structure_3<
CGAL::Triangulation_vertex_base_3<K>,
CGAL::Triangulation_cell_base_3<K>,
CGAL::Delaunay_triangulation_cell_base_3<K>,
CGAL::Parallel_tag > DT_Tds;
typedef CGAL::Delaunay_triangulation_3<
K, DT_Tds, CGAL::Default, Lock_ds> DT3;

View File

@ -89,14 +89,16 @@ private:
typedef CGAL::Spatial_lock_grid_3<
CGAL::Tag_priority_blocking> Lock_ds;
typedef CGAL::Triangulation_data_structure_3<
Vertex_base<Kernel>,
CGAL::Triangulation_ds_cell_base_3<>,
CGAL::Parallel_tag > Tds;
Vertex_base<Kernel>,
CGAL::Delaunay_triangulation_cell_base_3<Kernel>,
CGAL::Parallel_tag > Tds;
typedef CGAL::Delaunay_triangulation_3<
Kernel, Tds, CGAL::Default, Lock_ds> DT3;
#else
typedef CGAL::Triangulation_data_structure_3< Vertex_base<Kernel> > Tds;
typedef CGAL::Triangulation_data_structure_3<
Vertex_base<Kernel>,
CGAL::Delaunay_triangulation_cell_base_3<Kernel> > Tds;
typedef CGAL::Delaunay_triangulation_3<
Kernel, Tds/*, CGAL::Fast_location*/> DT3;
#endif

View File

@ -41,7 +41,8 @@ int main()
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_with_info_3<CGAL::Color, K> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Delaunay_triangulation_cell_base_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;
typedef Delaunay::Point Point;

View File

@ -18,12 +18,10 @@ circumcenter.
\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<Traits>`.
It has the default value `Delaunay_triangulation_cell_base_3<Traits>`.
\cgalModels `DelaunayTriangulationCellBase_3`
\sa `CGAL::Triangulation_cell_base_3`
\sa `CGAL::Triangulation_cell_base_with_info_3`
\sa `CGAL::Delaunay_triangulation_cell_base_3`
*/

View File

@ -563,7 +563,7 @@ We will use the following types of triangulations, using
<LI><B>Delaunay - %Fast location</B> : `Delaunay_triangulation_3` with `Fast_location`
<LI><B>Regular</B> : `Regular_triangulation_3` (default setting : memorize hidden points)
<LI><B>Regular - No hidden points</B> : `Regular_triangulation_3` with hidden points discarded (using
`Triangulation_cell_base_3` instead of `Regular_triangulation_cell_base_3`).
the template parameter `CGAL::Discard_hidden_points` for the cell base class).
</UL>
\cgalFigureRef{Triangulation3figbenchmarks} shows, for all these types of

View File

@ -1,5 +1,7 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_3.h>
template < class GT, class Vb = CGAL::Triangulation_vertex_base_3<GT> >
@ -32,11 +34,12 @@ public:
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_data_structure_3<My_vertex_base<K> > Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;
typedef CGAL::Delaunay_triangulation_cell_base_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<My_vertex_base<K>, Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;
typedef Delaunay::Vertex_handle Vertex_handle;
typedef Delaunay::Point Point;
typedef Delaunay::Vertex_handle Vertex_handle;
typedef Delaunay::Point Point;
int main()
{

View File

@ -1,15 +1,19 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <CGAL/IO/Color.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_with_info_3<CGAL::Color, K> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Delaunay_triangulation_cell_base_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;
typedef Delaunay::Point Point;
typedef Delaunay::Point Point;
int main()
{

View File

@ -5,9 +5,9 @@
#include <vector>
#include <cassert>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Delaunay_triangulation_3<K, CGAL::Fast_location> Delaunay;
typedef Delaunay::Point Point;
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Delaunay_triangulation_3<K, CGAL::Fast_location> Delaunay;
typedef Delaunay::Point Point;
int main()
{

View File

@ -1,11 +1,14 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned, K> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Delaunay_triangulation_cell_base_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
//Use the Fast_location tag. Default or Compact_location works too.
typedef CGAL::Delaunay_triangulation_3<K, Tds, CGAL::Fast_location> Delaunay;
typedef Delaunay::Point Point;

View File

@ -1,12 +1,16 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <CGAL/boost/iterator/transform_iterator.hpp>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned, K> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Delaunay_triangulation_cell_base_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;
typedef Delaunay::Point Point;

View File

@ -1,12 +1,18 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <boost/iterator/zip_iterator.hpp>
#include <iostream>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned, K> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Delaunay_triangulation_cell_base_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;
typedef Delaunay::Point Point;

View File

@ -1,6 +1,9 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/point_generators_3.h>
#include <CGAL/Triangulation_vertex_base_3.h>
#include <iostream>
#include <fstream>
@ -13,12 +16,12 @@ int main()
// Delaunay T3
typedef CGAL::Triangulation_data_structure_3<
CGAL::Triangulation_vertex_base_3<K>,
CGAL::Triangulation_cell_base_3<K>,
CGAL::Parallel_tag> Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Triangulation;
CGAL::Triangulation_vertex_base_3<K>,
CGAL::Delaunay_triangulation_cell_base_3<K>,
CGAL::Parallel_tag> Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Triangulation;
typedef Triangulation::Point Point;
typedef Triangulation::Point Point;
const int NUM_INSERTED_POINTS = 5000;

View File

@ -1,6 +1,10 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Regular_triangulation_3.h>
#include <CGAL/Regular_triangulation_cell_base_3.h>
#include <CGAL/Regular_triangulation_vertex_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <cassert>
#include <vector>

View File

@ -1,7 +1,10 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/point_generators_3.h>
#include <CGAL/Real_timer.h>
#include <CGAL/Triangulation_vertex_base_3.h>
#include <iostream>
#include <fstream>
@ -35,9 +38,9 @@ int main()
// Parallel Delaunay T3
#ifdef CGAL_LINKED_WITH_TBB
typedef CGAL::Triangulation_data_structure_3<
CGAL::Triangulation_vertex_base_3<K>,
CGAL::Triangulation_cell_base_3<K>,
CGAL::Parallel_tag> ParallelTds;
CGAL::Triangulation_vertex_base_3<K>,
CGAL::Delaunay_triangulation_cell_base_3<K>,
CGAL::Parallel_tag> ParallelTds;
typedef CGAL::Delaunay_triangulation_3<K, ParallelTds> ParallelTriangulation;
t.reset();

View File

@ -28,20 +28,18 @@
#include <CGAL/license/Triangulation_3.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/basic.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_3.h>
#include <CGAL/iterator.h>
#include <CGAL/Location_policy.h>
#ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING
# define CGAL_PROFILE
# include <CGAL/Profile_counter.h>
#endif
#include <utility>
#include <vector>
#include <CGAL/Triangulation_3.h>
#include <CGAL/iterator.h>
#include <CGAL/Location_policy.h>
#ifdef CGAL_TRIANGULATION_3_PROFILING
# include <CGAL/Mesh_3/Profiling_tools.h>
#endif
@ -70,6 +68,9 @@
#include <CGAL/point_generators_3.h>
#endif
#include <utility>
#include <vector>
namespace CGAL {
// Here is the declaration of a class template with three arguments, one
@ -83,19 +84,28 @@ class Delaunay_triangulation_3;
// There is a specialization Delaunay_triangulation_3<Gt, Tds, Fast_location>
// defined in <CGAL/internal/Delaunay_triangulation_hierarchy_3.h>.
// Here is the specialization Delaunay_triangulation_3<Gt, Tds>, with two
// Here is the specialization Delaunay_triangulation_3<Gt, Tds>, with three
// arguments, that is if Location_policy being the default value 'Default'.
template < class Gt, class Tds_,
class Lock_data_structure_ >
template < class Gt, class Tds_, class Lock_data_structure_ >
class Delaunay_triangulation_3<Gt, Tds_, Default, Lock_data_structure_>
: public Triangulation_3<Gt, Tds_, Lock_data_structure_>
: public Triangulation_3<Gt,
typename Default::Get<Tds_,
Triangulation_data_structure_3<
Triangulation_vertex_base_3<Gt>,
Delaunay_triangulation_cell_base_3<Gt> > >::type,
Lock_data_structure_>
{
typedef typename Default::Get<Tds_,
Triangulation_data_structure_3 <
Triangulation_vertex_base_3<Gt>,
Delaunay_triangulation_cell_base_3<Gt> > >::type Tds;
typedef Delaunay_triangulation_3<Gt, Tds_, Default, Lock_data_structure_> Self;
public:
typedef Triangulation_3<Gt,Tds_,Lock_data_structure_> Tr_Base;
typedef Triangulation_3<Gt, Tds, Lock_data_structure_> Tr_Base;
typedef typename Tr_Base::Triangulation_data_structure Triangulation_data_structure;
typedef Tds Triangulation_data_structure;
typedef Gt Geom_traits;
typedef Compact_location Location_policy;

View File

@ -30,33 +30,54 @@
#include <CGAL/assertions.h>
#include <CGAL/basic.h>
#include <CGAL/triangulation_assertions.h>
#include <CGAL/Triangulation_ds_cell_base_3.h>
#include <CGAL/Triangulation_cell_base_3.h>
#include <boost/type_traits/is_same.hpp>
namespace CGAL {
template < typename GT, typename Cb = Triangulation_ds_cell_base_3<> >
template < typename GT,
typename Cb = Triangulation_cell_base_3<GT> >
class Delaunay_triangulation_cell_base_3
: public Triangulation_cell_base_3<GT, Cb>
: public Cb
{
public:
typedef GT Geom_traits;
typedef typename Geom_traits::Point_3 Point;
typedef typename Cb::Vertex_handle Vertex_handle;
typedef typename Cb::Cell_handle Cell_handle;
typedef GT Geom_traits;
typedef typename Geom_traits::Point_3 Point_3;
typedef typename Geom_traits::Point_3 Point;
template < typename TDS2 >
struct Rebind_TDS {
typedef typename Cb::template Rebind_TDS<TDS2>::Other Cb2;
typedef Delaunay_triangulation_cell_base_3<GT, Cb2> Other;
};
Delaunay_triangulation_cell_base_3()
: Cb() {}
Delaunay_triangulation_cell_base_3(Vertex_handle v0, Vertex_handle v1,
Vertex_handle v2, Vertex_handle v3)
: Cb(v0, v1, v2, v3) {}
Delaunay_triangulation_cell_base_3(Vertex_handle v0, Vertex_handle v1,
Vertex_handle v2, Vertex_handle v3,
Cell_handle n0, Cell_handle n1,
Cell_handle n2, Cell_handle n3)
: Cb(v0, v1, v2, v3, n0, n1, n2, n3) {}
template <typename GT_>
Point circumcenter(const GT_& gt) const
Point_3 circumcenter(const GT_& gt) const
{
CGAL_static_assertion((boost::is_same<Point,
typename GT_::Construct_circumcenter_3::result_type>::value));
return gt.construct_circumcenter_3_object()(this->vertex(0)->point(),
this->vertex(1)->point(),
this->vertex(2)->point(),
this->vertex(3)->point());
return gt.construct_circumcenter_3_object()(this->vertex(0)->point(),
this->vertex(1)->point(),
this->vertex(2)->point(),
this->vertex(3)->point());
}
Point circumcenter() const
Point_3 circumcenter() const
{
return circumcenter(Geom_traits());
}

View File

@ -31,11 +31,11 @@
#include <CGAL/basic.h>
#include <CGAL/triangulation_assertions.h>
#include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
namespace CGAL {
template < typename GT, typename Cb = Triangulation_cell_base_3<GT> >
template < typename GT, typename Cb = Delaunay_triangulation_cell_base_3<GT> >
class Delaunay_triangulation_cell_base_with_circumcenter_3
: public Cb
{

View File

@ -143,36 +143,13 @@ public:
void unhide_point_internal(const Point_iterator, typename boost::disable_if_c<Tag::value>::type* = NULL)
{ }
//note this function is not requested by the RegularTriangulationCellBase_3
//it should be replaced everywhere by weighted_circumcenter()
// but remains here for backward compatibility
template<typename GT_>
Point_3 circumcenter(const GT_& gt) const
{
CGAL_static_assertion((boost::is_same<Point_3,
typename GT_::Construct_weighted_circumcenter_3::result_type>::value));
return gt.construct_weighted_circumcenter_3_object()
(this->vertex(0)->point(),
this->vertex(1)->point(),
this->vertex(2)->point(),
this->vertex(3)->point());
}
Point_3 circumcenter() const
{
return circumcenter(Geom_traits());
}
template<typename GT_>
Point_3 weighted_circumcenter(const GT_& gt) const
{
CGAL_static_assertion((boost::is_same<Point_3,
typename GT_::Construct_weighted_circumcenter_3::result_type>::value));
return gt.construct_weighted_circumcenter_3_object()
(this->vertex(0)->point(),
this->vertex(1)->point(),
this->vertex(2)->point(),
this->vertex(3)->point());
return gt.construct_weighted_circumcenter_3_object()(this->vertex(0)->point(),
this->vertex(1)->point(),
this->vertex(2)->point(),
this->vertex(3)->point());
}
Point_3 weighted_circumcenter() const

View File

@ -67,41 +67,8 @@ public:
Cell_handle n2, Cell_handle n3)
: Cb(v0, v1, v2, v3, n0, n1, n2, n3) {}
// note the circumcenter() function is not part of the concept TriangulationCellBase_3
// it is requested only by DelaunayTriangulartionCellBase_3
// we keep it here for backward compatibility
typename Geom_traits::Point_3
circumcenter(const Geom_traits& gt = Geom_traits()) const
{
return gt.construct_circumcenter_3_object()(this->vertex(0)->point(),
this->vertex(1)->point(),
this->vertex(2)->point(),
this->vertex(3)->point());
}
};
// The following should be useless.
#if 0
template < class GT, class Cb >
inline
std::istream&
operator>>(std::istream &is, Triangulation_cell_base_3<GT, Cb> &c)
// non combinatorial information. Default = nothing
{
return is >> static_cast<Cb&>(c);
}
template < class GT, class Cb >
inline
std::ostream&
operator<<(std::ostream &os, const Triangulation_cell_base_3<GT, Cb> &c)
// non combinatorial information. Default = nothing
{
return os << static_cast<const Cb&>(c);
}
#endif
} //namespace CGAL
#endif // CGAL_TRIANGULATION_CELL_BASE_3_H

View File

@ -37,8 +37,8 @@ namespace CGAL {
#define CGAL_TDS_3 \
typename Default::Get<Tds_, Triangulation_data_structure_3 <\
Triangulation_vertex_base_3<Gt>,\
Triangulation_cell_base_3<Gt> > >::type
Triangulation_vertex_base_3<Gt>,\
Delaunay_triangulation_cell_base_3<Gt> > >::type
template < class Gt, class Tds_ >
class Delaunay_triangulation_3<Gt, Tds_, Fast_location>
@ -83,12 +83,14 @@ public:
template < class Gt >
class Delaunay_triangulation_3<Gt, Fast_location>
: public Triangulation_hierarchy_3<Delaunay_triangulation_3<Gt,
Triangulation_data_structure_3< Triangulation_hierarchy_vertex_base_3<Triangulation_vertex_base_3<Gt> >,
Triangulation_cell_base_3<Gt> > > >
Triangulation_data_structure_3<
Triangulation_hierarchy_vertex_base_3<Triangulation_vertex_base_3<Gt> >,
Delaunay_triangulation_cell_base_3<Gt> > > >
{
typedef Triangulation_hierarchy_3<Delaunay_triangulation_3<Gt,
Triangulation_data_structure_3< Triangulation_hierarchy_vertex_base_3<Triangulation_vertex_base_3<Gt> >,
Triangulation_cell_base_3<Gt> > > > Base;
Triangulation_data_structure_3<
Triangulation_hierarchy_vertex_base_3<Triangulation_vertex_base_3<Gt> >,
Delaunay_triangulation_cell_base_3<Gt> > > > Base;
public:

View File

@ -22,7 +22,6 @@
#include <CGAL/Regular_triangulation_3.h>
#include <CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h>
#include <CGAL/Regular_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_3.h>
#include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/Triangulation_data_structure_3.h>
@ -32,20 +31,20 @@
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Regular_triangulation_vertex_base_3<K> Vb;
typedef CGAL::Triangulation_cell_base_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Regular_triangulation_vertex_base_3<K> Vb;
typedef CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Regular_triangulation_3<K, Tds> Regular_triangulation_3;
typedef CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3<K>::Rebind_TDS<Tds>::Other Cell_type;
typedef Cell_type::Vertex_handle Vertex_handle;
typedef Cell_type::Cell_handle Cell_handle;
typedef Regular_triangulation_3::Vertex_handle Vertex_handle;
typedef Regular_triangulation_3::Cell_handle Cell_handle;
typedef Regular_triangulation_3::Bare_point Bare_point;
typedef Regular_triangulation_3::Point Point;
typedef Regular_triangulation_3::Weighted_point Weighted_point;
typedef Regular_triangulation_3::Bare_point Bare_point;
typedef Regular_triangulation_3::Point Point;
typedef Regular_triangulation_3::Weighted_point Weighted_point;
// Explicit instantiation of the whole class.
template class
@ -53,7 +52,7 @@ CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3<
K, CGAL::Regular_triangulation_cell_base_3<
K, CGAL::Triangulation_cell_base_3<
K, CGAL::Triangulation_ds_cell_base_3<Tds> >,
CGAL::Keep_hidden_points, std::vector<Weighted_point> > >;
CGAL::Keep_hidden_points, std::vector<Weighted_point> > >;
void test_default_constructor ()
{

View File

@ -59,7 +59,7 @@ int main()
CGAL::Tag_priority_blocking> Lock_ds;
typedef CGAL::Triangulation_data_structure_3<
CGAL::Triangulation_vertex_base_3<EPIC>,
CGAL::Triangulation_cell_base_3<EPIC>,
CGAL::Delaunay_triangulation_cell_base_3<EPIC>,
CGAL::Parallel_tag > Tds_parallel;
typedef CGAL::Delaunay_triangulation_3<
EPIC, Tds_parallel, CGAL::Default, Lock_ds> Cls_parallel;

View File

@ -33,7 +33,8 @@ int main()
{
typedef CGAL::Triangulation_vertex_base_3<K> Vbb;
typedef CGAL::Triangulation_hierarchy_vertex_base_3<Vbb> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Delaunay_triangulation_cell_base_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<K,Tds> Dt;
typedef CGAL::Triangulation_hierarchy_3<Dt> Dh;