Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ModIndependentSetsT.hh

00001 //=============================================================================
00002 //                                                                            
00003 //                               OpenMesh                                     
00004 //      Copyright (C) 2001-2005 by Computer Graphics Group, RWTH Aachen       
00005 //                           www.openmesh.org                                 
00006 //                                                                            
00007 //-----------------------------------------------------------------------------
00008 //                                                                            
00009 //                                License                                     
00010 //                                                                            
00011 //   This library is free software; you can redistribute it and/or modify it 
00012 //   under the terms of the GNU Library General Public License as published  
00013 //   by the Free Software Foundation, version 2.                             
00014 //                                                                             
00015 //   This library is distributed in the hope that it will be useful, but       
00016 //   WITHOUT ANY WARRANTY; without even the implied warranty of                
00017 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         
00018 //   Library General Public License for more details.                          
00019 //                                                                            
00020 //   You should have received a copy of the GNU Library General Public         
00021 //   License along with this library; if not, write to the Free Software       
00022 //   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 
00023 //                                                                            
00024 //-----------------------------------------------------------------------------
00025 //                                                                            
00026 //   $Revision: 1.4 $
00027 //   $Date: 2005/05/05 11:17:48 $
00028 //                                                                            
00029 //=============================================================================
00030 
00035 //=============================================================================
00036 //
00037 //  CLASS ModQuadricT
00038 //
00039 //=============================================================================
00040 
00041 #ifndef OPENMESH_TOOLS_MODINDEPENDENTSETST_HH
00042 #define OPENMESH_TOOLS_MODINDEPENDENTSETST_HH
00043 
00044 
00045 //== INCLUDES =================================================================
00046 
00047 #include <OpenMesh/Tools/Decimater/ModBaseT.hh>
00048 
00049 
00050 //== NAMESPACE ================================================================
00051 
00052 namespace OpenMesh { // BEGIN_NS_OPENMESH
00053 namespace Decimater { // BEGIN_NS_DECIMATER
00054 
00055 
00056 //== CLASS DEFINITION =========================================================
00057 
00058 
00062 template <class DecimaterType>
00063 class ModIndependentSetsT : public ModBaseT<DecimaterType>
00064 {
00065 public:
00066 
00067   DECIMATING_MODULE( ModIndependentSetsT, DecimaterType, IndependentSets );
00068 
00070   ModIndependentSetsT( DecimaterType &_dec ) : Base(_dec, true) {}
00071 
00072   
00073   // only binary mode possible
00074   void set_binary(bool _b) 
00075   {
00076     if (!_b)
00077     {
00078       std::cerr << "ModNormalFlippingT can only be used binary\n";
00079       exit(1);
00080     }
00081   }
00082 
00083 
00084   // lock one-ring
00085   void postprocess_collapse(const CollapseInfo& _ci)
00086   { 
00087     typename std::vector<typename Mesh::VertexHandle>::const_iterator
00088       vh_it(_ci.one_ring.begin()), vh_end(_ci.one_ring.end());
00089     for (; vh_it!=vh_end; ++vh_it)
00090       Self::mesh().status(*vh_it).set_locked(true);    
00091   }
00092 };
00093 
00094 
00095 //=============================================================================
00096 } // END_NS_DECIMATER
00097 } // END_NS_OPENMESH
00098 //=============================================================================
00099 #endif // OPENMESH_TOOLS_MODINDEPENDENTSETST_HH defined
00100 //=============================================================================
00101 

acg pic Project OpenMesh, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .