#include <ManifoldEdgeSetTopologyContainer.h>


Data Structures | |
| class | ConnectedComponent |
Public Member Functions | |
| ManifoldEdgeSetTopologyContainer () | |
| ManifoldEdgeSetTopologyContainer (const sofa::helper::vector< Edge > &edges) | |
| virtual | ~ManifoldEdgeSetTopologyContainer () |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| virtual void | clear () |
| Procedural creation methods. | |
| virtual bool | checkTopology () const |
| Checks if the topology is coherent. | |
| virtual int | getNumberConnectedComponents (sofa::helper::vector< unsigned int > &components) |
| Returns the number of connected components from the graph containing all edges and give, for each vertex, which component it belongs to (use BOOST GRAPH LIBRAIRY). | |
Protected Member Functions | |
| virtual void | createEdgeVertexShellArray () |
| Creates the EdgeSetIndex. | |
Private Member Functions | |
| void | resetConnectedComponent () |
| Resets the array of connected components and the ComponentVertex array (which are not valide anymore). | |
| bool | isvoid_ConnectedComponent () |
| Returns true iff the array of connected components and the ComponentVertex array are valide (ie : not void). | |
| void | computeConnectedComponent () |
| Computes the array of connected components and the ComponentVertex array (which makes them valide). | |
| virtual int | getNumberOfConnectedComponents () |
| Returns the number of connected components. | |
| virtual int | getFirstVertexIndex (unsigned int i) |
| Returns the FirstVertexIndex of the ith connected component. | |
| virtual int | getLastVertexIndex (unsigned int i) |
| Returns the LastVertexIndex of the ith connected component. | |
| virtual int | getComponentSize (unsigned int i) |
| Returns the size of the ith connected component. | |
| virtual int | getComponentIndex (unsigned int i) |
| Returns the index of the ith connected component. | |
| virtual bool | isComponentClosed (unsigned int i) |
| Returns true iff the ith connected component is closed (ie : iff FirstVertexIndex == LastVertexIndex). | |
| int | getNextVertex (const unsigned int i) |
| Returns the indice of the vertex which is next to the vertex indexed by i. | |
| int | getPreviousVertex (const unsigned int i) |
| Returns the indice of the vertex which is previous to the vertex indexed by i. | |
| int | getNextEdge (const unsigned int i) |
| Returns the indice of the edge which is next to the edge indexed by i. | |
| int | getPreviousEdge (const unsigned int i) |
| Returns the indice of the edge which is previous to the edge indexed by i. | |
| const sofa::helper::vector < unsigned int > & | getComponentVertexArray () const |
| Returns the ComponentVertex array. | |
| const sofa::helper::vector < ConnectedComponent > & | getConnectedComponentArray () const |
| Returns the array of connected components. | |
Private Attributes | |
| sofa::helper::vector< unsigned int > | m_ComponentVertexArray |
| The array that stores for each vertex index, the connected component the vertex belongs to. | |
| sofa::helper::vector < ConnectedComponent > | m_ConnectedComponentArray |
| The array that stores the connected components. | |
Friends | |
| class | ManifoldEdgeSetTopologyModifier |
| std::ostream & | operator<< (std::ostream &out, const ManifoldEdgeSetTopologyContainer &t) |
| std::istream & | operator>> (std::istream &in, ManifoldEdgeSetTopologyContainer &t) |
| Needed to be compliant with Datas. | |
this topology is constraint by the manifold property : each vertex is adjacent either to one vertex or to two vertices.
Definition at line 50 of file ManifoldEdgeSetTopologyContainer.h.
| sofa::component::topology::ManifoldEdgeSetTopologyContainer::ManifoldEdgeSetTopologyContainer | ( | ) |
Definition at line 59 of file ManifoldEdgeSetTopologyContainer.cpp.
| sofa::component::topology::ManifoldEdgeSetTopologyContainer::ManifoldEdgeSetTopologyContainer | ( | const sofa::helper::vector< Edge > & | edges | ) |
Definition at line 63 of file ManifoldEdgeSetTopologyContainer.cpp.
| virtual sofa::component::topology::ManifoldEdgeSetTopologyContainer::~ManifoldEdgeSetTopologyContainer | ( | ) | [inline, virtual] |
Definition at line 59 of file ManifoldEdgeSetTopologyContainer.h.
| bool sofa::component::topology::ManifoldEdgeSetTopologyContainer::checkTopology | ( | ) | const [virtual] |
Checks if the topology is coherent.
Check if the shell arrays are coherent
Reimplemented from sofa::component::topology::EdgeSetTopologyContainer.
Definition at line 190 of file ManifoldEdgeSetTopologyContainer.cpp.
References sofa::component::topology::EdgeSetTopologyContainer::hasEdgeVertexShell(), and sofa::component::topology::EdgeSetTopologyContainer::m_edgeVertexShell.
Referenced by sofa::component::topology::ManifoldEdgeSetTopologyModifier::fuseEdges(), init(), sofa::component::topology::ManifoldEdgeSetTopologyModifier::removeEdges(), sofa::component::topology::ManifoldEdgeSetTopologyModifier::renumberPoints(), sofa::component::topology::ManifoldEdgeSetTopologyModifier::splitEdges(), and sofa::component::topology::ManifoldEdgeSetTopologyModifier::swapEdges().
| void sofa::component::topology::ManifoldEdgeSetTopologyContainer::clear | ( | ) | [virtual] |
Procedural creation methods.
Reimplemented from sofa::component::topology::EdgeSetTopologyContainer.
Definition at line 216 of file ManifoldEdgeSetTopologyContainer.cpp.
References m_ComponentVertexArray, and m_ConnectedComponentArray.
| void sofa::component::topology::ManifoldEdgeSetTopologyContainer::computeConnectedComponent | ( | ) | [private] |
Computes the array of connected components and the ComponentVertex array (which makes them valide).
Definition at line 134 of file ManifoldEdgeSetTopologyContainer.cpp.
References sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), sofa::component::topology::EdgeSetTopologyContainer::getEdgeArray(), sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShell(), isvoid_ConnectedComponent(), m_ComponentVertexArray, and m_ConnectedComponentArray.
Referenced by getComponentIndex(), getComponentSize(), getFirstVertexIndex(), getLastVertexIndex(), getNumberConnectedComponents(), getNumberOfConnectedComponents(), init(), and isComponentClosed().
| void sofa::component::topology::ManifoldEdgeSetTopologyContainer::createEdgeVertexShellArray | ( | ) | [protected, virtual] |
Creates the EdgeSetIndex.
This function is only called if the EdgeShell member is required. EdgeShell[i] contains the indices of all edges having the ith DOF as one of their ends.
Reimplemented from sofa::component::topology::EdgeSetTopologyContainer.
Definition at line 79 of file ManifoldEdgeSetTopologyContainer.cpp.
References sofa::component::topology::EdgeSetTopologyContainer::clearEdgeVertexShell(), sofa::component::topology::EdgeSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::PointSetTopologyContainer::getNbPoints(), sofa::component::topology::EdgeSetTopologyContainer::hasEdges(), sofa::component::topology::EdgeSetTopologyContainer::hasEdgeVertexShell(), sofa::component::topology::EdgeSetTopologyContainer::m_edge, and sofa::component::topology::EdgeSetTopologyContainer::m_edgeVertexShell.
Referenced by init().
| virtual int sofa::component::topology::ManifoldEdgeSetTopologyContainer::getComponentIndex | ( | unsigned int | i | ) | [inline, private, virtual] |
Returns the index of the ith connected component.
Definition at line 191 of file ManifoldEdgeSetTopologyContainer.h.
References computeConnectedComponent(), and m_ConnectedComponentArray.
| virtual int sofa::component::topology::ManifoldEdgeSetTopologyContainer::getComponentSize | ( | unsigned int | i | ) | [inline, private, virtual] |
Returns the size of the ith connected component.
Definition at line 181 of file ManifoldEdgeSetTopologyContainer.h.
References computeConnectedComponent(), and m_ConnectedComponentArray.
| const sofa::helper::vector< unsigned int >& sofa::component::topology::ManifoldEdgeSetTopologyContainer::getComponentVertexArray | ( | ) | const [inline, private] |
Returns the ComponentVertex array.
Definition at line 257 of file ManifoldEdgeSetTopologyContainer.h.
References m_ComponentVertexArray.
| const sofa::helper::vector< ConnectedComponent >& sofa::component::topology::ManifoldEdgeSetTopologyContainer::getConnectedComponentArray | ( | ) | const [inline, private] |
Returns the array of connected components.
Definition at line 265 of file ManifoldEdgeSetTopologyContainer.h.
References m_ConnectedComponentArray.
| virtual int sofa::component::topology::ManifoldEdgeSetTopologyContainer::getFirstVertexIndex | ( | unsigned int | i | ) | [inline, private, virtual] |
Returns the FirstVertexIndex of the ith connected component.
Definition at line 161 of file ManifoldEdgeSetTopologyContainer.h.
References computeConnectedComponent(), and m_ConnectedComponentArray.
| virtual int sofa::component::topology::ManifoldEdgeSetTopologyContainer::getLastVertexIndex | ( | unsigned int | i | ) | [inline, private, virtual] |
Returns the LastVertexIndex of the ith connected component.
Definition at line 171 of file ManifoldEdgeSetTopologyContainer.h.
References computeConnectedComponent(), and m_ConnectedComponentArray.
| int sofa::component::topology::ManifoldEdgeSetTopologyContainer::getNextEdge | ( | const unsigned int | i | ) | [inline, private] |
Returns the indice of the edge which is next to the edge indexed by i.
Definition at line 234 of file ManifoldEdgeSetTopologyContainer.h.
References sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), and sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShell().
| int sofa::component::topology::ManifoldEdgeSetTopologyContainer::getNextVertex | ( | const unsigned int | i | ) | [inline, private] |
Returns the indice of the vertex which is next to the vertex indexed by i.
Definition at line 210 of file ManifoldEdgeSetTopologyContainer.h.
References sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), and sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShell().
| int sofa::component::topology::ManifoldEdgeSetTopologyContainer::getNumberConnectedComponents | ( | sofa::helper::vector< unsigned int > & | components | ) | [virtual] |
Returns the number of connected components from the graph containing all edges and give, for each vertex, which component it belongs to (use BOOST GRAPH LIBRAIRY).
| components | the array containing the optimal vertex permutation according to the Reverse CuthillMckee algorithm |
Reimplemented from sofa::component::topology::EdgeSetTopologyContainer.
Definition at line 126 of file ManifoldEdgeSetTopologyContainer.cpp.
References computeConnectedComponent(), m_ComponentVertexArray, and m_ConnectedComponentArray.
| virtual int sofa::component::topology::ManifoldEdgeSetTopologyContainer::getNumberOfConnectedComponents | ( | ) | [inline, private, virtual] |
Returns the number of connected components.
Definition at line 152 of file ManifoldEdgeSetTopologyContainer.h.
References computeConnectedComponent(), and m_ConnectedComponentArray.
| int sofa::component::topology::ManifoldEdgeSetTopologyContainer::getPreviousEdge | ( | const unsigned int | i | ) | [inline, private] |
Returns the indice of the edge which is previous to the edge indexed by i.
Definition at line 245 of file ManifoldEdgeSetTopologyContainer.h.
References sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), and sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShell().
| int sofa::component::topology::ManifoldEdgeSetTopologyContainer::getPreviousVertex | ( | const unsigned int | i | ) | [inline, private] |
Returns the indice of the vertex which is previous to the vertex indexed by i.
Definition at line 222 of file ManifoldEdgeSetTopologyContainer.h.
References sofa::core::componentmodel::topology::BaseMeshTopology::getEdge(), and sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShell().
| void sofa::component::topology::ManifoldEdgeSetTopologyContainer::init | ( | void | ) | [virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::component::topology::EdgeSetTopologyContainer.
Definition at line 67 of file ManifoldEdgeSetTopologyContainer.cpp.
References checkTopology(), computeConnectedComponent(), and createEdgeVertexShellArray().
| virtual bool sofa::component::topology::ManifoldEdgeSetTopologyContainer::isComponentClosed | ( | unsigned int | i | ) | [inline, private, virtual] |
Returns true iff the ith connected component is closed (ie : iff FirstVertexIndex == LastVertexIndex).
Definition at line 201 of file ManifoldEdgeSetTopologyContainer.h.
References computeConnectedComponent(), and m_ConnectedComponentArray.
| bool sofa::component::topology::ManifoldEdgeSetTopologyContainer::isvoid_ConnectedComponent | ( | ) | [inline, private] |
Returns true iff the array of connected components and the ComponentVertex array are valide (ie : not void).
Definition at line 139 of file ManifoldEdgeSetTopologyContainer.h.
References m_ConnectedComponentArray.
Referenced by computeConnectedComponent().
| void sofa::component::topology::ManifoldEdgeSetTopologyContainer::resetConnectedComponent | ( | ) | [inline, private] |
Resets the array of connected components and the ComponentVertex array (which are not valide anymore).
Definition at line 130 of file ManifoldEdgeSetTopologyContainer.h.
References m_ComponentVertexArray, and m_ConnectedComponentArray.
Referenced by sofa::component::topology::ManifoldEdgeSetTopologyModifier::addEdgeProcess(), sofa::component::topology::ManifoldEdgeSetTopologyModifier::addEdgesProcess(), and sofa::component::topology::ManifoldEdgeSetTopologyModifier::removeEdgesProcess().
friend class ManifoldEdgeSetTopologyModifier [friend] |
Definition at line 52 of file ManifoldEdgeSetTopologyContainer.h.
| std::ostream& operator<< | ( | std::ostream & | out, | |
| const ManifoldEdgeSetTopologyContainer & | t | |||
| ) | [friend] |
Definition at line 76 of file ManifoldEdgeSetTopologyContainer.h.
| std::istream& operator>> | ( | std::istream & | in, | |
| ManifoldEdgeSetTopologyContainer & | t | |||
| ) | [friend] |
Needed to be compliant with Datas.
Definition at line 86 of file ManifoldEdgeSetTopologyContainer.h.
sofa::helper::vector< unsigned int > sofa::component::topology::ManifoldEdgeSetTopologyContainer::m_ComponentVertexArray [private] |
The array that stores for each vertex index, the connected component the vertex belongs to.
Definition at line 272 of file ManifoldEdgeSetTopologyContainer.h.
Referenced by clear(), computeConnectedComponent(), getComponentVertexArray(), getNumberConnectedComponents(), and resetConnectedComponent().
sofa::helper::vector< ConnectedComponent > sofa::component::topology::ManifoldEdgeSetTopologyContainer::m_ConnectedComponentArray [private] |
The array that stores the connected components.
Definition at line 275 of file ManifoldEdgeSetTopologyContainer.h.
Referenced by clear(), computeConnectedComponent(), getComponentIndex(), getComponentSize(), getConnectedComponentArray(), getFirstVertexIndex(), getLastVertexIndex(), getNumberConnectedComponents(), getNumberOfConnectedComponents(), isComponentClosed(), isvoid_ConnectedComponent(), and resetConnectedComponent().
1.5.7.1