Batch_collapser: Takes an halfedge graph and collapses its edges. A Batch_collapser object can simplify as many times a mesh as possible. No need to create an object for each batch. Input: Original mesh. Output: a simplified mesh.
More...
#include <Batch_collapser.h>
|
| Batch_collapser (HalfedgeGraph &g, PointMap &pm, Metric *metric, Predictor< HalfedgeGraph, PointMap > *predictor, VertexColorMap &vcm, EdgeColorMap &ecm, BATCH_CONDITION batch_stop) |
| Batch_collapser. More...
|
|
| ~Batch_collapser () |
|
bool | stop () |
| stop() : Depending on the chosen Batch condition, will return whether we have to continue collapsing or not. More...
|
|
void | save_spanning_tree (const FEVV::Comparator::Spanning_tree_vertex_edge_comparator< HalfedgeGraph, PointMap > &spanningtree) |
|
void | compute_distortion_l2 (FEVV::Filters::Geometric_metrics< HalfedgeGraph, PointMap > &g_metric, Header_handler &header, double diag, bool skip) |
| Computes the L2 distorsion between the original mesh and the current LoD. More...
|
|
void | collapse_batch () |
|
const std::vector< Refinement_info< HalfedgeGraph, PointMap > > & | get_refinements () const |
|
const std::vector< double > & | get_RMSE_distortion () const |
|
const std::vector< double > & | get_hausdorff_distortion () const |
|
template<typename HalfedgeGraph, typename PointMap, typename Metric, typename EdgeColorMap, typename VertexColorMap>
class FEVV::Filters::Batch_collapser< HalfedgeGraph, PointMap, Metric, EdgeColorMap, VertexColorMap >
Batch_collapser: Takes an halfedge graph and collapses its edges. A Batch_collapser object can simplify as many times a mesh as possible. No need to create an object for each batch. Input: Original mesh. Output: a simplified mesh.
Definition at line 65 of file Batch_collapser.h.
◆ edge_descriptor
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ face_descriptor
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ Geometry
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ halfedge_descriptor
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ Point
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ Vector
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ vertex_descriptor
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ Batch_collapser()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
FEVV::Filters::Batch_collapser< HalfedgeGraph, PointMap, Metric, EdgeColorMap, VertexColorMap >::Batch_collapser |
( |
HalfedgeGraph & |
g, |
|
|
PointMap & |
pm, |
|
|
Metric * |
metric, |
|
|
Predictor< HalfedgeGraph, PointMap > * |
predictor, |
|
|
VertexColorMap & |
vcm, |
|
|
EdgeColorMap & |
ecm, |
|
|
BATCH_CONDITION |
batch_stop |
|
) |
| |
|
inline |
Batch_collapser.
- Parameters
-
[in,out] | g | the mesh to simplify |
[in,out] | pm | the point map associated to the mesh to simplify |
[in] | metric | the address (pointer) of an object used to measure the cost of each edge |
[in] | predictor | the address (pointer) of an object used to compute the geometric residuals |
[in,out] | vcm | a property map containing the color of each vertex (useful for debugging) |
[in,out] | ecm | a property map containing the color of each edge (useful for debugging) |
[in] | batch_stop | an Enum to know when to stop a batch (collapses every edge we can or stop at a mean cost threshold) |
- Parameters
-
pm | the mesh to simplify |
metric | the point map associated to the mesh to simplify |
ecm | for debugging |
batch_stop | for debugging |
Definition at line 95 of file Batch_collapser.h.
◆ ~Batch_collapser()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ are_halfedge_vertex_positions_change_without_normal_flip()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
Returns whether the edge collapse causes a normal flip.
Definition at line 312 of file Batch_collapser.h.
◆ collapse_batch()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
Collapses all the collapsible edges from the mesh in Batch_collapser::_g 1) compute all edge costs for current batch; 2) greedy collapse of the collapsible edges with lowest cost while the batch stopping condition is not met.
Definition at line 236 of file Batch_collapser.h.
◆ collapse_top_queue()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
collapse_top_queue collapses the edge with the lowest cost, and records the necessary information in a Collapse_info object.
Add source and target vertex positions
Add pivot vertices
Definition at line 419 of file Batch_collapser.h.
◆ compute_distortion_l2()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
Computes the L2 distorsion between the original mesh and the current LoD.
- Parameters
-
header | object containing the original mesh |
diag | header containing every compression info (used to dequantize the mesh) |
skip | diagonal of the mesh bounding box (to normalize) we can choose to skip distorsion computation (the value will be -1). For example, we can choose to only compute L2 distorsion on 1 LOD out of 5 to save time |
Definition at line 172 of file Batch_collapser.h.
◆ get_hausdorff_distortion()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
const std::vector< double >& FEVV::Filters::Batch_collapser< HalfedgeGraph, PointMap, Metric, EdgeColorMap, VertexColorMap >::get_hausdorff_distortion |
( |
| ) |
const |
|
inline |
◆ get_refinements()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ get_RMSE_distortion()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
const std::vector< double >& FEVV::Filters::Batch_collapser< HalfedgeGraph, PointMap, Metric, EdgeColorMap, VertexColorMap >::get_RMSE_distortion |
( |
| ) |
const |
|
inline |
◆ is_forbidden()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ is_vertex_position_change_without_normal_flip()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
Returns whether the change of position for the vertex vertex with pos_vkept will create an incident face normal flip.
- Returns
- True if everything is all right, else false.
Definition at line 322 of file Batch_collapser.h.
◆ save_spanning_tree()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
Write mesh vertices in a text file (and the number of incident faces) in the order of the spanning tree (useful for comparing spanning trees between compression and decompression).
Definition at line 149 of file Batch_collapser.h.
◆ setup_prediction()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ sort_list_memory()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ stop()
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
stop() : Depending on the chosen Batch condition, will return whether we have to continue collapsing or not.
Definition at line 120 of file Batch_collapser.h.
◆ _batch_id
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _batch_stop
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _ecm
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _forbidden
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _forbidden_edges
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _g
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _gt
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
Edges that cannot be collapsed in the current batch.
Definition at line 514 of file Batch_collapser.h.
◆ _hausdorff_distortion_per_batch
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
std::vector< double > FEVV::Filters::Batch_collapser< HalfedgeGraph, PointMap, Metric, EdgeColorMap, VertexColorMap >::_hausdorff_distortion_per_batch |
|
private |
◆ _link_condition
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _list_edge_bitmask
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
std::vector< std::vector< bool > > FEVV::Filters::Batch_collapser< HalfedgeGraph, PointMap, Metric, EdgeColorMap, VertexColorMap >::_list_edge_bitmask |
|
private |
◆ _list_memory
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _metric
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _nb_collapse
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _number_vertices_last
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _number_vertices_original
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _pm
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _predictor
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
Current batch' collapse information to sort in the spanning tree vertex traversal order.
Definition at line 521 of file Batch_collapser.h.
◆ _refinements
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
◆ _RMSE_distortion_per_batch
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
One refinement object per simplification batch. These objects are stored in the batch simplification order, i.e. LoD_i is stored at the #LoD - i - 1 position.
Definition at line 528 of file Batch_collapser.h.
◆ _vcm
template<typename HalfedgeGraph , typename PointMap , typename Metric , typename EdgeColorMap , typename VertexColorMap >
The documentation for this class was generated from the following file:
- /Users/mac/builds/efd823a3/0/MEPP-team/MEPP2/FEVV/Filters/CGAL/Progressive_Compression/Compression/Batch_collapser.h