MEPP2 Project
Halfedge.h
Go to the documentation of this file.
1 // Copyright (c) 2012-2022 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 
12 #pragma once
13 
15 
16 namespace FEVV {
17 namespace Filters {
22 template< typename HalfedgeGraph,
23  typename PointMap,
24  typename Geometry = typename FEVV::Geometry_traits< HalfedgeGraph > >
25 class Halfedge : public Kept_position< HalfedgeGraph,
26  PointMap,
27  Geometry >
28 {
29 public:
30  using Vector = typename Geometry::Vector;
31  using Point = typename Geometry::Point;
32  typedef Kept_position< HalfedgeGraph,
33  PointMap,
34  Geometry >
36  Halfedge(HalfedgeGraph &g,
37  PointMap &pm)
38  : Super_class(g, pm)
39  {
40  Super_class::_type = VKEPT_POSITION::HALFEDGE;
41  Super_class::_reverse = true; // has a reverse case
42  }
43  Halfedge(HalfedgeGraph &g,
44  PointMap &pm,
45  Geometry &gt)
46  : Super_class(g, pm, gt)
47  {
48  Super_class::_type = VKEPT_POSITION::HALFEDGE;
49  Super_class::_reverse = true; // has a reverse case
50  }
52 
55  typename boost::graph_traits< HalfedgeGraph >::edge_descriptor edge) override
56  {
58  }
59  std::string get_as_string() const override { return "halfedge"; }
60 };
61 
62 } // namespace Filters
63 } // namespace FEVV
Vector
AIFMesh::Vector Vector
Definition: Graph_properties_aif.h:22
FEVV::Filters::Kept_position::_pm
PointMap & _pm
Definition: Kept_position.h:55
FEVV::Filters::Halfedge::Vector
typename Geometry::Vector Vector
Definition: Halfedge.h:30
FEVV::Filters::Halfedge::Super_class
Kept_position< HalfedgeGraph, PointMap, Geometry > Super_class
Definition: Halfedge.h:35
Kept_position.h
FEVV::Filters::Kept_position::_g
HalfedgeGraph & _g
Definition: Kept_position.h:53
FEVV::Geometry_traits< HalfedgeGraph >
Point
AIFMesh::Point Point
Definition: Graph_properties_aif.h:21
FEVV::DataStructures::AIF::edge
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor edge(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the edge corresponding to h and opposite(h).
Definition: Graph_traits_aif.h:345
FEVV::Filters::Halfedge
Concrete class to represent the target position type of the resulting vertex of an edge collapse.
Definition: Halfedge.h:28
FEVV::Filters::Halfedge::~Halfedge
~Halfedge()
Definition: Halfedge.h:51
FEVV::Filters::Halfedge::Halfedge
Halfedge(HalfedgeGraph &g, PointMap &pm, Geometry &gt)
Definition: Halfedge.h:43
FEVV::Filters::Halfedge::get_as_string
std::string get_as_string() const override
Definition: Halfedge.h:59
FEVV::get
FEVV::PCLPointCloudPointMap::value_type get(const FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key)
Specialization of get(point_map, key) for PCLPointCloud.
Definition: Graph_properties_pcl_point_cloud.h:117
FEVV::Filters::Kept_position
Abstract class to represent the position type of the resulting vertex of an edge collapse.
Definition: Kept_position.h:31
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::Filters::Halfedge::Halfedge
Halfedge(HalfedgeGraph &g, PointMap &pm)
Definition: Halfedge.h:36
FEVV::Filters::Halfedge::compute_position
Point compute_position(typename boost::graph_traits< HalfedgeGraph >::edge_descriptor edge) override
Compute the target position of an edge.
Definition: Halfedge.h:54
FEVV::Filters::Kept_position::_type
FEVV::Filters::VKEPT_POSITION _type
Definition: Kept_position.h:56
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
FEVV::Filters::Kept_position::_reverse
bool _reverse
Definition: Kept_position.h:57
FEVV::Filters::Halfedge::Point
typename Geometry::Point Point
Definition: Halfedge.h:31