QuadSetTopologyModifier.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_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 }
00179
00180 }
00181
00182 }
00183
00184 #endif