Go to the documentation of this file.
21 typename HalfedgeGraph,
27 typename boost::graph_traits< HalfedgeGraph >::edge_iterator;
29 typename boost::graph_traits< HalfedgeGraph >::edge_descriptor;
57 auto edge_ite = edge_iterator_pair.first;
60 for( ; edge_ite != edge_iterator_pair.second;
70 std::make_tuple(*edge_ite, weight, collapsePos));
72 std::make_pair(weight, collapsePos));
80 double sum_first_vertex=0., sum_second_vertex=0.;
83 return (sum_first_vertex + sum_second_vertex);
87 return "volumepreserving";
103 boost::iterator_range<
104 CGAL::Halfedge_around_target_iterator< HalfedgeGraph > >
106 sum_first_vertex = 0.;
107 for(
auto h : iterator_range)
109 if((h == current_halfedge) ||
125 sum_second_vertex = 0.;
126 for(
auto h : iterator_range)
void compute_volumes(edge_descriptor e, const Point &collapsePos, double &sum_first_vertex, double &sum_second_vertex)
priority_queue_edges _queue
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor next(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the next halfedge around its face.
edge2cost_map _edges_cost
queue with the cost/weight as the key
typename FEVV::Geometry_traits< HalfedgeGraph >::Point Point
Error_metric< HalfedgeGraph, PointMap > Super_class
std::pair< typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_iterator, typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_iterator > edges(const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the iterator range of the edges of the mesh.
Volume_preserving(HalfedgeGraph &g, PointMap &pm, Kept_position< HalfedgeGraph, PointMap > *vkept, FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > &dequantiz)
GeometryTraits::Vector sub_p(const typename GeometryTraits::Point &p1, const typename GeometryTraits::Point &p2)
Returns point P1 minus point P2.
std::priority_queue< std::tuple< edge_descriptor, double, Point >, std::vector< std::tuple< edge_descriptor, double, Point > >, Compare_weights2< HalfedgeGraph > > priority_queue_edges
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor opposite(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the halfedge with source and target swapped.
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
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.
Abstract class to compute the collapse cost of each edge in a mesh. It also manages a priority queue ...
void compute_error() override
static std::vector< ElementType > cross_product(const ElementType v1[DIM], const ElementType v2[DIM])
FEVV::PCLPointCloudPointMap::value_type get(const FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key)
Specialization of get(point_map, key) for PCLPointCloud.
virtual Point compute_position(typename boost::graph_traits< HalfedgeGraph >::edge_descriptor edge)=0
Compute the kept vertex position of an edge.
typename FEVV::Geometry_traits< HalfedgeGraph >::Vector Vector
typename FEVV::Geometry_traits< HalfedgeGraph > Geometry
Interfaces for plugins These interfaces will be used for different plugins.
std::string get_as_string() const override
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor halfedge(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor v, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns a halfedge with target v.
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.
Kept_position< HalfedgeGraph, PointMap > * _vkept
std::map< edge_descriptor, std::pair< double, Point > > edge2cost_map
typename boost::graph_traits< HalfedgeGraph >::edge_iterator edge_iterator
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor prev(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the previous halfedge around its face.
typename boost::graph_traits< HalfedgeGraph >::edge_descriptor edge_descriptor
double fabs(const v_Curv< HalfedgeGraph > &input)
double tetrahedron_volume(const Point &a, const Point &b, const Point &c, const Point &d) const
double compute_cost_edge(edge_descriptor e, const Point &collapsePos) override
Concrete class to compute the collapse cost of each edge in a mesh as the local absolute volume error...
static ElementType dot_product(const ElementType v1[DIM], const ElementType v2[DIM])
Compute v1 * v2 scalar product.