diff --git a/Periodic_2_triangulation_2/TODO.txt b/Periodic_2_triangulation_2/TODO.txt
index 28c0d146488..2c151936cee 100644
--- a/Periodic_2_triangulation_2/TODO.txt
+++ b/Periodic_2_triangulation_2/TODO.txt
@@ -10,6 +10,7 @@ DOC:
TODO:
* Hierarchy
* loading / saving a triangulation
+ * all_vertices_iterator / vertices_iterator give the same vertices
* Documentation
* obvious things (that Nico is certainly aware of) still TODOs left, and NGHKs
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h
index da4327d2e71..06c09145b2d 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h
@@ -2,7 +2,7 @@
namespace CGAL {
/*!
-\ingroup PkgPeriodic2Triangulation2
+\ingroup PkgPeriodic2Triangulation2MainClasses
The class `Periodic_2_Delaunay_triangulation_2` represents a
Delaunay triangulation in two-dimensional periodic space.
@@ -280,7 +280,7 @@ Point& p, bool perturb ) const;
/// @}
/// \name Checking
-/// \advanced These methods are mainly a debugging help for the users of advanced features.
+/// \cgalAdvanced These methods are mainly a debugging help for the users of advanced features.
/// @{
/*!
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h
index cbeebfe2177..b0c42c7b723 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h
@@ -18,7 +18,7 @@ predicates. This holds implicitly for
`CGAL::Exact_predicates_inexact_constructions_kernel`, as it is an
instantiation of `CGAL::Filtered_kernel`.
-\models ::Periodic_2DelaunayTriangulationTraits_2
+\alModels ::Periodic_2DelaunayTriangulationTraits_2
*/
template< typename Traits, typename Periodic_2Offset_2 >
class Periodic_2_Delaunay_triangulation_traits_2
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h
index ec017253a03..2bbcf9af61a 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h
@@ -2,7 +2,7 @@
namespace CGAL {
/*!
-\ingroup PkgPeriodic2Triangulation2
+\ingroup PkgPeriodic2Triangulation2MainClasses
The class `Periodic_2_triangulation_2` represents a 2-dimensional
triangulation of a point set in \f$ \mathbb T_c^2\f$.
@@ -218,7 +218,7 @@ typedef Tds::difference_type difference_type;
\name Handles, Iterators and Circulators
The vertices and faces of the triangulations are accessed through
-`handles`, `iterators` and `circulators`. The handles are models of
+`handles`, `iterators` and `circulators`. The handles are alModels of
the concept `Handle` which basically offers the two dereference
operators and `->`. The iterators and circulators are all
bidirectional and non-mutable. The circulators and iterators are
@@ -266,22 +266,22 @@ exactly one representative.
typedef Hidden_type Unique_vertex_iterator;
/*!
-\advanced For compatibility with `Triangulation_2`.
+\cgalAdvanced For compatibility with `Triangulation_2`.
*/
typedef Face_iterator Finite_faces_iterator;
/*!
-\advanced For compatibility with `Triangulation_2`.
+\cgalAdvanced For compatibility with `Triangulation_2`.
*/
typedef Edge_iterator Finite_edges_iterator;
/*!
-\advanced For compatibility with `Triangulation_2`.
+\cgalAdvanced For compatibility with `Triangulation_2`.
*/
typedef Vertex_iterator Finite_vertices_iterator;
/*!
-\advanced For compatibility with `Triangulation_2`.
+\cgalAdvanced For compatibility with `Triangulation_2`.
*/
typedef Face_iterator All_faces_iterator;
@@ -427,7 +427,7 @@ size_type number_of_stored_faces() const;
/// @}
/// \name Non const access
-/// \advanced This method is mainly a help for users implementing
+/// \cgalAdvanced This method is mainly a help for users implementing
/// their own triangulation algorithms.
/// @{
@@ -456,7 +456,7 @@ size_type number_of_stored_edges() const;
/// @}
/// \name Non-constant-time queries and conversions
-/// \advanced It is not recommended to interfere with the built-in
+/// \cgalAdvanced It is not recommended to interfere with the built-in
/// covering management. Especially a premature conversion to the
/// 1-sheeted covering space might lead to problems when modifying the
/// triangulation later.
@@ -690,7 +690,6 @@ Locate_type& lt,
int& li,
Face_handle h =Face_handle() ) const;
-// TODO(NGHK): Check
/*!
Returns on which side of the oriented boundary of `f`
the point `p` lies.
@@ -772,7 +771,7 @@ const;
/// \image html it_STORED_small.png
/// \image html it_STORED_COVER_DOMAIN_small.jpg
/// \image html it_UNIQUE_small.png
-/// \iamge html it_UNIQUE_COVER_DOMAIN_small.jpg
+/// \image html it_UNIQUE_COVER_DOMAIN_small.jpg
///
NGHK: Change images. The four different modes of the
/// geometric iterators: `STORED`, `STORED_COVER_DOMAIN`, `UNIQUE`,
/// `UNIQUE_COVER_DOMAIN`. Note that in case of computing in the
@@ -886,14 +885,13 @@ Vertex_circulator adjacent_vertices(Vertex_handle v, Face_handle f) ;
/*!
returns the vertex of the \f$ i^{th}\f$ neighbor of `f` that is
opposite to `f`.
-\pre $0 \leq i \leq 2$.
+\pre $0 \\leqle i \\leqle 2$.
*/
Vertex_handle mirror_vertex(Face_handle f, int i) const;
-// TODO(NGHK): Check
/*!
returns the index of `f` in its \f$ i^{th}\f$ neighbor.
-\pre $0 \leq i \leq 2$.
+\pre $0 \\leqle i \\leqle 2$.
*/
int mirror_index(Face_handle f, int i) const;
@@ -904,7 +902,6 @@ int mirror_index(Face_handle f, int i) const;
/// triangulation when they are applied on a valid triangulation.
/// @{
-// TODO(NGHK): Check
/*!
Exchanges the edge
incident to `f` and `f->neighbor(i)` with the other diagonal
@@ -915,7 +912,6 @@ the triangulation is on the 9-sheeted cover.
*/
void flip(Face_handle f, int i);
-// TODO(NGHK): Check
/*!
Inserts point `p` in the triangulation and returns the
corresponding vertex.
@@ -938,7 +934,6 @@ indication to the underlying locate algorithm of where to start.
Vertex_handle insert(const Point& p, Face_handle f =
Face_handle());
-// TODO(NGHK): Check
/*!
Same as above except that the location
of the point `p` to be inserted is assumed to be given by
@@ -948,14 +943,12 @@ above.)
Vertex_handle insert(const Point& p, Locate_type lt,
Face_handle loc, int li );
-// TODO(NGHK): Check
/*!
Equivalent to
`insert(p)`.
*/
Vertex_handle push_back(const Point& p);
-// TODO(NGHK): Check
/*!
Inserts the points in the range
\f$ \left[\right.\f$`first`, `last`\f$ \left.\right)\f$. Returns the
@@ -990,7 +983,7 @@ void remove(Vertex_handle v);
/// @}
/// \name
-/// \advanced The following member functions offer more specialized
+/// \cgalAdvanced The following member functions offer more specialized
/// versions of the insertion or removal operations to be used when
/// one knows to be in the corresponding case. The following functions
/// are mainly intended to be used in conjunction with the
@@ -998,13 +991,11 @@ void remove(Vertex_handle v);
/// Delaunay triangulations to perform insertions.
/// @{
-// TODO(NGHK): Check
/*!
Inserts the first vertex.
*/
Vertex_handle insert_first(const Point& p);
-// TODO(NGHK): Check
/*!
Inserts vertex `v` in face
`f`. Face `f` is modified,
@@ -1013,21 +1004,18 @@ two new faces are created. If the triangulation contains periodic copies, a poin
*/
Vertex_handle insert_in_face(const Point& p, Face_handle f);
-// TODO(NGHK): Check
/*!
Inserts vertex v in edge `i` of `f`. If the triangulation contains periodic copies, a point is inserted in all periodic copies.
\pre The point in vertex `v` lies on the edge opposite to the vertex `i` of face `f`.
*/
Vertex_handle insert_in_edge(const Point& p, const Offset &o, Face_handle f, int i);
-// TODO(NGHK): Check
/*!
Removes a vertex of degree three. Two of the incident faces are
destroyed, the third one is modified. \pre Vertex `v` is a vertex with degree three.
*/
void remove_degree_3(Vertex_handle v);
-// TODO(NGHK): Check
/*!
Removes the unique vertex in the
triangulation.
@@ -1058,9 +1046,8 @@ EdgeIt edge_end,
FaceIt face_begin,
FaceIt face_end);
-// TODO(NGHK): Check
/*!
-\advanced Changes the domain. Note that this function calls `clear()`,
+\cgalAdvanced Changes the domain. Note that this function calls `clear()`,
i.e., it erases the existing triangulation.
*/
void set_domain(const Iso_rectangle dom);
@@ -1070,19 +1057,16 @@ void set_domain(const Iso_rectangle dom);
/// \name Miscellaneous
/// @{
-// TODO(NGHK): Check
/*!
-Returns \f$ i+1\f$ modulo 3.\pre $0 \leq i \leq 2$.
+Returns \f$ i+1\f$ modulo 3.\pre $0 \\leqle i \\leqle 2$.
*/
int ccw(int i) const;
-// TODO(NGHK): Check
/*!
-Returns \f$ i+2\f$ modulo 3.\pre $0 \leq i \leq 2$.
+Returns \f$ i+2\f$ modulo 3.\pre $0 \\leqle i \\leqle 2$.
*/
int cw(int i) const;
-// TODO(NGHK): Check
/*!
Returns whether the
union of the faces `f` and `f->neighbor(i)` form a convex
@@ -1090,7 +1074,6 @@ quadrilateral.
*/
void flippable(Face_handle f, int i);
-// TODO(NGHK): Check
/*!
Returns the degree of the
vertex `v`
@@ -1100,14 +1083,13 @@ size_t degree(Vertex_handle v);
/// @}
/// \name Checking
-/// \advanced The responsibility of keeping a valid triangulation
+/// \cgalAdvanced The responsibility of keeping a valid triangulation
/// belongs to the users if advanced operations are used. Obviously
/// the advanced user, who implements higher levels operations may
/// have to make a triangulation invalid at some times. The following
/// method is provided to help the debugging.
/// @{
-// TODO(NGHK): Check
/*!
Checks the combinatorial validity of the triangulation and
also the validity of its geometric embedding.
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_ds_face_base_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_ds_face_base_2.h
index 4dc8b685eb9..83adf2e254d 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_ds_face_base_2.h
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_ds_face_base_2.h
@@ -20,7 +20,7 @@ the offset corresponding to vertex \f$ i\f$.
The implementation of `has_zero_offsets()` results in checking
whether all offsets are zero.
-\models ::Periodic_2TriangulationDSFaceBase_2
+\cgalModels ::Periodic_2TriangulationDSFaceBase_2
\sa `CGAL::Triangulation_face_base_2`
\sa `CGAL::Triangulation_face_base_with_info_2`
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_ds_vertex_base_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_ds_vertex_base_2.h
new file mode 100644
index 00000000000..24290addc59
--- /dev/null
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_ds_vertex_base_2.h
@@ -0,0 +1,26 @@
+
+namespace CGAL {
+
+/*!
+\ingroup PkgPeriodic2Triangulation2MainClasses
+
+The class `Periodic_2_triangulation_ds_vertex_base_2` is a model
+of the concept `Periodic_2TriangulationDSVertexBase_2` to be used by
+`Triangulation_data_structure_2` to represent vertices of a
+periodic triangulation.
+
+\cgalModels `Periodic_2TriangulationDSVertexBase_2`
+
+\sa `CGAL::Periodic_2_triangulation_ds_face_base_2`
+\sa `CGAL::Triangulation_vertex_base_2`
+\sa `CGAL::Triangulation_vertex_base_with_info_2`
+
+*/
+template< >
+class Periodic_2_triangulation_ds_vertex_base_2 {
+public:
+
+/// @}
+
+}; /* end Periodic_2_triangulation_ds_vertex_base_2 */
+} /* end namespace CGAL */
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_traits_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_traits_2.h
index 90360cfaa12..2a7d3f57446 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_traits_2.h
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_traits_2.h
@@ -2,9 +2,9 @@
namespace CGAL {
/*!
-\ingroup PkgPeriodic2Triangulation2
+\ingroup PkgPeriodic2Triangulation2TraitsClasses
-The class `Periodic_2_triangulation_traits_2`is designed as a default
+The class `Periodic_2_triangulation_traits_2` is designed as a default
traits class for the class
`Periodic_2_triangulation_2`.
@@ -19,8 +19,8 @@ predicates. This holds implicitly for
`CGAL::Exact_predicates_inexact_constructions_kernel`, as it is an
instantiation of `CGAL::Filtered_kernel`.
-\models `Periodic_2TriangulationTraits_2` and
-\models `Periodic_2DelaunayTriangulationTraits_2` if the template parameter `Traits` is a model of the
+\alModels `Periodic_2TriangulationTraits_2` and
+\alModels `Periodic_2DelaunayTriangulationTraits_2` if the template parameter `Traits` is a model of the
`DelaunayTriangulationTraits_2` concept.
*/
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Classified.txt b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Classified.txt
index bdd8d54063f..048c7428243 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Classified.txt
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Classified.txt
@@ -31,7 +31,7 @@ Figure \ref P2Triangulation2figorient.
In order to be able to specify the triangle that contain vertices both
inside and outside the original domain we store offsets for each
-vertex of a face within the face. These offsets are models of the
+vertex of a face within the face. These offsets are alModels of the
concept `Periodic_2Offset_2`.
# Classified Reference Pages #
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2DelaunayTriangulationTraits_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2DelaunayTriangulationTraits_2.h
index 8481909a7d7..672ca1bb029 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2DelaunayTriangulationTraits_2.h
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2DelaunayTriangulationTraits_2.h
@@ -13,7 +13,7 @@ predicates from `DelaunayTriangulationTraits_2` can be used
directly. For efficiency reasons we maintain for each functor the
version without offsets.
-\refines ::DelaunayTriangulationTraits_2 and ::Periodic_2TriangulationTraits_2
+\cgalRefines ::DelaunayTriangulationTraits_2 and ::Periodic_2TriangulationTraits_2
In addition to the requirements of the concept
::Periodic_2TriangulationTraits_2, the concept ::Periodic_2DelaunayTriangulationTraits_2 provides a predicate to check the empty circle property. The
@@ -25,8 +25,8 @@ dual functions are called. The additional predicate type
::Compare_distance_2 is required if calls to
::nearest_vertex(..) are issued.
-\hasModel `CGAL::Periodic_2_Delaunay_triangulation_traits_2`
-\hasModel `CGAL::Periodic_2_triangulation_traits_2`, which implements
+\cgalHasModel `CGAL::Periodic_2_Delaunay_triangulation_traits_2`
+\cgalHasModel `CGAL::Periodic_2_triangulation_traits_2`, which implements
additional the Delaunay predicates as well if the template parameter Traits is a model of `DelaunayTriangulationTraits_2`.
\sa `DelaunayTriangulationTraits_2`
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2Offset_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2Offset_2.h
index 9c9d72f6a13..46382cd91e8 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2Offset_2.h
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2Offset_2.h
@@ -5,7 +5,7 @@
The concept `Periodic_2Offset_2` describes a two-/dimensional integer vector with some specialized access functions and operations.
-\hasModel CGAL::Periodic_2_offset_2
+\cgalHasModel CGAL::Periodic_2_offset_2
\sa `Periodic_2TriangulationTraits_2`
\sa `Periodic_2DelaunayTriangulationTraits_2`
@@ -18,13 +18,11 @@ public:
/// \name Creation
/// @{
-// TODO(NGHK): Check
/*!
Default constructor.
*/
Periodic_2Offset_2();
-// TODO(NGHK): Check
/*!
Constructs the offset (x,y).
*/
@@ -35,54 +33,46 @@ Periodic_2Offset_2(int x, int y);
/// \name Operations
/// @{
-// TODO(NGHK): Check
/*!
Return the vector sum of `this` and `o`.
*/
Periodic_2Offset_2 operator+(const Periodic_2Offset_2 & o)
const;
-// TODO(NGHK): Check
/*!
Return the vector difference of `this` and `o`.
*/
Periodic_2Offset_2 operator-(const Periodic_2Offset_2 & o)
const;
-// TODO(NGHK): Check
/*!
Return the negative vector of `this`.
*/
Periodic_2Offset_2 operator-() const;
-// TODO(NGHK): Check
/*!
Add `o` to `this` using vector addition.
*/
void operator+=(const Periodic_2Offset_2 & o)
const;
-// TODO(NGHK): Check
/*!
Subtract `o` from `this` using vector subtraction.
*/
void operator-=(const Periodic_2Offset_2 & o)
const;
-// TODO(NGHK): Check
/*!
Return `true` if `o` and `this` represent the same vector.
*/
bool operator==(const Periodic_2Offset_2 & o) const;
-// TODO(NGHK): Check
/*!
Return `true` if `o` and `this` do not represent the same
vector.
*/
bool operator!=(const Periodic_2Offset_2 & o) const;
-// TODO(NGHK): Check
/*!
Compare `this` and `o` lexicographically.
*/
@@ -93,32 +83,27 @@ bool operator<(const Periodic_2Offset_2 & o) const;
/// \name Access Functions
/// @{
-// TODO(NGHK): Check
/*!
Return the \f$ i\f$-th entry of `this`.
\pre \f$ i\in\{0,1\}\f$
*/
int operator[](int i);
-// TODO(NGHK): Check
/*!
Return the \f$ x\f$-entry of `this`.
*/
int x() const;
-// TODO(NGHK): Check
/*!
Return the \f$ y\f$-entry of `this`.
*/
int y() const;
-// TODO(NGHK): Check
/*!
Returns `true` if `this` is equal to (0,0).
*/
bool is_null() const;
-// TODO(NGHK): Check
/*!
Returns `true` if `this` is equal to (0,0).
*/
@@ -129,14 +114,12 @@ bool is_zero() const;
}; /* end Periodic_2Offset_2 */
-// TODO(NGHK): Check
/*!
Inputs an offset from `is`.
\relates Periodic_2Offset_2
*/
istream& operator>>(istream & is, Periodic_2Offset_2 & off);
-// TODO(NGHK): Check
/*!
Outputs an offset from `os`.
\relates Periodic_2Offset_2
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationDSFaceBase_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationDSFaceBase_2.h
index 93953ed851a..f60033ec7d2 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationDSFaceBase_2.h
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationDSFaceBase_2.h
@@ -3,14 +3,15 @@
\ingroup PkgPeriodic2Triangulation2Concepts
\cgalConcept
-At the base level (see Sections \ref P2Triangulation2secdesign
-and \ref TDS2secdesign), a face stores handles to its four vertices
-and to its four neighbor faces. The vertices and neighbors are
-indexed 0, 1 and 2. Neighbor \f$ i\f$ lies opposite to vertex \f$ i\f$.
+At the base level (see Section \ref
+Section_2D_Triangulations_Software_Design), a face stores handles to
+its four vertices and to its four neighbor faces. The vertices and
+neighbors are indexed 0, 1 and 2. Neighbor \f$ i\f$ lies opposite to
+vertex \f$ i\f$.
-\refines ::TriangulationDSFaceBase_2
+\cgalRefines ::TriangulationDSFaceBase_2
-\hasModel CGAL::Periodic_2_triangulation_ds_face_base_2
+\cgalHasModel CGAL::Periodic_2_triangulation_ds_face_base_2
\sa `TriangulationDataStructure_2`
\sa `TriangulationDSFaceBase_2`
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationDSVertexBase_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationDSVertexBase_2.h
new file mode 100644
index 00000000000..5e657253359
--- /dev/null
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationDSVertexBase_2.h
@@ -0,0 +1,67 @@
+
+/*!
+\ingroup PkgPeriodic2Triangulation2Concepts
+\cgalConcept
+
+A refinement of the concept `TriangulationDSVertexBase_2`
+which adds an API for offset.
+
+At the base level of 2D-triangulations (see Section \ref
+Section_2D_Triangulations_Software_Design), a vertex provides access
+to one of its incident faces through a handle.
+
+The storage of the offset is only needed when a triangulation is copied.
+
+\cgalRefines `TriangulationDSVertexBase_2`
+
+
+
+\cgalHasModel CGAL::Periodic_2_triangulation_ds_vertex_base_2
+
+\sa `TriangulationDataStructure_2`
+\sa `TriangulationDSVertexBase_2`
+\sa `Periodic_2TriangulationDSFaceBase_2`
+
+*/
+
+class Periodic_2TriangulationDSVertexBase_2 {
+public:
+
+/// \name Types
+/// @{
+
+/*!
+A model of the concept
+`Periodic_2Offset_2`
+*/
+typedef Hidden_type Periodic_2_offset_2;
+
+/// @}
+
+/// \name Access Functions
+/// @{
+
+/*!
+Returns the offset stored in the vertex.
+*/
+Periodic_2_offset_2 offset() const;
+
+/*!
+Returns `true` if the offset has been set, `false` otherwise.
+*/
+bool get_offset_flag() const;
+
+/*!
+Sets the offset and sets the offset flag to `true`.
+*/
+void set_offset(Periodic_2_offset_2 o);
+
+/*!
+Sets the offset flag to `false` and clears the offset.
+*/
+void clear_offset();
+
+/// @}
+
+}; /* end Periodic_2TriangulationDSVertexBase_2 */
+
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationTraits_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationTraits_2.h
index 7bcc19f7a55..0b0b6512cbb 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationTraits_2.h
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationTraits_2.h
@@ -16,13 +16,13 @@ predicates from `TriangulationTraits_2` can be used
directly. For efficiency reasons we maintain for each functor the
version without offsets.
-\refines ::TriangulationTraits_2
+\cgalRefines ::TriangulationTraits_2
In addition to the requirements described for the traits class
::TriangulationTraits_2, the geometric traits class of a
Periodic triangulation must fulfill the following
requirements:
-\hasModel CGAL::Periodic_2_triangulation_traits_2
+\cgalHasModel CGAL::Periodic_2_triangulation_traits_2
\sa `TriangulationTraits_2`
\sa `CGAL::Periodic_2_triangulation_2`
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/PackageDescription.txt b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/PackageDescription.txt
index 874545940f3..e1037e523d3 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/PackageDescription.txt
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/PackageDescription.txt
@@ -50,7 +50,7 @@ predicates and constructions that are needed by the functions in the
triangulation classes.
The package uses `Triangulation_data_structure_2` to represent the
-triangulation. The faces and vertices need to be models of the
+triangulation. The faces and vertices need to be alModels of the
concepts `Periodic_2TriangulationDSFaceBase_2` and
`TriangulationDSVertexBase_2`, respectively.
A triangulation is stored as a collection of vertices and faces that
@@ -68,36 +68,7 @@ Figure \cgalFigureRef{P2Triangulation2figorient}.
In order to be able to specify the triangle that contain vertices
both inside and outside the original domain we store additional
-offset information for each vertex of a face. These offsets are models
+offset information for each vertex of a face. These offsets are alModels
of the concept `Periodic_2Offset_2`.
-
-## Concepts ##
-
-- `Periodic_2DelaunayTriangulationTraits_2`
-- `TriangulationDataStructure_2`
-- `Periodic_2TriangulationDSCellBase_2`
-- `TriangulationDSVertexBase_2`
-- `Periodic_2Offset_2`
-
-## Classes ##
-
-### Main Classes ###
-
-- `CGAL::Periodic_2_triangulation_2`
-- `CGAL::Periodic_2_Delaunay_triangulation_2`
-// TODO(NGHK): - `CGAL::Periodic_2_triangulation_hierarchy_2`
-- `CGAL::Periodic_2_triangulation_ds_cell_base_2<>`
-- `CGAL::Periodic_2_triangulation_ds_vertex_base_3<>`
-- `CGAL::Periodic_2_offset_2`
-
-### Traits Classes ###
-
-- `CGAL::Periodic_2_triangulation_traits_2`
-
-## Enums ##
-
-- `CGAL::Periodic_2_triangulation_2::Iterator_type`
-- `CGAL::Periodic_2_triangulation_2::Locate_type`
-
*/
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt
index ffba0aa84de..00b6fa9e5ed 100644
--- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt
@@ -188,8 +188,7 @@ which stores their combinatorial structure. This separation between
the geometry and the combinatorics is reflected in the software design
by the fact that the triangulation classes take two template
parameters:
-
-- the geometric traits class, which provides the type
+- the geometric traits class, which provides the type
of points to use as well as the elementary operations on them
(predicates and constructions). Furthermore it contains the offset
type. The concept for this parameter is described in more detail in
@@ -200,15 +199,13 @@ be refined are `Periodic_2TriangulationTraits_2` (for
`Periodic_2_Delaunay_triangulation_2`) in the reference
manual and
.
-
-
- the triangulation data structure class, which stores
+- the triangulation data structure class, which stores
the combinatorial structure, described in
Section \ref P2Triangulation2sectds and in more detail in
Chapter \ref Chapter_2D_Triangulation_Data_Structure. The
-triangulation data structure needs models of the concepts
+triangulation data structure needs alModels of the concepts
`Periodic_2TriangulationDSFaceBase_2` and
`Periodic_2TriangulationDSVertexBase_2` as template parameters.
-
\subsection P2Triangulation2secTraits The Geometric Traits Parameter
@@ -236,7 +233,7 @@ is also a model for the concept `TriangulationTraits_2`.
The kernels `Cartesian`, `Homogeneous`,
`Simple_cartesian`, `Simple_homogeneous` and
-`Filtered_kernel` can all be used as models for
+`Filtered_kernel` can all be used as alModels for
`Traits`. `Periodic_2_triangulation_traits_2` provides exact
predicates and exact constructions if `Traits` does. It provides
exact predicates but not exact constructions if
@@ -296,7 +293,7 @@ elementary operations on indices in a face. It uses the default
parameter of the `Periodic_2_Delaunay_triangulation_2` class for
the triangulation data structure.
-\cgalExample{simple_example.cpp}
+\cgalExample{Periodic_2_triangulation_2/p2t2_simple_example.cpp}
## Changing the Vertex Base ##
@@ -312,7 +309,7 @@ the `TriangulationDataStructure_2` (e.g. a `Vertex_handle` or
information easily in the vertices. The example below shows how to
add a `CGAL::Color` this way.
-\cgalExample{colored_vertices.cpp}
+\cgalExample{Periodic_2_triangulation_2/p2t2_colored_vertices.cpp}
## Adding Handles ##
@@ -321,7 +318,7 @@ If the user needs to add a type in a vertex that depends on the
`Face_handle`), he has to derive his own vertex base class, as the
following example shows.
-\cgalExample{periodic_adding_handles.cpp}
+\cgalExample{Periodic_2_triangulation_2/p2t2_periodic_adding_handles.cpp}
## 9-sheeted Covering ##
@@ -336,7 +333,7 @@ the 1-sheeted covering. However, we can insert new points such that the
point set does not have a Delaunay triangulation in the 1-sheeted
covering anymore, so the triangulation is not extensible.
-\cgalExample{covering.cpp}
+\cgalExample{Periodic_2_triangulation_2/p2t2_covering.cpp}
## Large Point Set ##
@@ -356,7 +353,7 @@ triangulation in 1-sheeted covering.
It is recommended to run this example only when compiled in release
mode because of the relatively large number of points.
-\cgalExample{large_point_set.cpp}
+\cgalExample{Periodic_2_triangulation_2/p2t2_large_point_set.cpp}
## Geometric Access ##
@@ -375,7 +372,7 @@ triangle whether the offset is (0,0,0) using the
method `is_null`. If so, we convert the periodic triangle to a
`PK::Triangle_2`, which requires exact constructions.
-\cgalExample{geometric_access.cpp}
+\cgalExample{Periodic_2_triangulation_2/p2t2_geometric_access.cpp}
# Design and Implementation History #
diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/examples.txt b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/examples.txt
new file mode 100644
index 00000000000..9be1a7e1709
--- /dev/null
+++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/examples.txt
@@ -0,0 +1,12 @@
+/*!
+\example Periodic_2_triangulation_2/p2t2_simple_example.cpp
+\example Periodic_2_triangulation_2/p2t2_adding_handles.cpp
+\example Periodic_2_triangulation_2/p2t2_colored_vertices.cpp
+\example Periodic_2_triangulation_2/p2t2_covering.cpp
+\example Periodic_2_triangulation_2/p2t2_find_conflicts.cpp
+\example Periodic_2_triangulation_2/p2t2_geometric_access.cpp
+\example Periodic_2_triangulation_2/p2t2_info_insert_with_pair_iterator_2.cpp
+\example Periodic_2_triangulation_2/p2t2_info_insert_with_transform_iterator_2.cpp
+\example Periodic_2_triangulation_2/p2t2_info_insert_with_zip_iterator_2.cpp
+\example Periodic_2_triangulation_2/p2t2_large_point_set.cpp
+*/
diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h
index 1a4f3500ecb..929a9a0f055 100644
--- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h
+++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h
@@ -198,11 +198,6 @@ public:
/// Functor that returns the point given a vertex
/// \n NGHK: implemented
typedef Project_point Proj_point;
- /// Iterator over the points in the triangulation
- /// \n NGHK: implemented
- typedef Iterator_project
- Point_iterator;
/// \name STL types
// \{
@@ -448,8 +443,8 @@ public:
Periodic_segment periodic_segment(const Face_handle &f, int i) const {
CGAL_triangulation_precondition( number_of_vertices() != 0 );
CGAL_triangulation_precondition( i >= 0 && i <= 2);
- return make_array(periodic_point(f, (i + 1) % 3),
- periodic_point(f, (i + 2) % 3));
+ return make_array(periodic_point(f, ccw(i) % 3),
+ periodic_point(f, cw(i) % 3));
}
/// Same as the previous method for edge e.
@@ -472,6 +467,9 @@ public:
Point point(const Periodic_point & pp) const {
return construct_point(pp.first, pp.second);
}
+ Point point(const Vertex_handle &v) const {
+ return point(periodic_point(v));
+ }
/// Converts the Periodic_segment ps to a Segment in \f$R^2\f$.
/// NGHK: Implemented
Segment segment(const Periodic_segment &ps) const {
@@ -512,6 +510,19 @@ public:
}
//\}
+ Point move_in_domain(const Point &p) {
+ typename Gt::FT x = p.x();
+ typename Gt::FT y = p.y();
+
+ while (x < _domain.xmin()) x += _domain.xmax()-_domain.xmin();
+ while (x >= _domain.xmax()) x -= _domain.xmax()-_domain.xmin();
+
+ while (y < _domain.ymin()) y += _domain.ymax()-_domain.ymin();
+ while (y >= _domain.ymax()) y -= _domain.ymax()-_domain.ymin();
+
+ return Point(x,y);
+ }
+
/// \name Queries on simplices
// \{
/// NGHK: Implemented
@@ -553,7 +564,6 @@ public:
/// Returns the oriented side of the point p with respect to the
/// triangle defined by the face f
- /// \n NGHK: Not yet implemented
Oriented_side oriented_side(Face_handle f, const Point& p) const {
return oriented_side(f, p, Offset());
}
@@ -795,7 +805,6 @@ public:
//\{
/// Insert the first vertex in the triangulation and creates the 9-cover.
- /// NGHK: updates the too long edge list.
Vertex_handle insert_first(const Point& p);
/// Inserts p in the face f and sets the offsets of the newly created faces
/// Insert periodic copies in all periodic copies of the domain
@@ -807,11 +816,9 @@ public:
Vertex_handle insert_in_edge(const Point& p, Face_handle f, int i);
/// Remove a degree 3 vertex from a 2D triangulation
- /// \n NGHK: not implemented
void remove_degree_3(Vertex_handle v);
/// Remove a vertex from a 2D triangulation with number_of_vertices() == 1
- /// \n NGHK: implemented
void remove_first(Vertex_handle v);
/// Remove a vertex from a 2D triangulation with more than one vertex
/// \n NGHK: not implemented
@@ -820,12 +827,14 @@ public:
/// creates a new vertex v and use it to star the hole whose
/// boundary is described by the sequence of edges [edge_begin,
/// edge_end). Returns a handle to the new vertex.
+ /// \n NGHK: not implemented
template
Vertex_handle star_hole(Point p, EdgeIt edge_begin, EdgeIt edge_end);
/// same as above, except that the algorithm first recycles faces in
/// the sequence [face_begin, face_end) and create new ones
/// only when the sequence is exhausted.
+ /// \n NGHK: not implemented
template
Vertex_handle star_hole(Point p, EdgeIt edge_begin, EdgeIt edge_end,
FaceIt face_begin, FaceIt face_end);