MEPP2 Project
Public Types | Public Member Functions | Private Member Functions | List of all members
FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap > Class Template Reference

Concrete class to compute the collapse cost of each edge in a mesh as the local absolute volume error.
More...

#include <Volume_preserving.h>

Inheritance diagram for FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >:
Inheritance graph
Collaboration diagram for FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >:
Collaboration graph

Public Types

using edge_iterator = typename boost::graph_traits< HalfedgeGraph >::edge_iterator
 
using edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor
 
using Vector = typename FEVV::Geometry_traits< HalfedgeGraph >::Vector
 
using Point = typename FEVV::Geometry_traits< HalfedgeGraph >::Point
 
using Geometry = typename FEVV::Geometry_traits< HalfedgeGraph >
 
typedef Error_metric< HalfedgeGraph, PointMap > Super_class
 
- Public Types inherited from FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >
using vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor
 
using halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor
 
using edge_iterator = typename boost::graph_traits< HalfedgeGraph >::edge_iterator
 
using edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor
 
using Vector = typename FEVV::Geometry_traits< HalfedgeGraph >::Vector
 
using Point = typename FEVV::Geometry_traits< HalfedgeGraph >::Point
 
using Geometry = typename FEVV::Geometry_traits< HalfedgeGraph >
 
typedef std::priority_queue< std::tuple< edge_descriptor, double, Point >, std::vector< std::tuple< edge_descriptor, double, Point > >, Compare_weights2< HalfedgeGraph > > priority_queue_edges
 
typedef std::map< edge_descriptor, std::pair< double, Point > > edge2cost_map
 

Public Member Functions

 Volume_preserving (HalfedgeGraph &g, PointMap &pm, Kept_position< HalfedgeGraph, PointMap > *vkept, FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > &dequantiz)
 
 ~Volume_preserving ()
 
void compute_error () override
 
double compute_cost_edge (edge_descriptor e, const Point &collapsePos) override
 
std::string get_as_string () const override
 
- Public Member Functions inherited from FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >
 Error_metric (HalfedgeGraph &g, PointMap &pm, Kept_position< HalfedgeGraph, PointMap > *vkept, FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > &dequantiz)
 
virtual ~Error_metric ()
 
bool is_queue_empty ()
 
std::tuple< typename boost::graph_traits< HalfedgeGraph >::edge_descriptor, double, typename Geometry::Pointget_top_queue () const
 
void pop_queue ()
 
double get_top_cost () const
 
double get_mean_threshold () const
 
void delete_from_descriptors (edge_descriptor e)
 
bool is_present_in_map (edge_descriptor e) const
 
void remove_old_edges (vertex_descriptor vs, vertex_descriptor vt)
 
size_t get_size_queue () const
 
Kept_position< HalfedgeGraph, PointMap > * get_vkept ()
 

Private Member Functions

double tetrahedron_volume (const Point &a, const Point &b, const Point &c, const Point &d) const
 
void compute_volumes (edge_descriptor e, const Point &collapsePos, double &sum_first_vertex, double &sum_second_vertex)
 

Additional Inherited Members

- Protected Attributes inherited from FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >
HalfedgeGraph & _g
 
const Geometry _gt
 
PointMap & _pm
 
priority_queue_edges _queue
 
edge2cost_map _edges_cost
 queue with the cost/weight as the key More...
 
FEVV::Filters::VKEPT_POSITION _operator
 
Kept_position< HalfedgeGraph, PointMap > * _vkept
 
double _threshold
 
FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > & _dequantiz
 

Detailed Description

template<typename HalfedgeGraph, typename PointMap>
class FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >

Concrete class to compute the collapse cost of each edge in a mesh as the local absolute volume error.

Definition at line 23 of file Volume_preserving.h.

Member Typedef Documentation

◆ edge_descriptor

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor

Definition at line 28 of file Volume_preserving.h.

◆ edge_iterator

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::edge_iterator = typename boost::graph_traits< HalfedgeGraph >::edge_iterator

Definition at line 26 of file Volume_preserving.h.

◆ Geometry

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::Geometry = typename FEVV::Geometry_traits< HalfedgeGraph>

Definition at line 32 of file Volume_preserving.h.

◆ Point

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::Point = typename FEVV::Geometry_traits< HalfedgeGraph >::Point

Definition at line 31 of file Volume_preserving.h.

◆ Super_class

template<typename HalfedgeGraph , typename PointMap >
typedef Error_metric< HalfedgeGraph, PointMap > FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::Super_class

Definition at line 34 of file Volume_preserving.h.

◆ Vector

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::Vector = typename FEVV::Geometry_traits< HalfedgeGraph >::Vector

Definition at line 30 of file Volume_preserving.h.

Constructor & Destructor Documentation

◆ Volume_preserving()

template<typename HalfedgeGraph , typename PointMap >
FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::Volume_preserving ( HalfedgeGraph &  g,
PointMap &  pm,
Kept_position< HalfedgeGraph, PointMap > *  vkept,
FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > &  dequantiz 
)
inline

Definition at line 36 of file Volume_preserving.h.

◆ ~Volume_preserving()

template<typename HalfedgeGraph , typename PointMap >
FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::~Volume_preserving ( )
inline

Definition at line 42 of file Volume_preserving.h.

Member Function Documentation

◆ compute_cost_edge()

template<typename HalfedgeGraph , typename PointMap >
double FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::compute_cost_edge ( edge_descriptor  e,
const Point collapsePos 
)
inlineoverridevirtual

Method to compute the cost associated with an edge to collapse. It usually depends on the resulting vertex position (the collapsed position).

Implements FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >.

Definition at line 78 of file Volume_preserving.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_error()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::compute_error ( )
inlineoverridevirtual

Method to compute 1) all edge costs of the mesh; 2) the mean cost threshold.

Implements FEVV::Filters::Error_metric< HalfedgeGraph, PointMap >.

Definition at line 44 of file Volume_preserving.h.

Here is the call graph for this function:

◆ compute_volumes()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::compute_volumes ( edge_descriptor  e,
const Point collapsePos,
double &  sum_first_vertex,
double &  sum_second_vertex 
)
inlineprivate

Definition at line 100 of file Volume_preserving.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_as_string()

template<typename HalfedgeGraph , typename PointMap >
std::string FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::get_as_string ( ) const
inlineoverridevirtual

◆ tetrahedron_volume()

template<typename HalfedgeGraph , typename PointMap >
double FEVV::Filters::Volume_preserving< HalfedgeGraph, PointMap >::tetrahedron_volume ( const Point a,
const Point b,
const Point c,
const Point d 
) const
inlineprivate

Definition at line 90 of file Volume_preserving.h.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: