MEPP2 Project
PointCloudConceptCheck.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 Lesser General Public License as
6 // published by the Free Software Foundation; either version 3 of
7 // the License, 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 namespace FEVV {
15 
16 
17 template<typename PointCloudT>
18 void
19 check_point_cloud_concept(PointCloudT &pc)
20 {
21  // types
22  typedef boost::graph_traits< PointCloudT > GraphTraits;
23  typedef typename GraphTraits::vertices_size_type vertices_size_type;
25  typedef typename GraphTraits::vertex_iterator vertex_iterator;
26 
27 #ifdef __GNUC__
28 #pragma GCC diagnostic push
29 #pragma GCC diagnostic ignored "-Wunused-variable"
30 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
31 #endif
32  // null_vertex()
33  vertex_descriptor vd_null = GraphTraits::null_vertex();
34 
35  // free functions
36 
37  // vertices(pc)
38  std::pair< vertex_iterator, vertex_iterator > iterator_pair;
39  iterator_pair = vertices(pc);
40 
41  // size_of_vertices(pc)
42  vertices_size_type n1 = size_of_vertices(pc);
43 
44  // num_vertices(pc)
45  vertices_size_type n2 = num_vertices(pc);
46 #ifdef __GNUC__
47 #pragma GCC diagnostic pop
48 #endif
49 
50  // add_vertex(pc)
52 
53  // remove_vertex(vd, pc)
54  remove_vertex(vd, pc);
55 }
56 
57 
58 } // namespace FEVV
FEVV::DataStructures::AIF::vertices
std::pair< typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_iterator, typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_iterator > vertices(const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the iterator range of the vertices of the mesh.
Definition: Graph_traits_aif.h:172
FEVV::DataStructures::AIF::remove_vertex
void remove_vertex(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor v, FEVV::DataStructures::AIF::AIFMesh &sm)
Removes v from the mesh.
Definition: Graph_traits_aif.h:728
FEVV::DataStructures::AIF::num_vertices
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertices_size_type num_vertices(const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns an upper bound of the number of vertices of the mesh.
Definition: Graph_traits_aif.h:191
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::DataStructures::AIF::add_vertex
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor add_vertex(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_property_type vp, FEVV::DataStructures::AIF::AIFMesh &sm)
Definition: Graph_properties_aif.h:263
msdm2::vertex_descriptor
boost::graph_traits< MeshT >::vertex_descriptor vertex_descriptor
Definition: msdm2_surfacemesh.h:33
FEVV::check_point_cloud_concept
void check_point_cloud_concept(PointCloudT &pc)
Definition: PointCloudConceptCheck.h:19
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