MEPP2 Project
print_points.hpp
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 #include <iostream>
14 #include <boost/graph/graph_traits.hpp>
15 
16 namespace FEVV {
17 namespace Filters {
18 
19 
26 template< typename HalfedgeGraph, typename PointMap >
27 void
28 print_points(const HalfedgeGraph &g, PointMap pm)
29 {
30  std::cout << "Points:" << std::endl;
31  typedef boost::graph_traits< HalfedgeGraph > GraphTraits;
32  typedef typename GraphTraits::vertex_iterator vertex_iterator;
33  for(vertex_iterator it = vertices(g).begin(); it != vertices(g).end(); ++it)
34  {
35  std::cout << pm[*it] << std::endl;
36  }
37 }
38 
39 
40 } // namespace Filters
41 } // 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::Filters::print_points
void print_points(const HalfedgeGraph &g, PointMap pm)
Print all vertices coordinates.
Definition: print_points.hpp:28
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16