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

Batch_decompressor: Given a draco buffer, will decompress a non-textured (or not) mesh. More...

#include <Batch_decompressor.h>

Collaboration diagram for FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >:
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 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

 Batch_decompressor (HalfedgeGraph &g, PointMap &pm, Predictor< HalfedgeGraph, PointMap > *predictor, FEVV::Filters::Kept_position< HalfedgeGraph, PointMap, Geometry > *vkept, const FEVV::Header_handler &header, VertexColorMap &vcm)
 Batch_decompressor. More...
 
 ~Batch_decompressor ()
 
void predict_positions (const std::list< halfedge_descriptor > &h_extent, std::list< std::pair< Point, Point > > &new_points)
 predict_positions: Given a list of halfedges, will predict every pair of vertices of a split. This function implements line 13 of Algorithm 2. More...
 
void save_spanning_tree (const FEVV::Comparator::Spanning_tree_vertex_edge_comparator< HalfedgeGraph, PointMap > &spanningtree)
 saves spanning tree (useful for debugging) More...
 
void dequantize_mesh ()
 Dequantizes a mesh (restores integers as original doubles) More...
 
void decompress_binary_batch (draco::DecoderBuffer &buffer)
 Decompresses a batch using a draco buffer. This function implements lines 5 to 19 of Algorithm 2. More...
 

Private Member Functions

bool split_vertices (const std::list< halfedge_descriptor > &h_extent)
 This function implements lines 13 to 19 of Algorithm 2. More...
 
void fill_h_extent_list_no_sort (const FEVV::Comparator::Spanning_tree_vertex_edge_comparator< HalfedgeGraph, PointMap, Geometry > &spanningtree, std::list< halfedge_descriptor > &h_extent)
 
FEVV::Filters::TOPOLOGY_CASE find_case (halfedge_descriptor h1, halfedge_descriptor h2)
 
halfedge_descriptor simple_split_sase (halfedge_descriptor h1, halfedge_descriptor h2)
 
std::pair< halfedge_descriptor, bool > find_good_border (halfedge_descriptor h)
 
std::pair< halfedge_descriptor, halfedge_descriptorfind_good_halfedges_for_split (halfedge_descriptor h, TOPOLOGY_CASE cas)
 
int get_face_degree (halfedge_descriptor h)
 
halfedge_descriptor cases_1 (halfedge_descriptor h, TOPOLOGY_CASE current_case)
 
halfedge_descriptor cases_2 (halfedge_descriptor h1, halfedge_descriptor h2, TOPOLOGY_CASE current_case)
 

Private Attributes

HalfedgeGraph & _g
 
PointMap & _pm
 
const Geometry _gt
 
std::vector< std::vector< bool > > neighbours_bitmasks
 
int _batch_id
 
FEVV::Filters::Predictor< HalfedgeGraph, PointMap > * _predictor
 
FEVV::Filters::Kept_position< HalfedgeGraph, PointMap, Geometry > * _vkept
 
std::list< std::vector< Vector > > _positions
 
std::list< bool > _bitmask
 
std::list< bool > _edge_bitmask
 
std::list< bool > _other_info_bits
 
const FEVV::Header_handler_header
 
VertexColorMap & _vcm
 

Detailed Description

template<typename HalfedgeGraph, typename PointMap, typename VertexColorMap>
class FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >

Batch_decompressor: Given a draco buffer, will decompress a non-textured (or not) mesh.

Definition at line 77 of file Batch_decompressor.h.

Member Typedef Documentation

◆ face_descriptor

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

Definition at line 86 of file Batch_decompressor.h.

◆ Geometry

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

Definition at line 90 of file Batch_decompressor.h.

◆ halfedge_descriptor

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

Definition at line 84 of file Batch_decompressor.h.

◆ Point

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

Definition at line 89 of file Batch_decompressor.h.

◆ Vector

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

Definition at line 88 of file Batch_decompressor.h.

◆ vertex_descriptor

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

Definition at line 82 of file Batch_decompressor.h.

Constructor & Destructor Documentation

◆ Batch_decompressor()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::Batch_decompressor ( HalfedgeGraph &  g,
PointMap &  pm,
Predictor< HalfedgeGraph, PointMap > *  predictor,
FEVV::Filters::Kept_position< HalfedgeGraph, PointMap, Geometry > *  vkept,
const FEVV::Header_handler header,
VertexColorMap &  vcm 
)
inline

Batch_decompressor.

Parameters
[in,out]gEmpty halfedge graph that is used to reconstruct the decoded mesh topology.
[in,out]pmEmpty pointmap associated with g that is used to reconstruct the decoded mesh geometry (vertex positions).
[in]predictorPointer to a predictor object (e.g. butterfly).
[in]vkeptPointer to a mid midpoint or halfedge object.
[in]headerHeader object (contains refinement info: quantization for example).
[in,out]vcmvertex color map associated with g, used to debug topological issues during the decoding
[in]bit_quantizationbits of quantization

Definition at line 106 of file Batch_decompressor.h.

◆ ~Batch_decompressor()

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

Definition at line 120 of file Batch_decompressor.h.

Member Function Documentation

◆ cases_1()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
halfedge_descriptor FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::cases_1 ( halfedge_descriptor  h,
TOPOLOGY_CASE  current_case 
)
inlineprivate

Definition at line 702 of file Batch_decompressor.h.

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

◆ cases_2()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
halfedge_descriptor FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::cases_2 ( halfedge_descriptor  h1,
halfedge_descriptor  h2,
TOPOLOGY_CASE  current_case 
)
inlineprivate

