Don't like ads? PRO users don't see any ads ;-)
Guest

ata2

By: a guest on Apr 27th, 2012  |  syntax: C++  |  size: 0.91 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include "Skelcollapse.h"
  2. #include "starlab/plugins/surfacemesh_io_off/surfacemesh_io_helpers.h"
  3.  
  4. #if 0 /// LEGACY EXPERIMENTS
  5. //#include "aux_sphere_contraction.cpp"
  6. //#include "aux_au_contraction.cpp"
  7. //#include "aux_multires_laplacian.cpp"
  8. #endif
  9.  
  10. //#include "aux_voronoi_poles.cpp"
  11. //#include "aux_andrea_contraction.cpp"
  12. #include "aux_medial_contraction.cpp"
  13. //#include "aux_sheets_contraction.cpp"
  14.  
  15. void Skelcollapse::applyFilter(Document* document, RichParameterSet* pars, StarlabDrawArea* drawArea){
  16.     /// Filter initialization
  17.     this->drawArea = drawArea;
  18.     this->mesh = qobject_cast<SurfaceMeshModel*>( document->selectedModel() );
  19.     drawArea->deleteAllRenderObjects();
  20.        
  21.     /// Run Algorthm
  22.     algorithm(pars);
  23.            
  24.     /// Update internal state
  25.     toggle = !toggle;
  26.     firststep = false;
  27.     stepcount++;
  28.    
  29.     return;
  30. }  
  31.  
  32. Q_EXPORT_PLUGIN(Skelcollapse)