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

#include <Butterfly.h>

Inheritance diagram for FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >:
Inheritance graph
Collaboration diagram for FEVV::Filters::Butterfly< 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 Vector = typename FEVV::Geometry_traits< HalfedgeGraph >::Vector
 
using Point = typename FEVV::Geometry_traits< HalfedgeGraph >::Point
 
using Geometry = typename FEVV::Geometry_traits< HalfedgeGraph >
 
typedef Predictor< HalfedgeGraph, PointMap > Super_class
 
- Public Types inherited from FEVV::Filters::Predictor< HalfedgeGraph, PointMap >
using vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor
 
using halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_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 >
 

Public Member Functions

 Butterfly (HalfedgeGraph &g, Kept_position< HalfedgeGraph, PointMap > *kp, PointMap &pm)
 
std::vector< Vectorcompute_residuals (Collapse_info< HalfedgeGraph, PointMap > &mem) override
 
std::pair< Point, Pointplace_points (const std::vector< Vector > &residuals, vertex_descriptor vkept, halfedge_descriptor h1, halfedge_descriptor h2) override
 Decompression side: predicts a position from encoded residuals. More...
 
const std::tuple< bool, bool, bool, bool > & get_midpoint () const
 
void set_bit_info (bool b1, bool b2, bool b3, bool b4)
 
void set_rev (bool b) override
 
std::string get_as_string () const override
 
void record_stencil (std::vector< vertex_descriptor > &around, std::vector< vertex_descriptor > &crown, halfedge_descriptor begin, halfedge_descriptor end, int &k)
 
- Public Member Functions inherited from FEVV::Filters::Predictor< HalfedgeGraph, PointMap >
 Predictor (HalfedgeGraph &g, Kept_position< HalfedgeGraph, PointMap > *kp, PointMap &pm)
 
virtual ~Predictor ()
 
virtual FEVV::Filters::PREDICTION_TYPE get_type () const
 
virtual const Pointget_kept_position () const
 
virtual FEVV::Filters::VKEPT_POSITION get_type_KP () const
 
int get_nb_residuals () const
 

Private Member Functions

bool is_on_border (vertex_descriptor v) const
 
std::vector< Vectorcompute_D_prime_A_and_B (const Point &CA, const Point &SA, const Point &CB, const Point &SB, const Point &kept_position)
 
void fill_around_and_crown (std::vector< Point > &around, std::vector< Point > &crown, halfedge_descriptor begin, halfedge_descriptor end, int &k)
 
Point compute_S (std::vector< Point > &around, Point v1, Point v2, int &k)
 
Point compute_C (std::vector< Point > &crown, std::vector< Point > &around_opposite, int &k)
 
void fill_crown_around_vertex (std::list< vertex_descriptor > &crown, std::list< vertex_descriptor > &around, vertex_descriptor center, int &k)
 

Private Attributes

FEVV::Filters::Delta_predictor< HalfedgeGraph, PointMap > _delta_for_borders
 
Point _estimated_a
 
Point _estimated_b
 
double _alpha
 
int k_a
 
int k_b
 
bool _rev
 
Point CApred
 
Point CBpred
 
Point SApred
 
Point SBpred
 
Point APred
 
Point BPred
 
Vector DApred
 
Vector DBpred
 
Vector Dpred
 
std::tuple< bool, bool, bool, bool > _round_midpoint
 

Additional Inherited Members

- Protected Attributes inherited from FEVV::Filters::Predictor< HalfedgeGraph, PointMap >
Kept_position< HalfedgeGraph, PointMap > * _kp
 
HalfedgeGraph & _g
 
const Geometry _gt
 
PointMap & _pm
 
int _nbResiduals
 
Point _kept_position
 
FEVV::Filters::PREDICTION_TYPE _type
 

Detailed Description

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

Butterfly prediction scheme, as implemented in the paper by Rossignac.

Definition at line 26 of file Butterfly.h.

Member Typedef Documentation

◆ Geometry

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

Definition at line 36 of file Butterfly.h.

◆ halfedge_descriptor

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

Definition at line 32 of file Butterfly.h.

◆ Point

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

Definition at line 35 of file Butterfly.h.

◆ Super_class

template<typename HalfedgeGraph , typename PointMap >
typedef Predictor< HalfedgeGraph, PointMap > FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::Super_class

Definition at line 38 of file Butterfly.h.

◆ Vector

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

Definition at line 34 of file Butterfly.h.

◆ vertex_descriptor

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

Definition at line 30 of file Butterfly.h.

Constructor & Destructor Documentation

◆ Butterfly()

template<typename HalfedgeGraph , typename PointMap >
FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::Butterfly ( HalfedgeGraph &  g,
Kept_position< HalfedgeGraph, PointMap > *  kp,
PointMap &  pm 
)
inline

Definition at line 39 of file Butterfly.h.

Member Function Documentation

◆ compute_C()

template<typename HalfedgeGraph , typename PointMap >
Point FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::compute_C ( std::vector< Point > &  crown,
std::vector< Point > &  around_opposite,
int &  k 
)
inlineprivate

Definition at line 463 of file Butterfly.h.

Here is the caller graph for this function:

◆ compute_D_prime_A_and_B()

template<typename HalfedgeGraph , typename PointMap >
std::vector< Vector > FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::compute_D_prime_A_and_B ( const Point CA,
const Point SA,
const Point CB,
const Point SB,
const Point kept_position 
)
inlineprivate

Definition at line 332 of file Butterfly.h.

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

◆ compute_residuals()

template<typename HalfedgeGraph , typename PointMap >
std::vector< Vector > FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::compute_residuals ( Collapse_info< HalfedgeGraph, PointMap > &  mem)
inlineoverridevirtual

