MEPP2 Project
print_halfedge.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 Operators {
18 
19 
27 template< typename HalfedgeGraph, typename PointMap >
28 void
30  const typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor &h,
31  PointMap pm,
32  const HalfedgeGraph &g)
33 {
34  typedef boost::graph_traits< HalfedgeGraph > GraphTraits;
36 
37  vertex_descriptor vs = source(h, g);
38  vertex_descriptor vt = target(h, g);
39  std::cout << "Halfedge: source = " << pm[vs] << " target = " << pm[vt]
40  << "\n";
41 }
42 
43 
44 } // namespace Operators
45 } // namespace FEVV
46 
FEVV::DataStructures::AIF::source
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor source(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the source vertex of e.
Definition: Graph_traits_aif.h:387
FEVV::Operators::print_halfedge
void print_halfedge(const typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor &h, PointMap pm, const HalfedgeGraph &g)
Print the source and the target coordinates of one halfedge.
Definition: print_halfedge.hpp:29
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::DataStructures::AIF::target
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor target(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the target vertex of e.
Definition: Graph_traits_aif.h:400
msdm2::vertex_descriptor
boost::graph_traits< MeshT >::vertex_descriptor vertex_descriptor
Definition: msdm2_surfacemesh.h:33