EdgeSetTopologyModifier.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SOFA_COMPONENT_TOPOLOGY_EDGESETTOPOLOGYMODIFIER_H
00026 #define SOFA_COMPONENT_TOPOLOGY_EDGESETTOPOLOGYMODIFIER_H
00027
00028 #include <sofa/component/topology/PointSetTopologyModifier.h>
00029
00030 namespace sofa
00031 {
00032
00033 namespace component
00034 {
00035
00036 namespace topology
00037 {
00038 class EdgeSetTopologyContainer;
00039
00040 using core::componentmodel::topology::BaseMeshTopology;
00041 typedef BaseMeshTopology::EdgeID EdgeID;
00042 typedef BaseMeshTopology::Edge Edge;
00043 typedef BaseMeshTopology::SeqEdges SeqEdges;
00044 typedef BaseMeshTopology::VertexEdges VertexEdges;
00045
00049 class EdgeSetTopologyModifier : public PointSetTopologyModifier
00050 {
00051 public:
00052 EdgeSetTopologyModifier()
00053 : PointSetTopologyModifier()
00054 {}
00055
00056 virtual ~EdgeSetTopologyModifier() {}
00057
00058 virtual void init();
00059
00064 virtual void addEdgesWarning(const unsigned int nEdges);
00065
00070 virtual void addEdgesWarning(const unsigned int nEdges,
00071 const sofa::helper::vector< Edge >& edgesList,
00072 const sofa::helper::vector< unsigned int >& edgesIndexList);
00073
00078 virtual void addEdgesWarning(const unsigned int nEdges,
00079 const sofa::helper::vector< Edge >& edgesList,
00080 const sofa::helper::vector< unsigned int >& edgesIndexList,
00081 const sofa::helper::vector< sofa::helper::vector< unsigned int > > & ancestors);
00082
00087 virtual void addEdgesWarning(const unsigned int nEdges,
00088 const sofa::helper::vector< Edge >& edgesList,
00089 const sofa::helper::vector< unsigned int >& edgesIndexList,
00090 const sofa::helper::vector< sofa::helper::vector< unsigned int > > & ancestors,
00091 const sofa::helper::vector< sofa::helper::vector< double > >& baryCoefs);
00092
00095 void addEdgeProcess(Edge e);
00096
00101 virtual void addEdgesProcess(const sofa::helper::vector< Edge > &edges);
00102
00107
00108 virtual void removeEdgesWarning( sofa::helper::vector<unsigned int> &edges);
00109
00121 virtual void removeEdgesProcess(const sofa::helper::vector<unsigned int> &indices, const bool removeIsolatedItems = false);
00122
00126 virtual void swapEdgesProcess(const sofa::helper::vector< sofa::helper::vector< unsigned int > >& edgesPairs);
00127
00132 virtual void fuseEdgesProcess(const sofa::helper::vector< sofa::helper::vector< unsigned int > >& edgesPairs, const bool removeIsolatedPoints = true);
00133
00138 virtual void splitEdgesProcess( sofa::helper::vector<unsigned int> &indices,
00139 const bool removeIsolatedPoints = true);
00140
00145 virtual void splitEdgesProcess( sofa::helper::vector<unsigned int> &indices,
00146 const sofa::helper::vector< sofa::helper::vector< double > >& baryCoefs,
00147 const bool removeIsolatedPoints = true);
00148
00153 virtual void addPointsProcess(const unsigned int nPoints);
00154
00163 virtual void removePointsProcess( sofa::helper::vector<unsigned int> &indices,
00164 const bool removeDOF = true);
00165
00171 virtual void renumberPointsProcess( const sofa::helper::vector<unsigned int> &index,
00172 const sofa::helper::vector<unsigned int> &,
00173 const bool renumberDOF = true);
00174
00179
00180 virtual void removeEdges( sofa::helper::vector< unsigned int >& edges,
00181 const bool removeIsolatedPoints = true);
00182
00185 virtual void removeItems( sofa::helper::vector< unsigned int >& items);
00186
00189 virtual void renumberPoints( const sofa::helper::vector<unsigned int> & index,
00190 const sofa::helper::vector<unsigned int> & inv_index);
00191
00196 virtual void addEdges(const sofa::helper::vector< Edge >& edges) ;
00197
00204 virtual void addEdges(const sofa::helper::vector< Edge >& edges,
00205 const sofa::helper::vector< sofa::helper::vector< unsigned int > > & ancestors,
00206 const sofa::helper::vector< sofa::helper::vector< double > >& baryCoefs) ;
00207
00211 virtual void swapEdges(const sofa::helper::vector< sofa::helper::vector< unsigned int > >& edgesPairs);
00212
00217 virtual void fuseEdges(const sofa::helper::vector< sofa::helper::vector< unsigned int > >& edgesPairs, const bool removeIsolatedPoints = true);
00218
00224 virtual void splitEdges( sofa::helper::vector<unsigned int> &indices,
00225 const bool removeIsolatedPoints = true);
00226
00232 virtual void splitEdges( sofa::helper::vector<unsigned int> &indices,
00233 const sofa::helper::vector< sofa::helper::vector< double > >& baryCoefs,
00234 const bool removeIsolatedPoints = true);
00235
00238 virtual void resortCuthillMckee(sofa::helper::vector<int>& inverse_permutation);
00239
00240 private:
00241 EdgeSetTopologyContainer* m_container;
00242 };
00243
00244 }
00245
00246 }
00247
00248 }
00249
00250 #endif