QuadSetTopologyModifier.h

Go to the documentation of this file.
00001 /******************************************************************************
00002 *       SOFA, Simulation Open-Framework Architecture, version 1.0 beta 3      *
00003 *                (c) 2006-2008 MGH, INRIA, USTL, UJF, CNRS                    *
00004 *                                                                             *
00005 * This library is free software; you can redistribute it and/or modify it     *
00006 * under the terms of the GNU Lesser General Public License as published by    *
00007 * the Free Software Foundation; either version 2.1 of the License, or (at     *
00008 * your option) any later version.                                             *
00009 *                                                                             *
00010 * This library is distributed in the hope that it will be useful, but WITHOUT *
00011 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       *
00012 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
00013 * for more details.                                                           *
00014 *                                                                             *
00015 * You should have received a copy of the GNU Lesser General Public License    *
00016 * along with this library; if not, write to the Free Software Foundation,     *
00017 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.          *
00018 *******************************************************************************
00019 *                               SOFA :: Modules                               *
00020 *                                                                             *
00021 * Authors: The SOFA Team and external contributors (see Authors.txt)          *
00022 *                                                                             *
00023 * Contact information: contact@sofa-framework.org                             *
00024 ******************************************************************************/
00025 #ifndef SOFA_COMPONENT_TOPOLOGY_QUADSETTOPOLOGYMODIFIER_H
00026 #define SOFA_COMPONENT_TOPOLOGY_QUADSETTOPOLOGYMODIFIER_H
00027 
00028 #include <sofa/component/topology/EdgeSetTopologyModifier.h>
00029 
00030 namespace sofa
00031 {
00032 
00033 namespace component
00034 {
00035 
00036 namespace topology
00037 {
00038     class QuadSetTopologyContainer;
00039     
00040     using core::componentmodel::topology::BaseMeshTopology;
00041     typedef BaseMeshTopology::QuadID QuadID;
00042     typedef BaseMeshTopology::Quad Quad;
00043     typedef BaseMeshTopology::SeqQuads SeqQuads;
00044     typedef BaseMeshTopology::VertexQuads VertexQuads;
00045     typedef BaseMeshTopology::EdgeQuads EdgeQuads;
00046     typedef BaseMeshTopology::QuadEdges QuadEdges;
00047     
00051     class QuadSetTopologyModifier : public EdgeSetTopologyModifier 
00052     {
00053     public: 
00054         QuadSetTopologyModifier()
00055         : EdgeSetTopologyModifier()
00056         { }
00057 
00058         virtual ~QuadSetTopologyModifier() {}
00059 
00060         virtual void init();
00061 
00066         void addQuadsWarning(const unsigned int nQuads,
00067             const sofa::helper::vector< Quad >& quadsList,
00068             const sofa::helper::vector< unsigned int >& quadsIndexList);
00069 
00074         void addQuadsWarning(const unsigned int nQuads,
00075             const sofa::helper::vector< Quad >& quadsList,
00076             const sofa::helper::vector< unsigned int >& quadsIndexList,
00077             const sofa::helper::vector< sofa::helper::vector< unsigned int > > & ancestors,
00078             const sofa::helper::vector< sofa::helper::vector< double > >& baryCoefs);
00079 
00082         void addQuadProcess(Quad e);
00083 
00088         virtual void addQuadsProcess(const sofa::helper::vector< Quad > &quads);
00089 
00096         virtual void removeQuadsWarning( sofa::helper::vector<unsigned int> &quads);
00097 
00106         virtual void removeQuadsProcess( const sofa::helper::vector<unsigned int> &indices, 
00107                                         const bool removeIsolatedEdges=false, 
00108                                         const bool removeIsolatedPoints=false);
00109 
00114         void addEdgesProcess(const sofa::helper::vector< Edge > &edges);
00115 
00124         virtual void removeEdgesProcess( const sofa::helper::vector<unsigned int> &indices,
00125                                         const bool removeIsolatedItems=false);
00126 
00131         virtual void addPointsProcess(const unsigned int nPoints);  
00132 
00141         virtual void removePointsProcess(sofa::helper::vector<unsigned int> &indices, 
00142                                         const bool removeDOF = true);
00143 
00149         virtual void renumberPointsProcess( const sofa::helper::vector<unsigned int>& index, 
00150                                             const sofa::helper::vector<unsigned int>& inv_index, 
00151                                             const bool renumberDOF = true); 
00152 
00160         virtual void removeQuads(sofa::helper::vector< unsigned int >& quads, 
00161                                 const bool removeIsolatedEdges, 
00162                                 const bool removeIsolatedPoints);
00163 
00166         virtual void removeItems(sofa::helper::vector< unsigned int >& items);
00167 
00170         virtual void renumberPoints( const sofa::helper::vector<unsigned int>& index, 
00171                                     const sofa::helper::vector<unsigned int>& inv_index);
00172 
00173 
00174     private:
00175         QuadSetTopologyContainer*   m_container;
00176     };
00177 
00178 } // namespace topology
00179 
00180 } // namespace component
00181 
00182 } // namespace sofa
00183 
00184 #endif

Generated on Sun Nov 23 03:45:50 2008 for Sofa by  doxygen 1.5.7.1