MEPP2 Project
Graph_traits_extension_cgal_surface_mesh.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::Surface_mesh
16  */
17 
18 #include "Graph_traits_extension.h"
19 #include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
20 
21 namespace FEVV {
22 
23 
32 template< typename PointT >
33 typename boost::graph_traits< CGAL::Surface_mesh< PointT > >::vertices_size_type
34 size_of_vertices(const CGAL::Surface_mesh< PointT > &g)
35 {
36  return g.number_of_vertices();
37 }
38 
39 
48 template< typename PointT >
49 typename boost::graph_traits< CGAL::Surface_mesh< PointT > >::edges_size_type
50 size_of_edges(const CGAL::Surface_mesh< PointT > &g)
51 {
52  return g.number_of_edges();
53 }
54 
55 
64 template< typename PointT >
65 typename boost::graph_traits<
66  CGAL::Surface_mesh< PointT > >::halfedges_size_type
67 size_of_halfedges(const CGAL::Surface_mesh< PointT > &g)
68 {
69  return g.number_of_halfedges();
70 }
71 
72 
81 template< typename PointT >
82 typename boost::graph_traits< CGAL::Surface_mesh< PointT > >::faces_size_type
83 size_of_faces(const CGAL::Surface_mesh< PointT > &g)
84 {
85  return g.number_of_faces();
86 }
87 
88 
89 } // namespace FEVV
90 
91 
92 // ELO note: Clear mesh
93 // see
94 // http://doc.cgal.org/latest/Surface_mesh/classCGAL_1_1Surface__mesh.html#a247d4ad3e6b106ae22e5306203812642
95 //
96 // void clear()
97 // removes all vertices, halfedge, edges and faces. Collects garbage and
98 // clears all properties.
99 // see
100 // CGAL-4.9/include/CGAL/boost/graph/helpers.h
101 //
102 
103 
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
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