Skip to content

Commit 3ad8f65

Browse files
committed
small fixes
1 parent 9f11f46 commit 3ad8f65

File tree

81 files changed

+8362
-1752
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+8362
-1752
lines changed

BGL/doc/BGL/BGL.txt

Lines changed: 221 additions & 120 deletions
Large diffs are not rendered by default.

BGL/doc/BGL/CGAL/halfedge_graph_traits.h

Lines changed: 0 additions & 13 deletions
This file was deleted.

BGL/doc/BGL/CGAL/properties.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/// Boost Namespace
2+
namespace boost {
3+
4+
/// \ingroup PkgBGLProperties
5+
/// @{
6+
7+
/// The constant `edge_index` is a property tag which identifies the <i>index</i> property of an edge of a \sc{Bgl}
8+
/// <a href="http://www.boost.org/libs/graph/doc/Graph.html"><code>Graph</code></a>.
9+
/// \cgalModels <a href="http://www.boost.org/libs/graph/doc/PropertyTag.html"><code>PropertyTag</code></a>
10+
enum edge_index_t { edge_index};
11+
12+
/// The constant `vertex_index` is a property tag which identifies the <i>index</i> property of a vertex of a \sc{Bgl}
13+
/// <a href="http://www.boost.org/libs/graph/doc/Graph.html"><code>Graph</code></a>.
14+
/// \cgalModels <a href="http://www.boost.org/libs/graph/doc/PropertyTag.html"><code>PropertyTag</code></a>
15+
enum vertex_index_t { vertex_index };
16+
17+
/// The constant `halfedge_index` is a property tag which identifies the <i>index</i> property of a halfedge of a `HalfedgeGraph`.
18+
///
19+
/// This is a property tag introduced by \cgal.
20+
/// \cgalModels <a href="http://www.boost.org/libs/graph/doc/PropertyTag.html"><code>PropertyTag</code></a>
21+
enum halfedge_index_t { halfedge_index };
22+
23+
/// The constant `face_index` is a property tag which identifies the <i>index</i> property of a face of a `FaceGraph`.
24+
///
25+
/// This is a property tag introduced by \cgal.
26+
/// \cgalModels <a href="http://www.boost.org/libs/graph/doc/PropertyTag.html"><code>PropertyTag</code></a>
27+
enum face_index_t { face_index };
28+
29+
30+
/// The constant `vertex_point` is a property tag which refers to the geometric embedding property of
31+
/// a vertex of a `HalfedgeGraph`.
32+
///
33+
/// This is a property tag introduced by \cgal.
34+
/// \cgalModels <a href="http://www.boost.org/libs/graph/doc/PropertyTag.html"><code>PropertyTag</code></a>
35+
enum vertex_point_t { vertex_point };
36+
37+
38+
/// @}
39+
}