Compression side: Computes geometric residuals from a set of info about the collapse.

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

Definition at line 54 of file Butterfly.h.

Here is the call graph for this function:

◆ compute_S()

template<typename HalfedgeGraph , typename PointMap >
Point FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::compute_S ( std::vector< Point > &  around,
Point  v1,
Point  v2,
int &  k 
)
inlineprivate

Definition at line 440 of file Butterfly.h.

Here is the caller graph for this function:

◆ fill_around_and_crown()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::fill_around_and_crown ( std::vector< Point > &  around,
std::vector< Point > &  crown,
halfedge_descriptor  begin,
halfedge_descriptor  end,
int &  k 
)
inlineprivate

Definition at line 412 of file Butterfly.h.

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

◆ fill_crown_around_vertex()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::fill_crown_around_vertex ( std::list< vertex_descriptor > &  crown,
std::list< vertex_descriptor > &  around,
vertex_descriptor  center,
int &  k 
)
inlineprivate

Definition at line 492 of file Butterfly.h.

Here is the call graph for this function:

◆ get_as_string()

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

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

Definition at line 284 of file Butterfly.h.

◆ get_midpoint()

template<typename HalfedgeGraph , typename PointMap >
const std::tuple< bool, bool, bool, bool >& FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::get_midpoint ( ) const
inline

Definition at line 271 of file Butterfly.h.

◆ is_on_border()

template<typename HalfedgeGraph , typename PointMap >
bool FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::is_on_border ( vertex_descriptor  v) const
inlineprivate

Definition at line 317 of file Butterfly.h.

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

◆ place_points()

template<typename HalfedgeGraph , typename PointMap >
std::pair< Point, Point > FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::place_points ( const std::vector< Vector > &  residuals,
vertex_descriptor  vkept,
halfedge_descriptor  h1,
halfedge_descriptor  h2 
)
inlineoverridevirtual

Decompression side: predicts a position from encoded residuals.

Parameters
h1should be target (h1) and target(h2)
h2first halfedge to expand into a face second halfedge to expand into a face

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

Definition at line 158 of file Butterfly.h.

Here is the call graph for this function:

◆ record_stencil()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::record_stencil ( std::vector< vertex_descriptor > &  around,
std::vector< vertex_descriptor > &  crown,
halfedge_descriptor  begin,
halfedge_descriptor  end,
int &  k 
)
inline

Definition at line 289 of file Butterfly.h.

Here is the call graph for this function:

◆ set_bit_info()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::set_bit_info ( bool  b1,
bool  b2,
bool  b3,
bool  b4 
)
inline

Definition at line 275 of file Butterfly.h.

◆ set_rev()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::set_rev ( bool  b)
inlineoverridevirtual

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

Definition at line 279 of file Butterfly.h.

Member Data Documentation

◆ _alpha

template<typename HalfedgeGraph , typename PointMap >
double FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::_alpha
private

Definition at line 401 of file Butterfly.h.

◆ _delta_for_borders

template<typename HalfedgeGraph , typename PointMap >
FEVV::Filters::Delta_predictor< HalfedgeGraph, PointMap > FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::_delta_for_borders
private

Definition at line 397 of file Butterfly.h.

◆ _estimated_a

template<typename HalfedgeGraph , typename PointMap >
Point FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::_estimated_a
private

Definition at line 398 of file Butterfly.h.

◆ _estimated_b

template<typename HalfedgeGraph , typename PointMap >
Point FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::_estimated_b
private

Definition at line 399 of file Butterfly.h.

◆ _rev

template<typename HalfedgeGraph , typename PointMap >
bool FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::_rev
private

Definition at line 404 of file Butterfly.h.

◆ _round_midpoint

template<typename HalfedgeGraph , typename PointMap >
std::tuple< bool, bool, bool, bool > FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::_round_midpoint
private

Definition at line 410 of file Butterfly.h.

◆ APred

template<typename HalfedgeGraph , typename PointMap >
Point FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::APred
private

Definition at line 406 of file Butterfly.h.

◆ BPred

template<typename HalfedgeGraph , typename PointMap >
Point FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::BPred
private

Definition at line 406 of file Butterfly.h.

◆ CApred

template<typename HalfedgeGraph , typename PointMap >
Point FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::CApred
private

Definition at line 406 of file Butterfly.h.

◆ CBpred

template<typename HalfedgeGraph , typename PointMap >
Point FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::CBpred
private

Definition at line 406 of file Butterfly.h.

◆ DApred

template<typename HalfedgeGraph , typename PointMap >
Vector FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::DApred
private

Definition at line 407 of file Butterfly.h.

◆ DBpred

template<typename HalfedgeGraph , typename PointMap >
Vector FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::DBpred
private

Definition at line 407 of file Butterfly.h.

◆ Dpred

template<typename HalfedgeGraph , typename PointMap >
Vector FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::Dpred
private

Definition at line 408 of file Butterfly.h.

◆ k_a

template<typename HalfedgeGraph , typename PointMap >
int FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::k_a
private

Definition at line 403 of file Butterfly.h.

◆ k_b

template<typename HalfedgeGraph , typename PointMap >
int FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::k_b
private

Definition at line 403 of file Butterfly.h.

◆ SApred

template<typename HalfedgeGraph , typename PointMap >
Point FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::SApred
private

Definition at line 406 of file Butterfly.h.

◆ SBpred

template<typename HalfedgeGraph , typename PointMap >
Point FEVV::Filters::Butterfly< HalfedgeGraph, PointMap >::SBpred
private

Definition at line 406 of file Butterfly.h.


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