#include <EdgeSetTopologyContainer.h>


Public Member Functions | |
| EdgeSetTopologyContainer () | |
| EdgeSetTopologyContainer (const sofa::helper::vector< Edge > &edges) | |
| virtual | ~EdgeSetTopologyContainer () |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| virtual bool | checkTopology () const |
| Checks if the topology is coherent. | |
| unsigned int | getNumberOfEdges () const |
| Returns the number of edges in this topology. | |
| virtual const sofa::helper::vector< Edge > & | getEdgeArray () |
| Returns the Edge array. | |
| virtual const sofa::helper::vector < sofa::helper::vector < unsigned int > > & | getEdgeVertexShellArray () |
| Returns the Edge Shell array. | |
| 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). | |
| virtual sofa::helper::vector < unsigned int > & | getEdgeVertexShellForModification (const unsigned int i) |
| Returns a non-const edge shell of the ith DOF for subsequent modification. | |
| virtual void | createEdgeSetArray () |
| Creates the EdgeSet array. | |
| virtual void | createEdgeVertexShellArray () |
| Creates the EdgeSetIndex. | |
| bool | hasEdges () const |
| bool | hasEdgeVertexShell () const |
| void | clearEdges () |
| void | clearEdgeVertexShell () |
| virtual void | clear () |
| Procedural creation methods. | |
| virtual void | addEdge (int a, int b) |
| virtual const SeqEdges & | getEdges () |
| BaseMeshTopology API. | |
| virtual const VertexEdges & | getEdgeVertexShell (PointID i) |
| Returns the edge shell of the ith DOF. | |
| virtual int | getEdgeIndex (PointID v1, PointID v2) |
| Returns the index of the edge joining vertex v1 and vertex v2; returns -1 if no edge exists. | |
Protected Member Functions | |
| virtual void | loadFromMeshLoader (sofa::component::MeshLoader *loader) |
Protected Attributes | |
| sofa::helper::vector< Edge > | m_edge |
| sofa::helper::vector < sofa::helper::vector < unsigned int > > | m_edgeVertexShell |
| the array that stores the set of edge-vertex shells, ie for each vertex gives the set of adjacent edges | |
Friends | |
| class | EdgeSetTopologyModifier |
| std::ostream & | operator<< (std::ostream &out, const EdgeSetTopologyContainer &t) |
| std::istream & | operator>> (std::istream &in, EdgeSetTopologyContainer &t) |
| Needed to be compliant with Datas. | |
Definition at line 47 of file EdgeSetTopologyContainer.h.
| sofa::component::topology::EdgeSetTopologyContainer::EdgeSetTopologyContainer | ( | ) |
Definition at line 59 of file EdgeSetTopologyContainer.cpp.
| sofa::component::topology::EdgeSetTopologyContainer::EdgeSetTopologyContainer | ( | const sofa::helper::vector< Edge > & | edges | ) |
Definition at line 63 of file EdgeSetTopologyContainer.cpp.
References m_edge, and sofa::component::topology::PointSetTopologyContainer::nbPoints.
| virtual sofa::component::topology::EdgeSetTopologyContainer::~EdgeSetTopologyContainer | ( | ) | [inline, virtual] |
Definition at line 56 of file EdgeSetTopologyContainer.h.
Reimplemented from sofa::core::componentmodel::topology::BaseMeshTopology.
Definition at line 89 of file EdgeSetTopologyContainer.cpp.
References m_edge, and sofa::component::topology::PointSetTopologyContainer::nbPoints.
| bool sofa::component::topology::EdgeSetTopologyContainer::checkTopology | ( | ) | const [virtual] |
Checks if the topology is coherent.
Check if the shell arrays are coherent
Reimplemented from sofa::component::topology::PointSetTopologyContainer.
Reimplemented in sofa::component::topology::HexahedronSetTopologyContainer, sofa::component::topology::ManifoldEdgeSetTopologyContainer, sofa::component::topology::QuadSetTopologyContainer, sofa::component::topology::TetrahedronSetTopologyContainer, and sofa::component::topology::TriangleSetTopologyContainer.
Definition at line 186 of file EdgeSetTopologyContainer.cpp.
References hasEdgeVertexShell(), m_edge, and m_edgeVertexShell.
Referenced by sofa::component::topology::EdgeSetTopologyModifier::fuseEdges(), sofa::component::topology::EdgeSetTopologyModifier::removeEdges(), sofa::component::topology::EdgeSetTopologyModifier::renumberPoints(), sofa::component::topology::EdgeSetTopologyModifier::splitEdges(), and sofa::component::topology::EdgeSetTopologyModifier::swapEdges().
| void sofa::component::topology::EdgeSetTopologyContainer::clear | ( | ) | [virtual] |
Procedural creation methods.
Reimplemented from sofa::component::topology::PointSetTopologyContainer.
Reimplemented in sofa::component::topology::HexahedronSetTopologyContainer, sofa::component::topology::ManifoldEdgeSetTopologyContainer, sofa::component::topology::QuadSetTopologyContainer, sofa::component::topology::TetrahedronSetTopologyContainer, and sofa::component::topology::TriangleSetTopologyContainer.
Definition at line 285 of file EdgeSetTopologyContainer.cpp.
References clearEdges(), and clearEdgeVertexShell().
Referenced by sofa::component::topology::Triangle2EdgeTopologicalMapping::init().
| void sofa::component::topology::EdgeSetTopologyContainer::clearEdges | ( | ) |
Definition at line 275 of file EdgeSetTopologyContainer.cpp.
References m_edge.
Referenced by clear().
| void sofa::component::topology::EdgeSetTopologyContainer::clearEdgeVertexShell | ( | ) |
Definition at line 280 of file EdgeSetTopologyContainer.cpp.
References m_edgeVertexShell.
Referenced by clear(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::createEdgeVertexShellArray(), and createEdgeVertexShellArray().
| void sofa::component::topology::EdgeSetTopologyContainer::createEdgeSetArray | ( | ) | [virtual] |
Creates the EdgeSet array.
This function must be implemented by derived classes to create a list of edges from a set of triangles or tetrahedra
Reimplemented in sofa::component::topology::HexahedronSetTopologyContainer, sofa::component::topology::QuadSetTopologyContainer, sofa::component::topology::TetrahedronSetTopologyContainer, and sofa::component::topology::TriangleSetTopologyContainer.
Definition at line 121 of file EdgeSetTopologyContainer.cpp.
Referenced by sofa::component::topology::ManifoldEdgeSetTopologyContainer::createEdgeVertexShellArray(), createEdgeVertexShellArray(), getEdgeArray(), and getEdgeIndex().
| void sofa::component::topology::EdgeSetTopologyContainer::createEdgeVertexShellArray | ( | ) | [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 in sofa::component::topology::ManifoldEdgeSetTopologyContainer.
Definition at line 96 of file EdgeSetTopologyContainer.cpp.
References clearEdgeVertexShell(), createEdgeSetArray(), sofa::component::topology::PointSetTopologyContainer::getNbPoints(), hasEdges(), hasEdgeVertexShell(), m_edge, and m_edgeVertexShell.
Referenced by getEdgeIndex(), getEdgeVertexShell(), getEdgeVertexShellArray(), getEdgeVertexShellForModification(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesProcess(), and sofa::component::topology::EdgeSetTopologyModifier::removePointsProcess().
| const sofa::helper::vector< Edge > & sofa::component::topology::EdgeSetTopologyContainer::getEdgeArray | ( | ) | [virtual] |
Returns the Edge array.
Definition at line 128 of file EdgeSetTopologyContainer.cpp.
References createEdgeSetArray(), sofa::component::topology::PointSetTopologyContainer::getNbPoints(), hasEdges(), and m_edge.
Referenced by sofa::component::forcefield::SpringEdgeDataForceField< DataTypes >::addDForce(), sofa::component::forcefield::SpringEdgeDataForceField< DataTypes >::addForce(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::computeConnectedComponent(), sofa::component::forcefield::SpringEdgeDataForceField< DataTypes >::createDefaultSprings(), sofa::component::forcefield::SpringEdgeDataForceField< DataTypes >::draw(), getEdges(), and sofa::component::topology::EdgeSetTopologyModifier::resortCuthillMckee().
| int sofa::component::topology::EdgeSetTopologyContainer::getEdgeIndex | ( | PointID | v1, | |
| PointID | v2 | |||
| ) | [virtual] |
Returns the index of the edge joining vertex v1 and vertex v2; returns -1 if no edge exists.
Definition at line 141 of file EdgeSetTopologyContainer.cpp.
References createEdgeSetArray(), createEdgeVertexShellArray(), getEdgeVertexShell(), hasEdges(), hasEdgeVertexShell(), and m_edge.
Referenced by sofa::component::topology::EdgeSetTopologyModifier::addEdgeProcess(), sofa::component::topology::HexahedronSetTopologyModifier::addHexahedronProcess(), sofa::component::topology::QuadSetTopologyModifier::addQuadProcess(), sofa::component::topology::TetrahedronSetTopologyModifier::addTetrahedronProcess(), sofa::component::topology::TriangleSetTopologyModifier::addTriangleProcess(), sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronEdgeArray(), sofa::component::topology::QuadSetTopologyContainer::createQuadEdgeArray(), sofa::component::topology::TetrahedronSetTopologyContainer::createTetrahedronEdgeArray(), and sofa::component::topology::TriangleSetTopologyContainer::createTriangleEdgeArray().
| virtual const SeqEdges& sofa::component::topology::EdgeSetTopologyContainer::getEdges | ( | ) | [inline, virtual] |
BaseMeshTopology API.
Reimplemented from sofa::core::componentmodel::topology::TopologyContainer.
Definition at line 69 of file EdgeSetTopologyContainer.h.
References getEdgeArray().
| const VertexEdges & sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShell | ( | PointID | i | ) | [virtual] |
Returns the edge shell of the ith DOF.
Definition at line 233 of file EdgeSetTopologyContainer.cpp.
References createEdgeVertexShellArray(), hasEdgeVertexShell(), and m_edgeVertexShell.
Referenced by sofa::component::topology::ManifoldEdgeSetTopologyContainer::computeConnectedComponent(), getEdgeIndex(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::getNextEdge(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::getNextVertex(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::getPreviousEdge(), and sofa::component::topology::ManifoldEdgeSetTopologyContainer::getPreviousVertex().
| const sofa::helper::vector< sofa::helper::vector< unsigned int > > & sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShellArray | ( | ) | [virtual] |
Returns the Edge Shell array.
Definition at line 220 of file EdgeSetTopologyContainer.cpp.
References createEdgeVertexShellArray(), hasEdgeVertexShell(), and m_edgeVertexShell.
Referenced by sofa::component::topology::EdgeSetTopologyModifier::renumberPointsProcess().
| sofa::helper::vector< unsigned int > & sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShellForModification | ( | const unsigned int | i | ) | [virtual] |
Returns a non-const edge shell of the ith DOF for subsequent modification.
Definition at line 252 of file EdgeSetTopologyContainer.cpp.
References createEdgeVertexShellArray(), hasEdgeVertexShell(), and m_edgeVertexShell.
Referenced by sofa::component::topology::EdgeSetTopologyModifier::addEdgeProcess().
| int sofa::component::topology::EdgeSetTopologyContainer::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 in sofa::component::topology::ManifoldEdgeSetTopologyContainer.
Definition at line 167 of file EdgeSetTopologyContainer.cpp.
References m_edge.
Referenced by sofa::component::collision::TopologicalChangeManager::incisionTriangleModel().
| unsigned int sofa::component::topology::EdgeSetTopologyContainer::getNumberOfEdges | ( | ) | const |
Returns the number of edges in this topology.
The difference to getNbEdges() is that this method does not generate the edge array if it does not exist.
Definition at line 215 of file EdgeSetTopologyContainer.cpp.
References m_edge.
Referenced by sofa::component::topology::EdgeSetTopologyModifier::addEdgeProcess(), sofa::component::topology::ManifoldEdgeSetTopologyModifier::addEdges(), sofa::component::topology::EdgeSetTopologyModifier::addEdges(), sofa::component::topology::TetrahedronSetTopologyModifier::addEdgesProcess(), sofa::component::topology::HexahedronSetTopologyModifier::addEdgesProcess(), sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronEdgeShellArray(), sofa::component::topology::QuadSetTopologyContainer::createQuadEdgeShellArray(), sofa::component::topology::TetrahedronSetTopologyContainer::createTetrahedronEdgeShellArray(), sofa::component::topology::TriangleSetTopologyContainer::createTriangleEdgeShellArray(), sofa::component::topology::EdgeSetTopologyModifier::fuseEdgesProcess(), sofa::component::topology::TriangleSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::TetrahedronSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::QuadSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::HexahedronSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::splitEdgesProcess(), and sofa::component::topology::EdgeSetTopologyModifier::swapEdgesProcess().
| bool sofa::component::topology::EdgeSetTopologyContainer::hasEdges | ( | ) | const |
Definition at line 265 of file EdgeSetTopologyContainer.cpp.
References m_edge.
Referenced by sofa::component::topology::TriangleSetTopologyModifier::addEdgesProcess(), sofa::component::topology::QuadSetTopologyModifier::addEdgesProcess(), sofa::component::topology::QuadSetTopologyModifier::addQuadProcess(), sofa::component::topology::TriangleSetTopologyModifier::addTriangleProcess(), sofa::component::topology::TriangleSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::TetrahedronSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::QuadSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::HexahedronSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::createEdgeVertexShellArray(), createEdgeVertexShellArray(), sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronEdgeArray(), sofa::component::topology::QuadSetTopologyContainer::createQuadEdgeArray(), sofa::component::topology::QuadSetTopologyContainer::createQuadEdgeShellArray(), sofa::component::topology::TetrahedronSetTopologyContainer::createTetrahedronEdgeArray(), sofa::component::topology::TriangleSetTopologyContainer::createTriangleEdgeArray(), sofa::component::topology::TriangleSetTopologyContainer::createTriangleEdgeShellArray(), sofa::component::topology::EdgeSetTopologyModifier::fuseEdgesProcess(), getEdgeArray(), getEdgeIndex(), sofa::component::topology::TetrahedronSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::HexahedronSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::HexahedronSetTopologyModifier::removeHexahedraProcess(), sofa::component::topology::EdgeSetTopologyModifier::removePointsProcess(), sofa::component::topology::QuadSetTopologyModifier::removeQuadsProcess(), sofa::component::topology::TetrahedronSetTopologyModifier::removeTetrahedraProcess(), sofa::component::topology::TriangleSetTopologyModifier::removeTrianglesProcess(), sofa::component::topology::EdgeSetTopologyModifier::renumberPointsProcess(), sofa::component::topology::EdgeSetTopologyModifier::splitEdgesProcess(), and sofa::component::topology::EdgeSetTopologyModifier::swapEdgesProcess().
| bool sofa::component::topology::EdgeSetTopologyContainer::hasEdgeVertexShell | ( | ) | const |
Definition at line 270 of file EdgeSetTopologyContainer.cpp.
References m_edgeVertexShell.
Referenced by sofa::component::topology::EdgeSetTopologyModifier::addEdgeProcess(), sofa::component::topology::EdgeSetTopologyModifier::addPointsProcess(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::checkTopology(), checkTopology(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::createEdgeVertexShellArray(), createEdgeVertexShellArray(), getEdgeIndex(), getEdgeVertexShell(), getEdgeVertexShellArray(), getEdgeVertexShellForModification(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::removePointsProcess(), and sofa::component::topology::EdgeSetTopologyModifier::renumberPointsProcess().
| void sofa::component::topology::EdgeSetTopologyContainer::init | ( | void | ) | [virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::component::topology::PointSetTopologyContainer.
Reimplemented in sofa::component::topology::HexahedronSetTopologyContainer, sofa::component::topology::ManifoldEdgeSetTopologyContainer, sofa::component::topology::QuadSetTopologyContainer, sofa::component::topology::TetrahedronSetTopologyContainer, and sofa::component::topology::TriangleSetTopologyContainer.
Definition at line 77 of file EdgeSetTopologyContainer.cpp.
| void sofa::component::topology::EdgeSetTopologyContainer::loadFromMeshLoader | ( | sofa::component::MeshLoader * | loader | ) | [protected, virtual] |
Reimplemented from sofa::component::topology::PointSetTopologyContainer.
Reimplemented in sofa::component::topology::HexahedronSetTopologyContainer, sofa::component::topology::QuadSetTopologyContainer, sofa::component::topology::TetrahedronSetTopologyContainer, and sofa::component::topology::TriangleSetTopologyContainer.
Definition at line 82 of file EdgeSetTopologyContainer.cpp.
References sofa::component::MeshLoader::getEdges(), and m_edge.
friend class EdgeSetTopologyModifier [friend] |
Definition at line 49 of file EdgeSetTopologyContainer.h.
| std::ostream& operator<< | ( | std::ostream & | out, | |
| const EdgeSetTopologyContainer & | t | |||
| ) | [friend] |
Definition at line 114 of file EdgeSetTopologyContainer.h.
| std::istream& operator>> | ( | std::istream & | in, | |
| EdgeSetTopologyContainer & | t | |||
| ) | [friend] |
Definition at line 165 of file EdgeSetTopologyContainer.h.
Referenced by addEdge(), sofa::component::topology::EdgeSetTopologyModifier::addEdgeProcess(), checkTopology(), clearEdges(), sofa::component::topology::TriangleSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::TetrahedronSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::QuadSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::HexahedronSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::createEdgeVertexShellArray(), createEdgeVertexShellArray(), EdgeSetTopologyContainer(), getEdgeArray(), getEdgeIndex(), getNumberConnectedComponents(), getNumberOfEdges(), hasEdges(), loadFromMeshLoader(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::removePointsProcess(), and sofa::component::topology::EdgeSetTopologyModifier::renumberPointsProcess().
sofa::helper::vector< sofa::helper::vector< unsigned int > > sofa::component::topology::EdgeSetTopologyContainer::m_edgeVertexShell [protected] |
the array that stores the set of edge-vertex shells, ie for each vertex gives the set of adjacent edges
Definition at line 168 of file EdgeSetTopologyContainer.h.
Referenced by sofa::component::topology::EdgeSetTopologyModifier::addPointsProcess(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::checkTopology(), checkTopology(), clearEdgeVertexShell(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::createEdgeVertexShellArray(), createEdgeVertexShellArray(), getEdgeVertexShell(), getEdgeVertexShellArray(), getEdgeVertexShellForModification(), hasEdgeVertexShell(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::removePointsProcess(), and sofa::component::topology::EdgeSetTopologyModifier::renumberPointsProcess().
1.5.7.1