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

Concrete class to compute the collapse cost of each edge in a mesh as the memoryless variant of QEM error (Quadric Error Metric).
More...

#include <QEM_3D.h>

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

Public Types

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 face_descriptor = typename boost::graph_traits< HalfedgeGraph >::face_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
 
typedef Eigen::MatrixXd Matrix
 
typedef Eigen::VectorXd VectorX
 
typedef std::tuple< Matrix, VectorX, double > Quadric
 
- 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

 QEM_3D (HalfedgeGraph &g, PointMap &pm, Kept_position< HalfedgeGraph, PointMap > *vkept, FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > &dequantiz)
 
 ~QEM_3D ()
 
virtual 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 ()
 

Protected Member Functions

double compute_triangle_area (const Point &p1, const Point &p2, const Point &p3) const
 
double compute_triangle_area_after_dequantization (face_descriptor f) const
 
std::vector< double > get_plane_equation (face_descriptor f) const
 
virtual Quadric compute_face_quadric (face_descriptor f) const
 
virtual Quadric compute_vertex_quadric (vertex_descriptor v) const
 

Protected Attributes

std::map< face_descriptor, Quadricfaces_quadrics
 
std::map< vertex_descriptor, Quadricvertices_quadrics
 
- 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::QEM_3D< HalfedgeGraph, PointMap >

Concrete class to compute the collapse cost of each edge in a mesh as the memoryless variant of QEM error (Quadric Error Metric).

Definition at line 27 of file QEM_3D.h.

Member Typedef Documentation

◆ edge_descriptor

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

Definition at line 37 of file QEM_3D.h.

◆ edge_iterator

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

Definition at line 35 of file QEM_3D.h.

◆ face_descriptor

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::face_descriptor = typename boost::graph_traits< HalfedgeGraph >::face_descriptor

Definition at line 39 of file QEM_3D.h.

◆ Geometry

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

Definition at line 43 of file QEM_3D.h.

◆ halfedge_descriptor

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor

Definition at line 33 of file QEM_3D.h.

◆ Matrix

template<typename HalfedgeGraph , typename PointMap >
typedef Eigen::MatrixXd FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::Matrix

Definition at line 48 of file QEM_3D.h.

◆ Point

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

Definition at line 42 of file QEM_3D.h.

◆ Quadric

template<typename HalfedgeGraph , typename PointMap >
typedef std::tuple< Matrix, VectorX, double > FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::Quadric

Definition at line 50 of file QEM_3D.h.

◆ Super_class

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

Definition at line 46 of file QEM_3D.h.

◆ Vector

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

Definition at line 41 of file QEM_3D.h.

◆ VectorX

template<typename HalfedgeGraph , typename PointMap >
typedef Eigen::VectorXd FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::VectorX

Definition at line 49 of file QEM_3D.h.

◆ vertex_descriptor

template<typename HalfedgeGraph , typename PointMap >
using FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor

Definition at line 31 of file QEM_3D.h.

Constructor & Destructor Documentation

◆ QEM_3D()

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

Definition at line 53 of file QEM_3D.h.

◆ ~QEM_3D()

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

Definition at line 63 of file QEM_3D.h.

Member Function Documentation

◆ compute_cost_edge()

template<typename HalfedgeGraph , typename PointMap >
double FEVV::Filters::QEM_3D< 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 122 of file QEM_3D.h.

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

◆ compute_error()

template<typename HalfedgeGraph , typename PointMap >
virtual void FEVV::Filters::QEM_3D< 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 65 of file QEM_3D.h.

Here is the call graph for this function:

◆ compute_face_quadric()

template<typename HalfedgeGraph , typename PointMap >
virtual Quadric FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::compute_face_quadric ( face_descriptor  f) const
inlineprotectedvirtual

Definition at line 251 of file QEM_3D.h.

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

◆ compute_triangle_area()

template<typename HalfedgeGraph , typename PointMap >
double FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::compute_triangle_area ( const Point p1,
const Point p2,
const Point p3 
) const
inlineprotected

Definition at line 173 of file QEM_3D.h.

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

◆ compute_triangle_area_after_dequantization()

template<typename HalfedgeGraph , typename PointMap >
double FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::compute_triangle_area_after_dequantization ( face_descriptor  f) const
inlineprotected

Definition at line 182 of file QEM_3D.h.

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

◆ compute_vertex_quadric()

template<typename HalfedgeGraph , typename PointMap >
virtual Quadric FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::compute_vertex_quadric ( vertex_descriptor  v) const
inlineprotectedvirtual

Definition at line 290 of file QEM_3D.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::QEM_3D< HalfedgeGraph, PointMap >::get_as_string ( ) const
inlineoverridevirtual

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

Definition at line 165 of file QEM_3D.h.

◆ get_plane_equation()

template<typename HalfedgeGraph , typename PointMap >
std::vector< double > FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::get_plane_equation ( face_descriptor  f) const
inlineprotected

Definition at line 196 of file QEM_3D.h.

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

Member Data Documentation

◆ faces_quadrics

template<typename HalfedgeGraph , typename PointMap >
std::map< face_descriptor, Quadric > FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::faces_quadrics
protected

Definition at line 168 of file QEM_3D.h.

◆ vertices_quadrics

template<typename HalfedgeGraph , typename PointMap >
std::map< vertex_descriptor, Quadric > FEVV::Filters::QEM_3D< HalfedgeGraph, PointMap >::vertices_quadrics
protected

Definition at line 170 of file QEM_3D.h.


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