diff --git a/SMDS_3/include/CGAL/Simplicial_mesh_cell_base_3.h b/SMDS_3/include/CGAL/Simplicial_mesh_cell_base_3.h
index ad535d2e402..3c882ad9b52 100644
--- a/SMDS_3/include/CGAL/Simplicial_mesh_cell_base_3.h
+++ b/SMDS_3/include/CGAL/Simplicial_mesh_cell_base_3.h
@@ -32,11 +32,46 @@
namespace CGAL {
+/*!
+\ingroup PkgSMDS3Classes
+
+The class `Simplicial_mesh_cell_base_3`
+is a model of the concept `SimplicialMeshCellBase_3`.
+It is designed to serve as cell base class for 3D simplicial mesh data structures.
+It stores and gives access to data about the complex the cell belongs to, such as the
+subdomain it belongs to or surface it takes part to.
+
+\tparam Gt is the geometric traits class.
+It must be a model of the concept `TriangulationTraits_3`
+
+\tparam SubdomainIndex Type of indices for subdomains of the discretized geometric domain.
+Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible`
+and `EqualityComparable`. The default constructed value must match the label
+of the exterior of the domain (which contains at least the unbounded component).
+It must match `MeshDomain_3::Subdomain_index` when used for mesh generation.
+
+\tparam SurfacePatchIndex Type of indices for surface patches (boundaries and interfaces)
+of the discretized geometric domain.
+Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible`
+and `EqualityComparable`. The default constructed value must be the index value
+assigned to a non surface facet.
+It must match `MeshDomain_3::Surface_patch_index` when used for mesh generation.
+
+\tparam Cb is the cell base class from which `Simplicial_mesh_cell_base_3` derives.
+It must be a model of the concept `TriangulationCellBase_3`.
+
+\cgalModels `SimplicialMeshCellBase_3`
+
+\sa `CGAL::Mesh_complex_3_in_triangulation_3
`
+\sa \link Mesh_cell_base_3 `CGAL::Mesh_cell_base_3`\endlink
+\sa `MeshDomain_3`
+\sa `MeshDomainWithFeatures_3`
+*/
template
-class Simplicial_mesh_cell_3
+ typename Cb = Triangulation_cell_base_3 >
+class Simplicial_mesh_cell_base_3
: public Cb
{
public:
@@ -50,11 +85,22 @@ public:
using Surface_patch_index = SurfacePatchIndex;
public:
- Simplicial_mesh_cell_3()
+ template
+ struct Rebind_TDS
+ {
+ using Cb2 = typename Cb::template Rebind_TDS::Other;
+ using Other = Simplicial_mesh_cell_base_3;
+ };
+
+public:
+ Simplicial_mesh_cell_base_3()
: time_stamp_(std::size_t(-1))
{}
- Simplicial_mesh_cell_3(const Simplicial_mesh_cell_3& rhs)
+ Simplicial_mesh_cell_base_3(const Simplicial_mesh_cell_base_3& rhs)
: Cb(static_cast(rhs)),
time_stamp_(rhs.time_stamp_),
subdomain_index_(rhs.subdomain_index_)
@@ -63,15 +109,15 @@ public:
surface_index_table_[i] = rhs.surface_index_table_[i];
}
- Simplicial_mesh_cell_3(Vertex_handle v0, Vertex_handle v1,
- Vertex_handle v2, Vertex_handle v3)
+ Simplicial_mesh_cell_base_3(Vertex_handle v0, Vertex_handle v1,
+ Vertex_handle v2, Vertex_handle v3)
: Cb(v0, v1, v2, v3)
{ }
- Simplicial_mesh_cell_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)
+ Simplicial_mesh_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)
{ }
@@ -153,7 +199,7 @@ private:
public:
friend std::istream& operator>>(std::istream& is,
- Simplicial_mesh_cell_3& c)
+ Simplicial_mesh_cell_base_3& c)
{
Subdomain_index index;
if(IO::is_ascii(is))
@@ -180,7 +226,7 @@ public:
friend
std::ostream& operator<<(std::ostream& os,
- const Simplicial_mesh_cell_3& c)
+ const Simplicial_mesh_cell_base_3& c)
{
if(IO::is_ascii(os))
os << c.subdomain_index();
@@ -199,59 +245,6 @@ public:
}
};
-/*!
-\ingroup PkgSMDS3Classes
-
-The class `Simplicial_mesh_cell_base_3`
-is a model of the concept `SimplicialMeshCellBase_3`.
-It is designed to serve as cell base class for 3D simplicial mesh data structures.
-It stores and gives access to data about the complex the cell belongs to, such as the
-subdomain it belongs to or surface it takes part to.
-
-\tparam Gt is the geometric traits class.
-It must be a model of the concept `TriangulationTraits_3`
-
-\tparam SubdomainIndex Type of indices for subdomains of the discretized geometric domain.
-Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible`
-and `EqualityComparable`. The default constructed value must match the label
-of the exterior of the domain (which contains at least the unbounded component).
-It must match `MeshDomain_3::Subdomain_index` when used for mesh generation.
-
-\tparam SurfacePatchIndex Type of indices for surface patches (boundaries and interfaces)
-of the discretized geometric domain.
-Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible`
-and `EqualityComparable`. The default constructed value must be the index value
-assigned to a non surface facet.
-It must match `MeshDomain_3::Surface_patch_index` when used for mesh generation.
-
-\tparam Cb is the cell base class from which `Simplicial_mesh_cell_base_3` derives.
-It must be a model of the concept `TriangulationCellBase_3`.
-
-\cgalModels `SimplicialMeshCellBase_3`
-
-\sa `CGAL::Mesh_complex_3_in_triangulation_3`
-\sa \link Mesh_cell_base_3 `CGAL::Mesh_cell_base_3`\endlink
-\sa `MeshDomain_3`
-\sa `MeshDomainWithFeatures_3`
-*/
-template >
-class Simplicial_mesh_cell_base_3
-{
-public:
- template
- struct Rebind_TDS
- {
- using Cb2 = typename Cb::template Rebind_TDS::Other;
- using Other = Simplicial_mesh_cell_3;
- };
-};
-
} // namespace CGAL
#endif // CGAL_SIMPLICIAL_MESH_CELL_BASE_3_H
diff --git a/SMDS_3/include/CGAL/Simplicial_mesh_vertex_base_3.h b/SMDS_3/include/CGAL/Simplicial_mesh_vertex_base_3.h
index a25cf6f4329..1b47ea8de4f 100644
--- a/SMDS_3/include/CGAL/Simplicial_mesh_vertex_base_3.h
+++ b/SMDS_3/include/CGAL/Simplicial_mesh_vertex_base_3.h
@@ -35,13 +35,62 @@
namespace CGAL {
// Adds information to Vb about the localization of the vertex in regards to the 3D input complex.
+
+/*!
+\ingroup PkgSMDS3Classes
+
+The class `Simplicial_mesh_vertex_base_3` is a model of the concept
+`SimplicialMeshVertexBase_3`.
+It is designed to serve as vertex base class for 3D simplicial mesh data structures.
+It stores and gives access to data about the complex the vertex belongs to, such as the
+index of the subcomplex it belongs to.
+
+\tparam Gt is the geometric traits class.
+It must be a model of the concept `TriangulationTraits_3`
+
+\tparam SubdomainIndex Type of indices for subdomains of the discretized geometric domain.
+Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible`
+and `EqualityComparable`. The default constructed value must match the label
+of the exterior of the domain (which contains at least the unbounded component).
+It must match `MeshDomain_3::Subdomain_index` when used for mesh generation.
+
+\tparam SurfacePatchIndex Type of indices for surface patches (boundaries and interfaces)
+of the discretized geometric domain.
+Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible`
+and `EqualityComparable`. The default constructed value must be the index value
+assigned to a non surface facet.
+It must match `MeshDomain_3::Surface_patch_index` when used for mesh generation.
+
+\tparam CurveIndex Type of indices for curves (i.e. \f$ 1\f$-dimensional features)
+of the discretized geometric domain.
+Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` and
+`LessThanComparable`. The default constructed value must be the value for an edge which
+does not approximate a 1-dimensional feature of the geometric domain.
+It must match `MeshDomainWithFeatures_3::Curve_index` when used for mesh generation.
+
+\tparam CornerIndex Type of indices for corners (i.e.\f$ 0\f$--dimensional features)
+of the discretized geometric domain.
+It must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` and
+`LessThanComparable`.
+It must match `MeshDomainWithFeatures_3::Corner_index` when used for mesh generation.
+
+\tparam Vb is the vertex base class from which `Simplicial_mesh_vertex_base_3` derives.
+It must be a model of the concept `TriangulationVertexBase_3`.
+
+\cgalModels `SimplicialMeshVertexBase_3`
+
+\sa `CGAL::Mesh_complex_3_in_triangulation_3`
+\sa \link Mesh_vertex_base_3 `CGAL::Mesh_vertex_base_3`\endlink
+\sa `MeshDomain_3`
+\sa `MeshDomainWithFeatures_3`
+*/
template
-class Simplicial_mesh_vertex_3
+ typename Vb = CGAL::Triangulation_vertex_base_3 >
+class Simplicial_mesh_vertex_base_3
: public Vb
{
private :
@@ -61,7 +110,20 @@ public:
using FT = typename Gt::FT;
public:
- Simplicial_mesh_vertex_3()
+ template
+ struct Rebind_TDS
+ {
+ using Vb2 = typename Vb::template Rebind_TDS::Other;
+ using Other = Simplicial_mesh_vertex_base_3;
+ };
+
+public:
+ Simplicial_mesh_vertex_base_3()
: Vb()
, number_of_incident_facets_(0)
, number_of_components_(0)
@@ -160,7 +222,7 @@ private:
public:
friend std::istream& operator>>(std::istream& is,
- Simplicial_mesh_vertex_3& v)
+ Simplicial_mesh_vertex_base_3& v)
{
is >> static_cast(v);
int dimension;
@@ -186,7 +248,7 @@ public:
}
friend std::ostream& operator<<(std::ostream& os,
- const Simplicial_mesh_vertex_3& v)
+ const Simplicial_mesh_vertex_base_3& v)
{
os << static_cast(v);
if(IO::is_ascii(os)) {
@@ -207,76 +269,6 @@ public:
}
};
-/*!
-\ingroup PkgSMDS3Classes
-
-The class `Simplicial_mesh_vertex_base_3` is a model of the concept
-`SimplicialMeshVertexBase_3`.
-It is designed to serve as vertex base class for 3D simplicial mesh data structures.
-It stores and gives access to data about the complex the vertex belongs to, such as the
-index of the subcomplex it belongs to.
-
-\tparam Gt is the geometric traits class.
-It must be a model of the concept `TriangulationTraits_3`
-
-\tparam SubdomainIndex Type of indices for subdomains of the discretized geometric domain.
-Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible`
-and `EqualityComparable`. The default constructed value must match the label
-of the exterior of the domain (which contains at least the unbounded component).
-It must match `MeshDomain_3::Subdomain_index` when used for mesh generation.
-
-\tparam SurfacePatchIndex Type of indices for surface patches (boundaries and interfaces)
-of the discretized geometric domain.
-Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible`
-and `EqualityComparable`. The default constructed value must be the index value
-assigned to a non surface facet.
-It must match `MeshDomain_3::Surface_patch_index` when used for mesh generation.
-
-\tparam CurveIndex Type of indices for curves (i.e. \f$ 1\f$-dimensional features)
-of the discretized geometric domain.
-Must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` and
-`LessThanComparable`. The default constructed value must be the value for an edge which
-does not approximate a 1-dimensional feature of the geometric domain.
-It must match `MeshDomainWithFeatures_3::Curve_index` when used for mesh generation.
-
-\tparam CornerIndex Type of indices for corners (i.e.\f$ 0\f$--dimensional features)
-of the discretized geometric domain.
-It must be a model of `CopyConstructible`, `Assignable`, `DefaultConstructible` and
-`LessThanComparable`.
-It must match `MeshDomainWithFeatures_3::Corner_index` when used for mesh generation.
-
-\tparam Vb is the vertex base class from which `Simplicial_mesh_vertex_base_3` derives.
-It must be a model of the concept `TriangulationVertexBase_3`.
-
-\cgalModels `SimplicialMeshVertexBase_3`
-
-\sa `CGAL::Mesh_complex_3_in_triangulation_3`
-\sa \link Mesh_vertex_base_3 `CGAL::Mesh_vertex_base_3`\endlink
-\sa `MeshDomain_3`
-\sa `MeshDomainWithFeatures_3`
-*/
-template >
-class Simplicial_mesh_vertex_base_3
-{
-public:
- template
- struct Rebind_TDS
- {
- using Vb2 = typename Vb::template Rebind_TDS::Other;
- using Other = Simplicial_mesh_vertex_3;
- };
-};
-
} // namespace CGAL
#endif // CGAL_SIMPLICIAL_MESH_VERTEX_BASE_3_H
diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h
index 30de338cdf7..162cfa27f21 100644
--- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h
+++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_cell_base_3.h
@@ -22,9 +22,27 @@
namespace CGAL {
namespace Tetrahedral_remeshing {
+/*!
+\ingroup PkgTetrahedralRemeshingClasses
+
+The class `Remeshing_cell_base_3` is a model of the concept `RemeshingCellBase_3`.
+It is designed to serve as cell base class for the 3D triangulation
+used in the tetrahedral remeshing process.
+
+\tparam Gt is the geometric traits class.
+It has to be a model of the concept `RemeshingTriangulationTraits_3`.
+
+\tparam Cb is a cell base class from which `Remeshing_cell_base_3` derives.
+It must be a model of the `SimplicialMeshCellBase_3` concept.
+
+\cgalModels `RemeshingCellBase_3`
+
+*/
template
-class Remeshing_cell_3
+ typename Cb = CGAL::Simplicial_mesh_cell_base_3 >
+class Remeshing_cell_base_3
: public Cb
{
public:
@@ -35,6 +53,14 @@ public:
using Geom_traits = Gt;
+public:
+ template
+ struct Rebind_TDS
+ {
+ using Cb2 = typename Cb::template Rebind_TDS::Other;
+ using Other = Remeshing_cell_base_3;
+ };
+
public:
using Cb::Cb; // constructors
@@ -59,37 +85,6 @@ private:
mutable bool sliver_cache_validity_ = false;
};
-/*!
-\ingroup PkgTetrahedralRemeshingClasses
-
-The class `Remeshing_cell_base_3` is a model of the concept `RemeshingCellBase_3`.
-It is designed to serve as cell base class for the 3D triangulation
-used in the tetrahedral remeshing process.
-
-\tparam Gt is the geometric traits class.
-It has to be a model of the concept `RemeshingTriangulationTraits_3`.
-
-\tparam Cb is a cell base class from which `Remeshing_cell_base_3` derives.
-It must be a model of the `SimplicialMeshCellBase_3` concept.
-
-\cgalModels `RemeshingCellBase_3`
-
-*/
-template >
-class Remeshing_cell_base_3
-{
-public:
- template
- struct Rebind_TDS
- {
- using Cb2 = typename Cb::template Rebind_TDS::Other;
- using Other = Remeshing_cell_3;
- };
-};
-
} // namespace Tetrahedral_remeshing
} // namespace CGAL
diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_vertex_base_3.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_vertex_base_3.h
index faab3950f9a..34e5fb0855c 100644
--- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_vertex_base_3.h
+++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/Remeshing_vertex_base_3.h
@@ -20,15 +20,6 @@
namespace CGAL {
namespace Tetrahedral_remeshing {
-template
-class Remeshing_vertex_3
- : public Vb
-{
-public:
- using Vb::Vb; // constructors
-};
-
/*!
\ingroup PkgTetrahedralRemeshingClasses
@@ -51,14 +42,18 @@ template >
class Remeshing_vertex_base_3
+ : public Vb
{
public:
template
struct Rebind_TDS
{
using Vb2 = typename Vb::template Rebind_TDS::Other;
- using Other = Remeshing_vertex_3;
+ using Other = Remeshing_vertex_base_3;
};
+
+public:
+ using Vb::Vb; // constructors
};
} // namespace Tetrahedral_remeshing