mesh_decimation.h
Go to the documentation of this file.
00001 
00063 #ifndef COB_MESH_DECIMATION_H
00064 #define COB_MESH_DECIMATION_H
00065 
00066 
00067 #include <OpenMesh/Tools/Decimater/DecimaterT.hh>
00068 #include <OpenMesh/Tools/Decimater/ModQuadricT.hh>
00069 
00070 #include "cob_3d_meshing/decimation_modules.h"
00071 #include "cob_3d_meshing/mesh_types.h"
00072 
00073 namespace cob_3d_meshing
00074 {
00075   template<typename MeshT>
00076   class MeshDecimation
00077   {
00078     typedef typename MeshT::MeshT OpenMeshT;
00079     typedef OpenMesh::Decimater::DecimaterT<OpenMeshT> Decimater;
00080 
00081   public:
00082     static void quadratic(MeshT* mesh_hdl, int n)
00083     {
00084       typedef OpenMesh::Decimater::ModQuadricT<OpenMeshT> ModuleT;
00085       typedef typename ModuleT::Handle ModuleHandle;
00086       Decimater dec(mesh_hdl->mesh_);
00087       ModuleHandle mod;
00088       dec.add(mod);
00089       dec.initialize();
00090       dec.module(mod).set_binary(false);
00091       dec.decimate_to(n);
00092       mesh_hdl->mesh_.garbage_collection();
00093     }
00094   };
00095 }
00096 
00097 #endif


cob_3d_meshing
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:04:03