BGL/doc/BGL/Concepts/FaceGraph.h

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*!
2+
\ingroup PkgBGLConcepts
3+
\cgalConcept
4+
5+
The concept `FaceGraph` refines the concept `HalfedgeGraph`.
6+
It adds the requirements for a graph to explicitly
7+
maintain faces described by halfedges, to provide access from a face to
8+
an incident halfedge, and to provide access from a halfedge to its incident
9+
face.
10+
11+
\cgalRefines `HalfedgeGraph`
12+
\cgalHasModel `CGAL::Polyhedron_3`
13+
14+
\cgalHeading{Notations}
15+
16+
<dl>
17+
<dt>`G`</dt> <dd>A type that is a model of `FaceGraph`.</dd>
18+
<dt>`g`</dt> <dd>An object of type `G`.</dd>
19+
<dt>`e`</dt> <dd>An edge descriptor.</dd>
20+
<dt>`f`</dt> <dd>A face descriptor.</dd>
21+
<dt>`h`</dt> <dd>A halfedge descriptor.</dd>
22+
</dl>
23+
24+
\cgalHeading{Associated Types}
25+
26+
Type | Description
27+
-------------------- | ------------
28+
`boost::graph_traits<G>::%face_descriptor` | A `face_descriptor` corresponds to a unique face in a graph. Must be `DefaultConstructible`, `Assignable`, `EqualityComparable` and `LessThanComparable`.
29+
30+
31+
\cgalHeading{Valid Expressions}
32+
33+
Expression | Returns | Description
34+
-------------------------------------- | ------------------------------------------------------------------------ | ------------------------
35+
`face(h, g)` | `face_descriptor` | The face incident to halfedge `h`.
36+
`halfedge(f, g)` | `halfedge_descriptor` | A halfedge incident to face `f`.
37+
`degree(f,g)` | `degree_size_type` | The number of halfedges, incident to face `f`.
38+
`boost::graph_traits<G>::%null_face()` | `face_descriptor` | Returns a special face that is not equal to any other face.
39+
40+
41+
*/
42+
class FaceGraph {};
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*!
2+
\ingroup PkgBGLConcepts
3+
\cgalConcept
4+
5+
The concept `FaceListGraph` refines the concept `FaceGraph` and adds
6+
the requirement for traversal of all faces in a graph.
7+
8+
\cgalRefines `FaceGraph`
9+
\cgalHasModel `CGAL::Polyhedron_3`
10+
11+
\cgalHeading{Notations}
12+
13+
<dl>
14+
<dt>`G`</dt> <dd>A type that is a model of `FaceListGraph`.</dd>
15+
<dt>`g`</dt> <dd>An object of type `G`.</dd>
16+
</dl>
17+
18+
\cgalHeading{Associated Types}
19+
20+
Type | Description
21+
----------------- | -----------
22+
`boost::graph_traits<G>::%face_iterator` | %Iterator over all faces.
23+
`boost::graph_traits<G>::%faces_size_type` | Unsigned integer type for number of faces.
24+
25+
26+
\cgalHeading{Valid Expressions}
27+
28+
Expression | returns | Description
29+
----------------- | --------------- | -----------------------
30+
`faces(g)` | `std::pair<face_iterator, face_iterator>` | An iterator range over all faces.
31+
`num_faces(g)` | `faces_size_type` | An upper bound of the number of faces of the graph.
32+
33+
\attention `num_faces()` may return a number larger than `std::distance(faces(g).first, faces(g).second)`.
34+
This is the case for implementations only marking faces deleted in the face container.
35+
<!--
36+
This is for example the case for `CGAL::Surface_mesh` or `OpenMesh::PolyMesh_ArrayKernelT`.
37+
-->
38+
39+
*/
40+
class FaceListGraph{};
Lines changed: 39 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,57 @@
1-
21
/*!
32
\ingroup PkgBGLConcepts
43
\cgalConcept
54
6-
The concept `HalfedgeGraph` describes the requirements for a graph that is
7-
structurally equivalent to a polyhedral surface represented by a
8-
halfedge data structure, and it provides an interface for efficient
9-
access to the opposite edge of an edge, and to the successor and
10-
predecessor of an edge in the iterator range of the incoming edges of
11-
a vertex. Each vertex has a geometric position in space. As in a
12-
halfedge data structure we define the face adjacent to a halfedge to be
13-
to the <I>left</I> of the halfedge.
14-
15-
\cgalHeading{Requirements}
5+
The concept `HalfedgeGraph` is a refinement of the \sc{Bgl} concept
6+
<A HREF="http://www.boost.org/libs/graph/doc/Graph.html">`Graph`</A> and adds the notion of a *halfedge*: Each edge is
7+
associated with two *opposite* halfedges with source and target vertices swapped.
8+
Furthermore, halfedges have a *successor* and *predecessor*,
9+
and form cycles we call *faces*. However, this concept
10+
does not introduce a face type.
11+
A `HalfedgeGraph` is undirected and does not allow parallel edges.
1612
17-
For each <I>directed edge</I> `e=(v,w)` its opposite edge `e2=(w,v)`
18-
must be part of the graph.
13+
Using the composition of the *successor* and *opposite* functions results
14+
in another cycle, namely the cycle of halfedges which are incident to
15+
the same vertex. We refer to \ref PkgBGLIterators for a description of
16+
iterators and circulators for these halfedge cycles.
1917
20-
The incoming edges of a vertex `v` have a fixed order, that is all
21-
calls of `in_edges(v,g)` must return the same iterator range,
22-
modulo a cyclic permutation. The order must be <I>clockwise</I>.
2318
24-
As the `HalfedgeGraph` is equivalent to a polyhedral surface there must exist an embedding
25-
for the vertices and edges such that the ordered edges do not intersect.
19+
\cgalRefines <A HREF="http://www.boost.org/libs/graph/doc/Graph.html">`Graph`</A>
20+
\cgalRefines <A HREF="http://www.boost.org/libs/graph/doc/PropertyGraph.html">`PropertyGraph`</A>
2621
27-
\cgalRefines <A HREF="http://www.boost.org/libs/graph/doc/BidirectionalGraph.html">BidirectionalGraph</A>
28-
\cgalRefines <A HREF="http://www.boost.org/libs/graph/doc/PropertyGraph.html">PropertyGraph</A>
22+
A model of `HalfedgeGraph` must have the interior property `vertex_point` attached to its vertices.
2923
30-
A model of `HalfedgeGraph` must have the <I>interior properties</I>
31-
`edge_is_border` attached to its edges, and it must have
32-
`vertex_is_border` and `vertex_point` attached to its vertices.
33-
34-
\cgalHeading{Associated Types}
24+
\cgalHasModel `CGAL::Polyhedron_3`
3525
36-
Because (directed) edges must come in pairs, there is the
37-
additional notion of an <I>undirected edge</I>
38-
\cgalFootnote{The directed edges are not called `halfedges` (as in a `HalfedgeDS`) because from the point of view of this graph, being a refinement of a Bgl graph, each directed edge is an edge in itself. In other words, the unqualified term edge refers to one and only one directed edge and not to a pair.}
39-
for a pair of opposite directed edges. The number of undirected
40-
edges is exactly half the number of directed edges. Note that the
41-
notion of directed and undirected edges does not imply the
42-
existence of two different types. The type `%edge_descriptor` is
43-
used for both. An undirected edge must be implicitly handled, and
44-
there is no requirement on which of the directed edges of the
45-
undirected edge must be used to represent it.
26+
\cgalHeading{Notations}
4627
28+
<dl>
29+
<dt>`G`</dt> <dd>A type that is a model of `HalfedgeGraph`.</dd>
30+
<dt>`g`</dt> <dd>An object of type `G`.</dd>
31+
<dt>`u`, `v`</dt> <dd>Vertex descriptors.</dd>
32+
<dt>`e`</dt> <dd>An edge descriptor.</dd>
33+
<dt>`h`</dt> <dd>A halfedge descriptor.</dd>
34+
</dl>
4735
48-
Associated Type | Explanation
49-
----------------|-------------
50-
halfedge_graph_traits<HalfedgeGraph>::Point; | The type of the geometric location of a vertex.
51-
halfedge_graph_traits<HalfedgeGraph>::undirected_edge_iterator; | An iterator that iterates over one and only one of the directed edges in each pair of opposite directed edges. The value type of the iterator is `boost::graph_traits<HalfedgeGraph>::%edge_descriptor`.
36+
\cgalHeading{Associated Types}
5237
38+
Type | Description
39+
--------------------------------------------------------- | ------------
40+
`boost::graph_traits<G>::%halfedge_descriptor` | A `halfedge_descriptor` corresponds to a halfedge in a graph. Must be `DefaultConstructible`, `Assignable`, `EqualityComparable` and `LessThanComparable`.
5341
5442
5543
\cgalHeading{Valid Expressions}
5644
57-
Following the \sc{Bgl} design, the following graph operations are defined as free
58-
rather than member functions.
59-
60-
\cgalHasModel `CGAL::Polyhedron_3<Traits>`
45+
Expression | Returns | Description
46+
--------------------------------------- | ---------------------------------------------------------------------------- | -----------
47+
`edge(h, g)` | `edge_descriptor` | The edge corresponding to `h` and `opposite(h)`.
48+
`halfedge(e, g)` | `halfedge_descriptor` | One of the halfedges corresponding to `e`.
49+
`halfedge(v, g)` | `halfedge_descriptor` | A halfedge with target `v`.
50+
`halfedge(u, v, g)` | `std::pair<halfedge_descriptor,bool>` | The halfedge with source `u` and target `v`. The Boolean is `true`, iff this halfedge exists.
51+
`opposite(h, g)` | `halfedge_descriptor` | The halfedge with source and target swapped.
52+
`source(h,g)` | `vertex_descriptor` | The source vertex of `h`.
53+
`target(h,g)` | `vertex_descriptor` | The target vertex of `h`.
54+
`next(h, g)` | `halfedge_descriptor` | The next halfedge around its face.
55+
`prev(h, g)` | `halfedge_descriptor` | The previous halfedge around its face.
6156
*/
62-
class HalfedgeGraph {
63-
64-
};
65-
66-
/*!
67-
Returns the undirected edges of `g`.
68-
69-
\relates HalfedgeGraph
70-
*/
71-
template<class Graph>
72-
std::pair<typename halfedge_graph_traits<HalfedgeGraph>::undirected_edge_iterator,
73-
typename halfedge_graph_traits<HalfedgeGraph>::undirected_edge_iterator>
74-
undirected_edges(const Graph& g);
75-
76-
/*!
77-
Returns the opposite edge of `e`.
78-
79-
An edge `e=(v,w)` is said to be the <I>opposite edge</I> of edge
80-
`e2=(w,v)`.
81-
82-
\relates HalfedgeGraph
83-
*/
84-
template<class Graph>
85-
typename boost::graph_traits<Graph const>::edge_descriptor
86-
opposite_edge(typename boost::graph_traits<Graph const>::edge_descriptor e, Graph const& g );
87-
88-
/*!
89-
Returns the clockwise neighbor of `e`.
90-
91-
An edge `e2=(v,w)` is called the <I>clockwise neighbor</I> of
92-
edge `e=(u,w)`, and `e` the <I>counterclockwise neighbor</I>
93-
of `e2`, iff there exist two iterators `it` and `it2`
94-
in the iterator range `in_edges(w,g)` such that `**it == e` and `**it2
95-
== e2`, and `it2 == it++` or `it` is the last and `it2` the first
96-
iterator of the iterator range.
97-
98-
\relates HalfedgeGraph
99-
*/
100-
template<class Graph>
101-
typename boost::graph_traits<Graph const>::edge_descriptor
102-
next_edge_cw(typename boost::graph_traits<Graph const>::edge_descriptor e, Graph const& g );
103-
104-
/*!
105-
Returns the counterclockwise neighbor of `e`.
106-
\relates HalfedgeGraph
107-
*/
108-
template<class Graph>
109-
typename boost::graph_traits<Graph const>::edge_descriptor
110-
next_edge_ccw(typename boost::graph_traits<Graph const>::edge_descriptor e, Graph const& g );
111-
112-
/*!
113-
Returns the successor of `e`.
114-
115-
An edge `e2=(v,w)` is called the <I>successor</I> of edge `
116-
e=(u,v)`, and `e` the <I>predecessor</I> of `e2`, iff `
117-
e2` is the clockwise neighbor of the opposite edge of `e`.
118-
119-
\relates HalfedgeGraph
120-
*/
121-
template<class Graph>
122-
typename boost::graph_traits<Graph const>::edge_descriptor
123-
next_edge(typename boost::graph_traits<Graph const>::edge_descriptor e, Graph const& g );
124-
125-
/*!
126-
Returns the predecessor of `e`.
127-
128-
An edge `e2=(v,w)` is called the <I>successor</I> of edge `
129-
e=(u,v)`, and `e` the <I>predecessor</I> of `e2`, iff `
130-
e2` is the clockwise neighbor of the opposite edge of `e`.
131-
132-
\relates HalfedgeGraph
133-
*/
134-
template<class Graph>
135-
typename boost::graph_traits<Graph const>::edge_descriptor
136-
prev_edge(typename boost::graph_traits<Graph const>::edge_descriptor e, Graph const& g );
57+
class HalfedgeGraph {};
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*!
2+
\ingroup PkgBGLConcepts
3+
\cgalConcept
4+
5+
The concept `HalfedgeListGraph` refines the concept `HalfedgeGraph`
6+
and adds the requirements for traversal of all halfedges in the graph.
7+
8+
\cgalRefines `HalfedgeGraph`
9+
\cgalHasModel `CGAL::Polyhedron_3`
10+
11+
\cgalHeading{Notations}
12+
13+
<dl>
14+
<dt>`G`</dt> <dd>A type that is a model of `HalfedgeListGraph`.</dd>
15+
<dt>`g`</dt> <dd>An object of type `G`.</dd>
16+
</dl>
17+
18+
\cgalHeading{Associated Types}
19+
20+
Type | Description
21+
-------------------- | ------------
22+
`boost::graph_traits<G>::%halfedge_iterator` | A `BidirectionalIterator` over all halfedges in a graph. Must be `DefaultConstructible`, `Assignable`, `EqualityComparable`.
23+
`boost::graph_traits<G>::%halfedges_size_type` | A size type.
24+
25+
26+
\cgalHeading{Valid Expressions}
27+
28+
Expression | Returns | Description
29+
------------------------------------- | ---------------------------------------------------- | -----------
30+
`num_halfedges(g)` | `halfedges_size_type` | An upper bound of the number of halfedges of the graph.
31+
`halfedges(g)` | `std::pair<halfedge_iterator,halfedge_iterator>` | An iterator range over the halfedges of the graph.
32+
33+
\attention `num_halfedges()` may return a number larger than `std::distance(halfedges(g).first,halfedges(g).second)`.
34+
This is the case for implementations only marking halfedges deleted in the halfedge container.
35+
36+
<!--
37+
This is for example the case for `CGAL::Surface_mesh` or `OpenMesh::PolyMesh_ArrayKernelT`.
38+
-->
39+
40+
*/
41+
42+
class HalfedgeListGraph {};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*!
2+
\ingroup PkgBGLConcepts
3+
\cgalConcept
4+
5+
The concept `MutableFaceGraph` refines the concepts `FaceGraph` and `MutableHalfedgeGraph` and adds
6+
the requirement for operations to add faces and to modify face-halfedge relations.
7+
8+
\cgalRefines `FaceGraph`
9+
\cgalRefines `MutableHalfedgeGraph`
10+
\cgalHasModel `CGAL::Polyhedron_3`
11+
12+
\cgalHeading{Notations}
13+
14+
<dl>
15+
<dt>`G`</dt> <dd>A type that is a model of `MutableFaceGraph`.</dd>
16+
<dt>`g`</dt> <dd>An object of type `G`.</dd>
17+
<dt>`h`</dt> <dd>A halfedge descriptor.</dd>
18+
<dt>`f`</dt> <dd>A face descriptor.</dd>
19+
</dl>
20+
21+
\cgalHeading{Valid Expressions}
22+
23+
Expression | returns | Description
24+
----------------------- | ------------ | -----------
25+
`add_face(g)` | `face_descriptor` | Adds a new face to the graph with no corresponding halfedge set.
26+
`remove_face(f, g)` | `void` | Removes `f` from the graph.
27+
`set_face(h, f, g)` | `void` | Sets the corresponding face of `h` to `f`.
28+
`set_halfedge(f, h, g)` | `void` | Sets the corresponding halfedge of `f` to `h`.
29+
30+
*/
31+
class MutableFaceGraph{};

0 commit comments

Comments
 (0)