Definition at line 765 of file Batch_decompressor.h.

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

◆ decompress_binary_batch()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
void FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::decompress_binary_batch ( draco::DecoderBuffer &  buffer)
inline

Decompresses a batch using a draco buffer. This function implements lines 5 to 19 of Algorithm 2.

Parameters
[in,out]bufferA draco decoderbuffer with refinement info. Not a const param because of call to non-const draco methods such as Decode.

Definition at line 207 of file Batch_decompressor.h.

Here is the call graph for this function:

◆ dequantize_mesh()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
void FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::dequantize_mesh ( )
inline

Dequantizes a mesh (restores integers as original doubles)

Definition at line 188 of file Batch_decompressor.h.

Here is the call graph for this function:

◆ fill_h_extent_list_no_sort()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
void FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::fill_h_extent_list_no_sort ( const FEVV::Comparator::Spanning_tree_vertex_edge_comparator< HalfedgeGraph, PointMap, Geometry > &  spanningtree,
std::list< halfedge_descriptor > &  h_extent 
)
inlineprivate

Fills the list of halfedges to expand. For cases without any border, two different halfedges will be added. Otherwise, one halfedge will be added twice. This function implements line 12 of Algorithm 2.

Definition at line 352 of file Batch_decompressor.h.

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

◆ find_case()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
FEVV::Filters::TOPOLOGY_CASE FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::find_case ( halfedge_descriptor  h1,
halfedge_descriptor  h2 
)
inlineprivate

Definition at line 455 of file Batch_decompressor.h.

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

◆ find_good_border()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
std::pair< halfedge_descriptor, bool > FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::find_good_border ( halfedge_descriptor  h)
inlineprivate

Definition at line 541 of file Batch_decompressor.h.

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

◆ find_good_halfedges_for_split()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
std::pair< halfedge_descriptor, halfedge_descriptor > FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::find_good_halfedges_for_split ( halfedge_descriptor  h,
TOPOLOGY_CASE  cas 
)
inlineprivate

Definition at line 568 of file Batch_decompressor.h.

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

◆ get_face_degree()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
int FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::get_face_degree ( halfedge_descriptor  h)
inlineprivate

Definition at line 663 of file Batch_decompressor.h.

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

◆ predict_positions()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
void FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::predict_positions ( const std::list< halfedge_descriptor > &  h_extent,
std::list< std::pair< Point, Point > > &  new_points 
)
inline

predict_positions: Given a list of halfedges, will predict every pair of vertices of a split. This function implements line 13 of Algorithm 2.

Parameters
[in]h_extentList of halfedges to expand to faces.
[out]new_pointsEmpty list of pair<Point,Point>. Will be filled by the function.

Definition at line 130 of file Batch_decompressor.h.

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

◆ save_spanning_tree()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
void FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::save_spanning_tree ( const FEVV::Comparator::Spanning_tree_vertex_edge_comparator< HalfedgeGraph, PointMap > &  spanningtree)
inline

saves spanning tree (useful for debugging)

Definition at line 164 of file Batch_decompressor.h.

Here is the call graph for this function:

◆ simple_split_sase()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
halfedge_descriptor FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::simple_split_sase ( halfedge_descriptor  h1,
halfedge_descriptor  h2 
)
inlineprivate

Definition at line 521 of file Batch_decompressor.h.

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

◆ split_vertices()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
bool FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::split_vertices ( const std::list< halfedge_descriptor > &  h_extent)
inlineprivate

This function implements lines 13 to 19 of Algorithm 2.

Definition at line 278 of file Batch_decompressor.h.

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

Member Data Documentation

◆ _batch_id

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
int FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_batch_id
private

Definition at line 259 of file Batch_decompressor.h.

◆ _bitmask

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
std::list< bool > FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_bitmask
private

Definition at line 270 of file Batch_decompressor.h.

◆ _edge_bitmask

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
std::list< bool > FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_edge_bitmask
private

Definition at line 271 of file Batch_decompressor.h.

◆ _g

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
HalfedgeGraph& FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_g
private

Definition at line 255 of file Batch_decompressor.h.

◆ _gt

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
const Geometry FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_gt
private

Definition at line 257 of file Batch_decompressor.h.

◆ _header

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
const FEVV::Header_handler& FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_header
private

Definition at line 273 of file Batch_decompressor.h.

◆ _other_info_bits

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
std::list< bool > FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_other_info_bits
private

Definition at line 272 of file Batch_decompressor.h.

◆ _pm

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
PointMap& FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_pm
private

Definition at line 256 of file Batch_decompressor.h.

◆ _positions

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
std::list< std::vector< Vector > > FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_positions
private

Definition at line 268 of file Batch_decompressor.h.

◆ _predictor

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
FEVV::Filters:: Predictor< HalfedgeGraph, PointMap >* FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_predictor
private

Definition at line 263 of file Batch_decompressor.h.

◆ _vcm

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
VertexColorMap& FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_vcm
private

Definition at line 275 of file Batch_decompressor.h.

◆ _vkept

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
FEVV::Filters::Kept_position< HalfedgeGraph, PointMap, Geometry >* FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::_vkept
private

Definition at line 266 of file Batch_decompressor.h.

◆ neighbours_bitmasks

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap >
std::vector< std::vector< bool > > FEVV::Filters::Batch_decompressor< HalfedgeGraph, PointMap, VertexColorMap >::neighbours_bitmasks
private

Definition at line 258 of file Batch_decompressor.h.


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