indexedFace.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  CGAL::indexedFace
28 
29 Description
30  An indexed form of CGAL::Triangulation_face_base_2<K> used to keep
31  track of the vertices in the triangulation.
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef indexedFace_H
36 #define indexedFace_H
37 
38 #include "CGAL/Triangulation_2.h"
39 #include "indexedVertex.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace CGAL
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class indexedFace Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class Gt, class Fb=CGAL::Triangulation_face_base_2<Gt>>
51 class indexedFace
52 :
53  public Fb
54 {
55  // Private data
56 
57  //- The index for this triangle face
58  // -1: triangle and changed and associated data needs updating
59  // >=0: index of triangles, set by external update algorithm
60  int index_;
61 
62 
63 public:
64 
65  enum faceTypes
66  {
67  UNCHANGED = 0,
68  CHANGED = -1,
69  SAVE_CHANGED = -2
70  };
71 
72  typedef typename Fb::Vertex_handle Vertex_handle;
73  typedef typename Fb::Face_handle Face_handle;
74 
75  template<class TDS2>
76  struct Rebind_TDS
77  {
78  typedef typename Fb::template Rebind_TDS<TDS2>::Other Fb2;
80  };
81 
82 
83  // Constructors
84 
85  inline indexedFace();
86 
87  inline indexedFace
88  (
89  Vertex_handle v0,
90  Vertex_handle v1,
91  Vertex_handle v2
92  );
93 
94  inline indexedFace
95  (
96  Vertex_handle v0,
97  Vertex_handle v1,
98  Vertex_handle v2,
99  Face_handle n0,
100  Face_handle n1,
101  Face_handle n2
102  );
103 
104 
105  // Member Functions
106 
107  inline void set_vertex(int i, Vertex_handle v);
108 
109  inline void set_vertices();
110 
111  inline void set_vertices
112  (
113  Vertex_handle v0,
114  Vertex_handle v1,
115  Vertex_handle v2
116  );
117 
118  inline int& faceIndex();
119 
120  inline int faceIndex() const;
121 
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace CGAL
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #include "indexedFaceI.H"
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
CGAL::indexedFace::faceIndex
int & faceIndex()
Definition: indexedFaceI.H:99
CGAL::indexedFace::set_vertices
void set_vertices()
Definition: indexedFaceI.H:78
CGAL
Definition: indexedCell.H:56
CGAL::indexedFace
An indexed form of CGAL::Triangulation_face_base_2<K> used to keep track of the vertices in the trian...
Definition: indexedFace.H:50
CGAL::indexedFace::Vertex_handle
Fb::Vertex_handle Vertex_handle
Definition: indexedFace.H:71
CGAL::indexedFace::faceTypes
faceTypes
Definition: indexedFace.H:64
CGAL::indexedFace::indexedFace
indexedFace()
Definition: indexedFaceI.H:31
CGAL::indexedFace::Rebind_TDS::Fb2
Fb::template Rebind_TDS< TDS2 >::Other Fb2
Definition: indexedFace.H:77
CGAL::indexedFace::Face_handle
Fb::Face_handle Face_handle
Definition: indexedFace.H:72
CGAL::indexedFace::UNCHANGED
Definition: indexedFace.H:66
indexedVertex.H
CGAL::indexedFace::Rebind_TDS
Definition: indexedFace.H:75
CGAL::indexedFace::SAVE_CHANGED
Definition: indexedFace.H:68
CGAL::indexedFace::CHANGED
Definition: indexedFace.H:67
indexedFaceI.H
CGAL::indexedFace::Rebind_TDS::Other
indexedFace< Gt, Fb2 > Other
Definition: indexedFace.H:78
CGAL::indexedFace::set_vertex
void set_vertex(int i, Vertex_handle v)
Definition: indexedFaceI.H:70