ReductionAlgorithms.hpp
Go to the documentation of this file.
1 
28 /*
29  * ReductionAlgorithms.hpp
30  *
31  * All these algorithms are based on/inspired by:
32  *
33  * Melax, Stan. "A simple, fast, and effective polygon reduction algorithm."
34  * Game Developer 11 (1998): 44-49.
35  */
36 
37 #ifndef LVR2_ALGORITHM_REDUCTIONALGORITHMS_H_
38 #define LVR2_ALGORITHM_REDUCTIONALGORITHMS_H_
39 
40 #include <boost/optional.hpp>
41 
42 
43 
44 namespace lvr2
45 {
46 
73 template<typename BaseVecT, typename CostF>
75  BaseMesh<BaseVecT>& mesh,
76  const size_t count,
77  FaceMap<Normal<typename BaseVecT::CoordType>>& faceNormals,
78  CostF collapseCost
79 );
80 
84 template<typename BaseVecT>
85 size_t simpleMeshReduction(
86  BaseMesh<BaseVecT>& mesh,
87  const size_t count,
88  FaceMap<Normal<typename BaseVecT::CoordType>>& faceNormals
89 );
90 
91 } // namespace lvr2
92 
93 #include "lvr2/algorithm/ReductionAlgorithms.tcc"
94 
95 #endif /* LVR2_ALGORITHM_REDUCTIONALGORITHMS_H_ */
lvr2::FaceMap
AttributeMap< FaceHandle, ValueT > FaceMap
Definition: AttrMaps.hpp:93
lvr2::iterativeEdgeCollapse
size_t iterativeEdgeCollapse(BaseMesh< BaseVecT > &mesh, const size_t count, FaceMap< Normal< typename BaseVecT::CoordType >> &faceNormals, CostF collapseCost)
Collapses count many edges of mesh for which collapseCost returns the smallest values.
lvr2::simpleMeshReduction
size_t simpleMeshReduction(BaseMesh< BaseVecT > &mesh, const size_t count, FaceMap< Normal< typename BaseVecT::CoordType >> &faceNormals)
Like iterativeEdgeCollapse but with a fixed cost function.
lvr2
Definition: BaseBufferManipulators.hpp:39
mesh
HalfEdgeMesh< Vec > mesh
Definition: src/tools/lvr2_gs_reconstruction/Main.cpp:26


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24