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 Lesser General Public License as published 00013 // by the Free Software Foundation, version 2.1. 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 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser 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: 1802 $ 00027 // $Date: 2008-05-19 11:55:07 +0200 (Mon, 19 May 2008) $ 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 DECIMATING_MODULE( ModIndependentSetsT, DecimaterType, IndependentSets ); 00067 00069 ModIndependentSetsT( DecimaterType &_dec ) : Base(_dec, true) {} 00070 00071 00073 void postprocess_collapse(const CollapseInfo& _ci) 00074 { 00075 typename Mesh::VertexVertexIter vv_it; 00076 00077 Base::mesh().status(_ci.v1).set_locked(true); 00078 vv_it = Base::mesh().vv_iter(_ci.v1); 00079 for (; vv_it; ++vv_it) 00080 Base::mesh().status(vv_it).set_locked(true); 00081 } 00082 00083 00084 private: 00085 00087 void set_binary(bool _b) {} 00088 }; 00089 00090 00091 //============================================================================= 00092 } // END_NS_DECIMATER 00093 } // END_NS_OPENMESH 00094 //============================================================================= 00095 #endif // OPENMESH_TOOLS_MODINDEPENDENTSETST_HH defined 00096 //============================================================================= 00097