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