MEPP2 Project
progressive_compression_filter.hpp
Go to the documentation of this file.
1 // Copyright (c) 2012-2022 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as
6 // published by the Free Software Foundation; either version 3 of
7 // the License, or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 
12 #pragma once
13 
15 #include <boost/graph/graph_traits.hpp>
17 #include <CGAL/boost/graph/helpers.h> // is_triangle_mesh
33 
34 //#define TIMING
35 #ifdef TIMING
36 #include <chrono>
37 #endif
38 
39 namespace FEVV {
40 namespace Filters {
41 
56 template< typename HalfedgeGraph,
57  typename PointMap>
58 void
60  HalfedgeGraph &g,
61  PointMap &pm,
63  bool allow_duplicates = false)
64 {
66  preprocess(g, pm);
68 
69  // vertex positions part
70  pq.point_quantization(true);
71 
72  if(!allow_duplicates)
74 }
75 
120 template< typename HalfedgeGraph,
121  typename PointMap,
122  typename VertexColorMap,
123  typename EdgeColorMap,
124  typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph > >
125  void
127  PointMap &pm,
129  VertexColorMap &v_cm,
130  EdgeColorMap &e_cm,
131  const GeometryTraits &gt,
132  FEVV::Filters::Error_metric< HalfedgeGraph,
133  PointMap >* EM,
134  const FEVV::Filters::Kept_position< HalfedgeGraph,
135  PointMap>* KP,
136  FEVV::Filters::Predictor< HalfedgeGraph,
137  PointMap >* predict,
138  int nb_q_bits,
139  int nb_max_batches,
140  int nb_min_vertices,
141  FEVV::Filters::BATCH_CONDITION batch_condition,
142  draco::EncoderBuffer &buffer,
143  const std::string &measure_path,
144  bool preprocess = true,
145  bool dequantiz = false,
148  bool save_preprocess = false,
150  const std::string& output_file_path_save_preprocess = "",
151  bool allow_duplicates=false)
152 {
153  if (!CGAL::is_triangle_mesh(g))
154  throw std::runtime_error("progressive_compression_filter cannot handle non-pure triangular mesh, exiting (nothing is done).");
156  // Keep the original mesh (to measure distorsion with the right scale).
161  // PREPROCESS //
163 
164  // Getting compression parameters (informations for the bounding box)
165  std::vector< double > bb = pq.get_bb_dimension();
166  std::vector< double > init = pq.get_init_coord();
167 
168  // Create a header object
169  FEVV::Header_handler HH(bb,
170  init,
171  KP->get_type(),
172  predict->get_type(),
173  nb_q_bits);
174 
175  // For testing, we choose if we use preprocess or not, and we test if we save
176  // the result (so we can compare it to the decompressed mesh).
177  if (preprocess)
178  {
179  preprocess_mesh(g, pm, pq, allow_duplicates); // Apply a preprocess to remove isolated vertices and edges
180  // then quantize vertex positions,
181  // then move duplicate positions when allow_duplicates is false.
182  }
183  if (save_preprocess)
184  {
185  FEVV::PMapsContainer pmaps_bag_empty;
186 
187  put_property_map(FEVV::edge_color, g, pmaps_bag_empty, e_cm);
188  put_property_map(FEVV::vertex_color, g, pmaps_bag_empty, v_cm);
189  FEVV::Filters::write_mesh(output_file_path_save_preprocess, g, pmaps_bag_empty);
190  }
191  double length = pq.get_diagonal();
193  // PREPROCESS DONE HERE //
196  bool measure = false; // Generate csv data file for encoded mesh.
197 
199  // GENERATE ENCODED INFO FOR THE DIFFERENT LODs //
201 
202  // Object used to collapse edges. Also capable of computing L2 distance
203  // between 2 meshes (distortion).
205  HalfedgeGraph,
206  PointMap,
207  FEVV::Filters::Error_metric< HalfedgeGraph,
208  PointMap >,
209  EdgeColorMap,
210  VertexColorMap >
211  batch(g, pm, EM, predict, v_cm, e_cm, batch_condition);
212  auto nb_vertices_current_last = FEVV::size_of_vertices(g);
213 
214  // Implements the first for loop of Algorithm 1.
215  for (int i = 0; i < nb_max_batches; i++)
216  {
217  batch.collapse_batch(); // Simplify the mesh (fine to coarse)
218  // and encode refinement information.
219  // Correspond to the while loop of
220  // Algorithm 1.
221  if (measure)
222  {
223  bool skip = ((i % 5) != 0);
224  batch.compute_distortion_l2(g_metric, HH, length, skip);
225  }
226  auto nb_vertices_current = FEVV::size_of_vertices(g);
227 
228  if ((nb_vertices_current_last == nb_vertices_current) ||
229  (static_cast<int>(nb_vertices_current) <= nb_min_vertices))
230  { // Last batch was not capable of removing any vertex or
231  // the min number of vertices is reached.
232  break;
233  }
234 
235  nb_vertices_current_last = nb_vertices_current;
236  }
238  // ENCODED INFORMATION GENERATION DONE HERE //
242  // Add encoded info into the buffer //
244  auto refinements = batch.get_refinements(); // get refinements
245 
246  FEVV::Filters::
247  Binary_batch_encoder<HalfedgeGraph, PointMap>
248  binaryencode; // binary file encoding (lightweight)
249 
250  size_t header_size = 0;
251  if (measure)
252  {
253  binaryencode.init_measure_file(measure_path);
254  }
256  // Add parameters info //
258  header_size += HH.encode_binary_header(buffer); // Implements line 36 of Algorithm 1.
259 
261  // Add encoded base mesh with its positions //
263  size_t size = binaryencode.quantize_encode_coarse_mesh(g, pm, gt, buffer); // Implements line 37 of Algorithm 1.
264 #if(DEBUG)
265  std::cout << "size coarse mesh: " << size << std::endl;
266 #endif
267  header_size += size;
269  // Add refinement info from coarse to fine //
271  int num_batch = 0;
272  auto dist_RMSE = batch.get_RMSE_distortion();
273  auto dist_hausdorff = batch.get_hausdorff_distortion();
274  int cumulative_bitmask = 0;
275  int cumulative_residuals = 0;
276  int cumulative_connectivity = 0;
277  int cumulative_otherinfo = 0;
278  // Implements lines 38 to 44 of Algorithm 1.
279  for (int i = static_cast<int>(refinements.size() - 1); i >= 0;
280  --i) // refinement batches have to be written in reverse order: from
281  // coarse to fine (during the simplification step we go from fine to
282  // coarse)
283  {
284  if (refinements[i].get_bitmask().size() > 0 &&
285  refinements[i].get_connectivity().size() > 0 &&
286  refinements[i].get_error_prediction().size() > 0)
287  {
288  // encode all of our data with draco
289  auto data_bitmask =
290  binaryencode.encode_bitmask(refinements[i].get_bitmask(), buffer);
291  auto data_connectivity =
292  binaryencode.encode_bitmask(refinements[i].get_connectivity(), buffer);
293 
294  std::pair< int, double > data_other_info = std::make_pair(0, 0.0);
295  size_t size_other_info = 0; // reverse information
296 
297  if (KP->get_type() == FEVV::Filters::VKEPT_POSITION::HALFEDGE)
298  {
299  data_other_info = binaryencode.encode_bitmask(
300  refinements[i].get_reverse_bool(), buffer);
301  size_other_info = refinements[i].get_reverse_bool().size();
302  }
303 
304  auto data_residuals = binaryencode.encode_residuals(
305  refinements[i].get_error_prediction(), buffer, HH.get_quantization());
306 
307  cumulative_bitmask += (data_bitmask.first);
308  cumulative_residuals += (data_residuals.first);
309  cumulative_connectivity += (data_connectivity.first);
310  cumulative_otherinfo += (data_other_info.first);
311 
312  if (measure)
313  {
314  binaryencode.add_line_measure_file(
315  measure_path,
316  num_batch,
317  data_bitmask, // in bits
318  data_connectivity, // in bits
319  data_residuals, // in bits
320  data_other_info, // in bits
321  dist_RMSE[i],
322  dist_hausdorff[i],
323  refinements[i].get_bitmask().size(), // in bits
324  refinements[i].get_connectivity().size(), // in bits
325  size_other_info, // in bits
326  header_size, // in bits
327  num_vertices);
328  }
329  num_batch++;
330  }
331 #if(DEBUG)
332  else
333  {
334  std::cout << "nothing to encode" << std::endl;
335  }
336 #endif
337  }
338 }
339 
380 template< typename HalfedgeGraph,
381  typename PointMap,
382  typename VertexColorMap,
383  typename EdgeColorMap,
384  typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph > >
385 void
387  PointMap &pm,
388  VertexColorMap &v_cm,
389  EdgeColorMap &e_cm,
390  const GeometryTraits &gt,
391  const FEVV::Filters::Parameters &params,
392  int nb_max_batches,
393  int nb_min_vertices,
394  FEVV::Filters::BATCH_CONDITION batch_condition,
395  const std::string &output_path,
396  std::string &binary_path,
398  bool preprocess = true,
401  bool dequantiz = false,
404  bool save_preprocess = false,
406  const std::string& output_file_path_save_preprocess = "")
407 {
408 #ifdef TIMING
409  auto time_point_before_comp = std::chrono::high_resolution_clock::now();
410 #endif
411  // Create quantization object.
414  g, pm, params.get_quantization());
415 
416  // Create dequantization object (will be used in metrics).
417  // Its construction is partialy based on the quantization object.
419  g,
420  pm,
421  params.get_quantization(),
422  pq.get_bb_dimension(),
423  pq.get_init_coord());
424 
425  // Create geometric position type object.
426  FEVV::Filters::Kept_position< HalfedgeGraph,
427  PointMap> *KP = nullptr;
428 
429  if (params.get_vkept_position() ==
430  FEVV::Filters::VKEPT_POSITION::HALFEDGE) // Kept at the position of the
431  // halfedge target
432  {
433 #if(DEBUG)
434  std::cout << "HALFEDGE" << std::endl;
435 #endif
436  KP = new FEVV::Filters::
437  Halfedge< HalfedgeGraph, PointMap >(
438  g, pm);
439  }
440  else if (params.get_vkept_position() ==
441  FEVV::Filters::VKEPT_POSITION::MIDPOINT) // kept at the middle of the
442  // halfedge
443  {
444 #if(DEBUG)
445  std::cout << "MIDPOINT" << std::endl;
446 #endif
447  KP = new FEVV::Filters::
448  Midpoint< HalfedgeGraph, PointMap >(
449  g, pm);
450  }
451  else
452  throw std::runtime_error("progressive_compression_filter cannot handle kept position type.");
453 
454  // Create metric object.
455  FEVV::Filters::
456  Error_metric< HalfedgeGraph, PointMap >
457  *EM = nullptr;
458 
459  if (params.get_metric() == FEVV::Filters::METRIC_TYPE::EDGE_LENGTH)
460  {
461  EM = new FEVV::Filters::Edge_length_metric< HalfedgeGraph,
462  PointMap >(g, pm, KP, dq);
463 #if(DEBUG)
464  std::cout << "EDGE_LENGTH" << std::endl;
465 #endif
466  }
468  {
470  HalfedgeGraph,
471  PointMap >( // metric computing the local volume difference between
472  // the locally collapsed neighborhood and the original one
473  g,
474  pm,
475  KP,
476  dq);
477 #if(DEBUG)
478  std::cout << "VOLUME_PRESERVING" << std::endl;
479 #endif
480  }
481  else if (params.get_metric() == FEVV::Filters::METRIC_TYPE::QEM_3D)
482  {
483  EM = new FEVV::Filters::QEM_3D< HalfedgeGraph,
484  PointMap >( // Quadric error metric
485  g,
486  pm,
487  KP,
488  dq);
489 #if(DEBUG)
490  std::cout << "QEM_3D" << std::endl;
491 #endif
492  }
493  else
494  {
495  delete KP;
496  throw std::runtime_error("progressive_compression_filter cannot handle metric type.");
497  }
498 
499  // Create geometric predictor object.
500  FEVV::Filters::Predictor< HalfedgeGraph,
501  PointMap > *predict = nullptr;
502 
504  {
505  predict = new FEVV::Filters::
506  Butterfly< HalfedgeGraph, PointMap >(g, KP, pm);
507 #if(DEBUG)
508  std::cout << "BUTTERFLY" << std::endl;
509 #endif
510  }
511  else if (params.get_prediction() == FEVV::Filters::PREDICTION_TYPE::DELTA)
512  {
513  predict = new FEVV::Filters::Delta_predictor< HalfedgeGraph,
514  PointMap >(g, KP, pm);
515 #if(DEBUG)
516  std::cout << "DELTA" << std::endl;
517 #endif
518  }
519  else if (params.get_prediction() == FEVV::Filters::PREDICTION_TYPE::POSITION)
520  {
521  predict = new FEVV::Filters::Raw_positions< HalfedgeGraph,
522  PointMap >(g, KP, pm);
523 #if(DEBUG)
524  std::cout << "POSITION" << std::endl;
525 #endif
526  }
527  else
528  {
529  delete KP;
530  delete EM;
531  throw std::runtime_error("progressive_compression_filter cannot handle geometric prediction type.");
532  }
533 
534  std::string measure_path = // used when measure is set to true (Generate csv
535  // data file for encoded mesh)
536  output_path + predict->get_as_string() +
537  EM->get_as_string() + KP->get_as_string() +
538  std::to_string(params.get_quantization()) + ".csv";
539  // If the binary path is not set by the user, it will automatically set the
540  // path to output_path[predictor][metric][keptposition][quantization].bin
541  if (binary_path == "")
542  {
543  binary_path = output_path + predict->get_as_string() +
544  EM->get_as_string() + KP->get_as_string() +
545  std::to_string(params.get_quantization()) + ".bin";
546  }
548  draco::EncoderBuffer buffer;
549 
551  pm,
552  pq,
553  v_cm,
554  e_cm,
555  gt,
556  EM,
557  KP,
558  predict,
559  params.get_quantization(),
560  nb_max_batches,
561  nb_min_vertices,
562  batch_condition,
563  buffer,
564  measure_path,
565  preprocess,
566  dequantiz,
567  save_preprocess,
568  output_file_path_save_preprocess,
569  params.get_allow_duplicates());
571  // write this info into binary file
572  std::ofstream binary_output_file;
573 
574  binary_output_file.open(binary_path, std::fstream::binary | std::ofstream::out | std::ofstream::trunc);
575  binary_output_file.write(buffer.data(), buffer.size());
576  binary_output_file.close();
577 
578  delete KP;
579  delete EM;
580  delete predict;
581 
582  if (dequantiz)
583  {
585  }
586 
587 #ifdef TIMING
588  auto time_point_after_comp = std::chrono::high_resolution_clock::now();
589  auto duration_comp = std::chrono::duration_cast<std::chrono::milliseconds>(time_point_after_comp - time_point_before_comp);
590  std::cout << "Compression time: " << duration_comp.count() << " milliseconds" << std::endl;
591 #endif
592 }
593 
633 template< typename HalfedgeGraph,
634  typename PointMap,
635  typename VertexColorMap,
636  typename EdgeColorMap,
637  typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph > >
638 void
640  PointMap &pm,
641  VertexColorMap &v_cm,
642  EdgeColorMap &e_cm,
643  const FEVV::Filters::Parameters &params,
644  const std::string &output_path,
645  std::string &binary_path,
646  int nb_max_batches,
647  int nb_min_vertices,
648  FEVV::Filters::BATCH_CONDITION batch_condition,
649  bool preprocess = true,
650  bool dequantiz = false,
651  bool save_preprocess = false,
652  const std::string& output_file_path_save_preprocess = "")
653 
654 {
655  GeometryTraits gt(g);
657  pm,
658  v_cm,
659  e_cm,
660  gt,
661  params,
662  output_path,
663  binary_path,
664  nb_max_batches,
665  nb_min_vertices,
666  batch_condition,
667  preprocess,
668  dequantiz,
669  save_preprocess,
670  output_file_path_save_preprocess);
671 }
672 
673 } // namespace Filters
674 } // namespace FEVV
FEVV::Filters::Preprocessing
Preprocessing class is dedicated to provide a list of preprocessings that are needed to guarantee tha...
Definition: Preprocessing.h:51
FEVV::put_property_map
void put_property_map(PropertyT p, const MeshT &, PMapsContainer &pmaps, const typename PMap_traits< PropertyT, MeshT >::pmap_type &pmap)
Definition: properties.h:664
Delta_predictor.h
FEVV::DataStructures::AIF::num_vertices
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertices_size_type num_vertices(const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns an upper bound of the number of vertices of the mesh.
Definition: Graph_traits_aif.h:191
FEVV::Filters::Uniform_quantization::get_bb_dimension
std::vector< double > get_bb_dimension() const
Definition: Uniform_quantization.h:228
Uniform_quantization.h
Binary_batch_encoder.h
FEVV::Filters::Binary_batch_encoder::encode_bitmask
std::pair< int, double > encode_bitmask(const std::list< bool > &bitmask, draco::EncoderBuffer &buffer)
Encodes a bit mask with draco's non-adaptive RAns coder (RAnsBitEncoder).
Definition: Binary_batch_encoder.h:199
Parameters.h
minmax_map.h
FEVV::Filters::Uniform_quantization
Uniform_quantization is a class dedicated to the XYZ uniform quantization of vertex coordinates store...
Definition: Uniform_quantization.h:49
Volume_preserving.h
FEVV::Filters::Binary_batch_encoder::init_measure_file
static void init_measure_file(const std::string &csv_file_path)
Add column titles to cvs file (to call before the addition of measurement lines).
Definition: Binary_batch_encoder.h:60
FEVV::Filters::Error_metric::get_as_string
virtual std::string get_as_string() const =0
FEVV::Filters::Parameters::get_vkept_position
VKEPT_POSITION get_vkept_position() const
Definition: Parameters.h:57
FEVV::Header_handler::get_quantization
int get_quantization() const
Definition: Header_handler.h:159
FEVV::Filters::Raw_positions
Definition: Raw_positions.h:25
FEVV::Filters::QEM_3D
Concrete class to compute the collapse cost of each edge in a mesh as the memoryless variant of QEM e...
Definition: QEM_3D.h:29
Preprocessing.h
color_mesh.h
FEVV::Geometry_traits< HalfedgeGraph >
Uniform_dequantization.h
FEVV::Filters::Uniform_dequantization::point_dequantization
void point_dequantization()
Dequantizes all vertex positions stored in the point map.
Definition: Uniform_dequantization.h:111
FEVV::Filters::Geometric_metrics
Geometric_metrics is a class dedicated to the geometric distance computation between an original full...
Definition: Geometric_metrics.h:55
FEVV::Filters::Uniform_quantization::get_diagonal
double get_diagonal() const
Definition: Uniform_quantization.h:250
FEVV::PMapsContainer
std::map< std::string, boost::any > PMapsContainer
Definition: properties.h:99
FEVV::Filters::Preprocessing::process_mesh_before_quantization
void process_mesh_before_quantization()
Suppress all small connected components (isolated vertices and isolated edges). To apply before quant...
Definition: Preprocessing.h:61
FEVV::Filters::Predictor
Abstract class used to predict position.
Definition: Predictor.h:35
FEVV::Filters::Error_metric
Abstract class to compute the collapse cost of each edge in a mesh. It also manages a priority queue ...
Definition: Error_metric.h:62
FEVV::Filters::Kept_position
Abstract class to represent the position type of the resulting vertex of an edge collapse.
Definition: Kept_position.h:31
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::Filters::is_triangle_mesh
bool is_triangle_mesh(const FaceGraph &g)
Function determining if mesh g is a pure triangular mesh.
Definition: is_triangle_mesh.hpp:29
FEVV::Filters::Parameters::get_prediction
PREDICTION_TYPE get_prediction() const
Definition: Parameters.h:56
FEVV::Filters::METRIC_TYPE::NO_METRIC
@ NO_METRIC
FEVV::edge_color
@ edge_color
Definition: properties.h:73
FEVV::Filters::Edge_length_metric
Concrete class to compute the collapse cost of each edge in a mesh as the edge length (L2).
Definition: Edge_length_metric.h:26
FEVV::vertex_color
@ vertex_color
Definition: properties.h:47
Geometry_traits.h
FEVV::Filters::Binary_batch_encoder::add_line_measure_file
static void add_line_measure_file(const std::string &csv_file_path, int num_batch, std::pair< int, double > &data_bitmask, std::pair< int, double > &data_connectivity, std::pair< int, double > &data_residuals, std::pair< int, double > &data_other_info, double dist_RMSE, double dist_hausdorff, size_t num_values_bitmask, size_t num_values_connectivity, size_t num_values_other_info, size_t size_header, size_t num_vertices)
Add a line of measurements to cvs file.
Definition: Binary_batch_encoder.h:74
FEVV::Filters::Parameters::get_quantization
int get_quantization() const
Definition: Parameters.h:78
FEVV::Filters::Parameters::get_metric
METRIC_TYPE get_metric() const
Definition: Parameters.h:58
FEVV::Filters::Binary_batch_encoder::encode_residuals
std::pair< int, double > encode_residuals(const std::list< std::vector< Vector > > &residuals, draco::EncoderBuffer &buffer, int bit_quantization)
Encodes a set of residuals with draco's entropy coder (SymbolBitEncoder)
Definition: Binary_batch_encoder.h:228
Edge_length_metric.h
FEVV::Filters::Delta_predictor
Definition: Delta_predictor.h:27
FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap >
FEVV::Filters::write_mesh
void write_mesh(const std::string &filename, FEVV::CGALPointSet &g, PMapsContainer &pmaps)
Write mesh to file.
Definition: cgal_point_set_writer.hpp:42
FEVV::Filters::Binary_batch_encoder::quantize_encode_coarse_mesh
size_t quantize_encode_coarse_mesh(HalfedgeGraph &g, PointMap &pm, const Geometry &gt, draco::EncoderBuffer &buffer)
Encodes a non-textured quantized mesh with draco single-rate mesh encoder.
Definition: Binary_batch_encoder.h:105
Geometric_metrics.h
FEVV::Filters::progressive_compression_filter
void progressive_compression_filter(HalfedgeGraph &g, PointMap &pm, FEVV::Filters::Uniform_quantization< HalfedgeGraph, PointMap > &pq, VertexColorMap &v_cm, EdgeColorMap &e_cm, const GeometryTraits &gt, FEVV::Filters::Error_metric< HalfedgeGraph, PointMap > *EM, const FEVV::Filters::Kept_position< HalfedgeGraph, PointMap > *KP, FEVV::Filters::Predictor< HalfedgeGraph, PointMap > *predict, int nb_q_bits, int nb_max_batches, int nb_min_vertices, FEVV::Filters::BATCH_CONDITION batch_condition, draco::EncoderBuffer &buffer, const std::string &measure_path, bool preprocess=true, bool dequantiz=false, bool save_preprocess=false, const std::string &output_file_path_save_preprocess="", bool allow_duplicates=false)
Takes a mesh g, applies batches of simplification until either the number of max batches or the minim...
Definition: progressive_compression_filter.hpp:126
QEM_3D.h
FEVV::Filters::Batch_collapser
Batch_collapser: Takes an halfedge graph and collapses its edges. A Batch_collapser object can simpli...
Definition: Batch_collapser.h:66
FEVV::Header_handler
Definition: Header_handler.h:35
FEVV::Filters::Uniform_quantization::get_init_coord
std::vector< double > get_init_coord() const
Definition: Uniform_quantization.h:239
FEVV::Header_handler::encode_binary_header
size_t encode_binary_header(draco::EncoderBuffer &buffer)
Definition: Header_handler.h:105
FEVV::Filters::Preprocessing::process_mesh_after_quantization
void process_mesh_after_quantization()
Move duplicate vertex positions. To apply after quantization.
Definition: Preprocessing.h:72
properties.h
FEVV::Filters::Uniform_quantization::point_quantization
void point_quantization(bool recompute_quanti_param=false)
Quantizes all vertex positions stored in the point map.
Definition: Uniform_quantization.h:159
FEVV::Filters::Volume_preserving
Concrete class to compute the collapse cost of each edge in a mesh as the local absolute volume error...
Definition: Volume_preserving.h:24
Raw_positions.h
Header_handler.h
FEVV::Filters::Parameters
Parameters contains the compression parameters except the stopping criteria.
Definition: Parameters.h:46
FEVV::Filters::METRIC_TYPE::QEM_3D
@ QEM_3D
do not use a local metric (not implemented in this release)
FEVV::Filters::BATCH_CONDITION
BATCH_CONDITION
Definition: Batch_collapser.h:51
FEVV::Filters::PREDICTION_TYPE::POSITION
@ POSITION
FEVV::size_of_vertices
boost::graph_traits< MeshT >::vertices_size_type size_of_vertices(const MeshT &g)
Real current number of vertices of the mesh. Generic version.
Definition: Graph_traits_extension.h:29
Batch_collapser.h
FEVV::Filters::preprocess_mesh
void preprocess_mesh(HalfedgeGraph &g, PointMap &pm, FEVV::Filters::Uniform_quantization< HalfedgeGraph, PointMap > &pq, bool allow_duplicates=false)
Isolated vertices and isolated edges are removed, then vertex positions are quantized,...
Definition: progressive_compression_filter.hpp:59
FEVV::Filters::Parameters::get_allow_duplicates
bool get_allow_duplicates() const
Definition: Parameters.h:60