MEPP2 Project
Graph_traits_extension_cgal_polyhedron_3.h
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published
6 // by the Free Software Foundation; either version 3 of the License,
7 // or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 #pragma once
12 
13 /*
14  * Specialization of graph traits extension
15  * for CGAL::Polyhedron_3
16  */
17 
18 #include "Graph_traits_extension.h"
19 #include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
20 
21 namespace FEVV {
22 
23 
32 template< typename T1, // class PolyhedronTraits_3
33  typename T2, // class PolyhedronItems_3 =
34  // CGAL::Polyhedron_items_3,
35  template< class A,
36  class B,
37  class C > class T3, // class T_HDS = HalfedgeDS_default
38  typename T4 > // class Alloc = CGAL_ALLOCATOR(int)
39 typename boost::graph_traits<
40  CGAL::Polyhedron_3< T1, T2, T3, T4 > const >::vertices_size_type
41 size_of_vertices(const CGAL::Polyhedron_3< T1, T2, T3, T4 > &g)
42 {
43  return g.size_of_vertices();
44 }
45 
46 
55 template< typename T1, // class PolyhedronTraits_3
56  typename T2, // class PolyhedronItems_3 =
57  // CGAL::Polyhedron_items_3,
58  template< class A,
59  class B,
60  class C > class T3, // class T_HDS = HalfedgeDS_default
61  typename T4 > // class Alloc = CGAL_ALLOCATOR(int)
62 typename boost::graph_traits<
63  CGAL::Polyhedron_3< T1, T2, T3, T4 > const >::edges_size_type
64 size_of_edges(const CGAL::Polyhedron_3< T1, T2, T3, T4 > &g)
65 {
66  return g.size_of_halfedges() / 2;
67 }
68 
69 
78 template< typename T1, // class PolyhedronTraits_3
79  typename T2, // class PolyhedronItems_3 =
80  // CGAL::Polyhedron_items_3,
81  template< class A,
82  class B,
83  class C > class T3, // class T_HDS = HalfedgeDS_default
84  typename T4 > // class Alloc = CGAL_ALLOCATOR(int)
85 typename boost::graph_traits<
86  CGAL::Polyhedron_3< T1, T2, T3, T4 > const >::halfedges_size_type
87 size_of_halfedges(const CGAL::Polyhedron_3< T1, T2, T3, T4 > &g)
88 {
89  return g.size_of_halfedges();
90 }
91 
92 
101 template< typename T1, // class PolyhedronTraits_3
102  typename T2, // class PolyhedronItems_3 =
103  // CGAL::Polyhedron_items_3,
104  template< class A,
105  class B,
106  class C > class T3, // class T_HDS = HalfedgeDS_default
107  typename T4 > // class Alloc = CGAL_ALLOCATOR(int)
108 typename boost::graph_traits<
109  CGAL::Polyhedron_3< T1, T2, T3, T4 > const >::faces_size_type
110 size_of_faces(const CGAL::Polyhedron_3< T1, T2, T3, T4 > &g)
111 {
112  return g.size_of_facets();
113 }
114 
115 
116 } // namespace FEVV
117 
118 
119 // ELO note: Clear mesh
120 // see
121 // http://doc.cgal.org/latest/Polyhedron/classCGAL_1_1Polyhedron__3.html
122 //
123 // void clear()
124 // removes all vertices, halfedges, and facets.
125 
FEVV::size_of_halfedges
boost::graph_traits< MeshT >::halfedges_size_type size_of_halfedges(const MeshT &g)
Real current number of halfedges of the mesh. Generic version.
Definition: Graph_traits_extension.h:63
boost
Definition: Graph_properties_aif.h:48
FEVV::size_of_edges
boost::graph_traits< MeshT >::edges_size_type size_of_edges(const MeshT &g)
Real current number of edges of the mesh. Generic version.
Definition: Graph_traits_extension.h:46
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::size_of_faces
boost::graph_traits< MeshT >::faces_size_type size_of_faces(const MeshT &g)
Real current number of faces of the mesh. Generic version.
Definition: Graph_traits_extension.h:80
Graph_traits_extension.h
FEVV::size_of_vertices
boost::graph_traits< MeshT >::vertices_size_type size_of_vertices(const MeshT &g)
Real current number of vertices of the mesh. Generic version.
Definition: Graph_traits_extension.h:29