00001 //============================================================================= 00002 // 00003 // OpenMesh 00004 // Copyright (C) 2003 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: 2004/01/12 17:36:30 $ 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 00074 void postprocess_collapse(const CollapseInfo& _ci) 00075 { 00076 typename Mesh::VertexVertexIter vv_it; 00077 00078 mesh().status(_ci.v1).set_locked(true); 00079 vv_it = mesh().vv_iter(_ci.v1); 00080 for (; vv_it; ++vv_it) 00081 mesh().status(vv_it).set_locked(true); 00082 } 00083 00084 00085 private: 00086 00088 void set_binary(bool _b) {} 00089 }; 00090 00091 00092 //============================================================================= 00093 } // END_NS_DECIMATER 00094 } // END_NS_OPENMESH 00095 //============================================================================= 00096 #endif // OPENMESH_TOOLS_MODINDEPENDENTSETST_HH defined 00097 //============================================================================= 00098