1 // Copyright (c) 2019 GeometryFactory (France). All rights reserved. 2 // 3 // This file is part of CGAL (www.cgal.org) 4 // 5 // $URL: https://github.com/CGAL/cgal/blob/v5.3/Triangulation_2/include/CGAL/Triangulation_face_base_with_id_2.h $ 6 // $Id: Triangulation_face_base_with_id_2.h 8bb22d5 2020-03-26T14:23:37+01:00 Sébastien Loriot 7 // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial 8 // 9 // 10 // Author(s) : Mael Rouxel-Labbé 11 12 #ifndef CGAL_TRIANGULATION_FACE_BASE_WITH_ID_2_H 13 #define CGAL_TRIANGULATION_FACE_BASE_WITH_ID_2_H 14 15 #include <CGAL/Triangulation_face_base_2.h> 16 17 namespace CGAL { 18 19 template < typename GT, 20 typename Fb = Triangulation_face_base_2<GT> > 21 class Triangulation_face_base_with_id_2 22 : public Fb 23 { 24 public: 25 typedef typename Fb::Vertex_handle Vertex_handle; 26 typedef typename Fb::Face_handle Face_handle; 27 28 template < typename TDS2 > 29 struct Rebind_TDS { 30 typedef typename Fb::template Rebind_TDS<TDS2>::Other Fb2; 31 typedef Triangulation_face_base_with_id_2<GT, Fb2> Other; 32 }; 33 Triangulation_face_base_with_id_2()34 Triangulation_face_base_with_id_2() : Fb() { } 35 Triangulation_face_base_with_id_2(Vertex_handle v0,Vertex_handle v1,Vertex_handle v2)36 Triangulation_face_base_with_id_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2) 37 : Fb(v0, v1, v2) 38 { } 39 Triangulation_face_base_with_id_2(Vertex_handle v0,Vertex_handle v1,Vertex_handle v2,Face_handle n0,Face_handle n1,Face_handle n2)40 Triangulation_face_base_with_id_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, 41 Face_handle n0, Face_handle n1, Face_handle n2) 42 : Fb(v0, v1, v2, n0, n1, n2) 43 { } 44 id()45 int& id() { return face_id; } id()46 int id() const { return face_id; } 47 edge_id(const std::size_t i)48 int& edge_id(const std::size_t i) { return edge_ids[i]; } edge_id(const std::size_t i)49 int edge_id(const std::size_t i) const { return edge_ids[i]; } 50 51 private: 52 int face_id; 53 std::array<int, 3> edge_ids; 54 }; 55 56 } //namespace CGAL 57 58 #endif // CGAL_TRIANGULATION_FACE_BASE_WITH_ID_2_H 59