#include <QuadSetTopologyModifier.h>


Public Member Functions | |
| QuadSetTopologyModifier () | |
| virtual | ~QuadSetTopologyModifier () |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| void | addQuadsWarning (const unsigned int nQuads, const sofa::helper::vector< Quad > &quadsList, const sofa::helper::vector< unsigned int > &quadsIndexList) |
| Sends a message to warn that some quads were added in this topology. | |
| void | addQuadsWarning (const unsigned int nQuads, const sofa::helper::vector< Quad > &quadsList, const sofa::helper::vector< unsigned int > &quadsIndexList, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &ancestors, const sofa::helper::vector< sofa::helper::vector< double > > &baryCoefs) |
| Sends a message to warn that some quads were added in this topology. | |
| void | addQuadProcess (Quad e) |
| Add a quad. | |
| virtual void | addQuadsProcess (const sofa::helper::vector< Quad > &quads) |
| Actually Add some quads to this topology. | |
| virtual void | removeQuadsWarning (sofa::helper::vector< unsigned int > &quads) |
| Sends a message to warn that some quads are about to be deleted. | |
| virtual void | removeQuadsProcess (const sofa::helper::vector< unsigned int > &indices, const bool removeIsolatedEdges=false, const bool removeIsolatedPoints=false) |
| Remove a subset of quads. | |
| void | addEdgesProcess (const sofa::helper::vector< Edge > &edges) |
| Add some edges to this topology. | |
| virtual void | removeEdgesProcess (const sofa::helper::vector< unsigned int > &indices, const bool removeIsolatedItems=false) |
| Remove a subset of edges. | |
| virtual void | addPointsProcess (const unsigned int nPoints) |
| Add some points to this topology. | |
| virtual void | removePointsProcess (sofa::helper::vector< unsigned int > &indices, const bool removeDOF=true) |
| Remove a subset of points. | |
| virtual void | renumberPointsProcess (const sofa::helper::vector< unsigned int > &index, const sofa::helper::vector< unsigned int > &inv_index, const bool renumberDOF=true) |
| Reorder this topology. | |
| virtual void | removeQuads (sofa::helper::vector< unsigned int > &quads, const bool removeIsolatedEdges, const bool removeIsolatedPoints) |
| Remove a set of quads. | |
| virtual void | removeItems (sofa::helper::vector< unsigned int > &items) |
| Generic method to remove a list of items. | |
| virtual void | renumberPoints (const sofa::helper::vector< unsigned int > &index, const sofa::helper::vector< unsigned int > &inv_index) |
| Generic method for points renumbering. | |
Private Attributes | |
| QuadSetTopologyContainer * | m_container |
Definition at line 51 of file QuadSetTopologyModifier.h.
| sofa::component::topology::QuadSetTopologyModifier::QuadSetTopologyModifier | ( | ) | [inline] |
Definition at line 54 of file QuadSetTopologyModifier.h.
| virtual sofa::component::topology::QuadSetTopologyModifier::~QuadSetTopologyModifier | ( | ) | [inline, virtual] |
Definition at line 58 of file QuadSetTopologyModifier.h.
| void sofa::component::topology::QuadSetTopologyModifier::addEdgesProcess | ( | const sofa::helper::vector< Edge > & | edges | ) | [virtual] |
Add some edges to this topology.
Reimplemented from sofa::component::topology::EdgeSetTopologyModifier.
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 296 of file QuadSetTopologyModifier.cpp.
References sofa::component::topology::QuadSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::EdgeSetTopologyContainer::hasEdges(), sofa::component::topology::QuadSetTopologyContainer::hasQuadEdgeShell(), m_container, and sofa::component::topology::QuadSetTopologyContainer::m_quadEdgeShell.
Referenced by addQuadProcess().
| void sofa::component::topology::QuadSetTopologyModifier::addPointsProcess | ( | const unsigned int | nPoints | ) | [virtual] |
Add some points to this topology.
Reimplemented from sofa::component::topology::EdgeSetTopologyModifier.
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 286 of file QuadSetTopologyModifier.cpp.
References sofa::component::topology::PointSetTopologyContainer::getNbPoints(), sofa::component::topology::QuadSetTopologyContainer::hasQuadVertexShell(), m_container, and sofa::component::topology::QuadSetTopologyContainer::m_quadVertexShell.
Referenced by sofa::component::topology::Edge2QuadTopologicalMapping::updateTopologicalMapping().
| void sofa::component::topology::QuadSetTopologyModifier::addQuadProcess | ( | Quad | e | ) |
Add a quad.
Definition at line 55 of file QuadSetTopologyModifier.cpp.
References addEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::addEdgesWarning(), sofa::component::topology::EdgeSetTopologyContainer::getEdgeIndex(), sofa::component::topology::QuadSetTopologyContainer::getNumberOfQuads(), sofa::component::topology::QuadSetTopologyContainer::getQuadIndex(), sofa::component::topology::QuadSetTopologyContainer::getQuadVertexShellForModification(), sofa::component::topology::EdgeSetTopologyContainer::hasEdges(), sofa::component::topology::QuadSetTopologyContainer::hasQuadEdges(), sofa::component::topology::QuadSetTopologyContainer::hasQuadEdgeShell(), sofa::component::topology::QuadSetTopologyContainer::hasQuadVertexShell(), m_container, sofa::component::topology::QuadSetTopologyContainer::m_quad, sofa::component::topology::QuadSetTopologyContainer::m_quadEdge, and sofa::component::topology::QuadSetTopologyContainer::m_quadEdgeShell.
Referenced by addQuadsProcess(), sofa::component::topology::Hexa2QuadTopologicalMapping::init(), and sofa::component::topology::Edge2QuadTopologicalMapping::init().
| void sofa::component::topology::QuadSetTopologyModifier::addQuadsProcess | ( | const sofa::helper::vector< Quad > & | quads | ) | [virtual] |
Actually Add some quads to this topology.
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 131 of file QuadSetTopologyModifier.cpp.
References addQuadProcess(), m_container, and sofa::component::topology::QuadSetTopologyContainer::m_quad.
Referenced by sofa::component::topology::Hexa2QuadTopologicalMapping::updateTopologicalMapping(), and sofa::component::topology::Edge2QuadTopologicalMapping::updateTopologicalMapping().
| void sofa::component::topology::QuadSetTopologyModifier::addQuadsWarning | ( | const unsigned int | nQuads, | |
| const sofa::helper::vector< Quad > & | quadsList, | |||
| const sofa::helper::vector< unsigned int > & | quadsIndexList, | |||
| const sofa::helper::vector< sofa::helper::vector< unsigned int > > & | ancestors, | |||
| const sofa::helper::vector< sofa::helper::vector< double > > & | baryCoefs | |||
| ) |
Sends a message to warn that some quads were added in this topology.
Definition at line 152 of file QuadSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange().
| void sofa::component::topology::QuadSetTopologyModifier::addQuadsWarning | ( | const unsigned int | nQuads, | |
| const sofa::helper::vector< Quad > & | quadsList, | |||
| const sofa::helper::vector< unsigned int > & | quadsIndexList | |||
| ) |
Sends a message to warn that some quads were added in this topology.
Definition at line 142 of file QuadSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange().
Referenced by sofa::component::topology::HexahedronSetTopologyModifier::addHexahedronProcess(), sofa::component::topology::Hexa2QuadTopologicalMapping::updateTopologicalMapping(), and sofa::component::topology::Edge2QuadTopologicalMapping::updateTopologicalMapping().
| void sofa::component::topology::QuadSetTopologyModifier::init | ( | void | ) | [virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::component::topology::EdgeSetTopologyModifier.
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 48 of file QuadSetTopologyModifier.cpp.
References sofa::component::topology::EdgeSetTopologyModifier::init().
| void sofa::component::topology::QuadSetTopologyModifier::removeEdgesProcess | ( | const sofa::helper::vector< unsigned int > & | indices, | |
| const bool | removeIsolatedItems = false | |||
| ) | [virtual] |
Remove a subset of edges.
Important : some structures might need to be warned BEFORE the points are actually deleted, so always use method removeEdgesWarning before calling removeEdgesProcess.
| removeIsolatedItems | if true isolated vertices are also removed Important : parameter indices is not const because it is actually sorted from the highest index to the lowest one. |
Reimplemented from sofa::component::topology::EdgeSetTopologyModifier.
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 347 of file QuadSetTopologyModifier.cpp.
References sofa::component::topology::QuadSetTopologyContainer::createQuadEdgeShellArray(), sofa::component::topology::QuadSetTopologyContainer::getEdgeIndexInQuad(), sofa::component::topology::EdgeSetTopologyContainer::getNumberOfEdges(), sofa::component::topology::QuadSetTopologyContainer::hasQuadEdges(), sofa::component::topology::QuadSetTopologyContainer::hasQuadEdgeShell(), m_container, sofa::component::topology::QuadSetTopologyContainer::m_quadEdge, and sofa::component::topology::QuadSetTopologyContainer::m_quadEdgeShell.
Referenced by removeQuadsProcess().
| void sofa::component::topology::QuadSetTopologyModifier::removeItems | ( | sofa::helper::vector< unsigned int > & | items | ) | [virtual] |
Generic method to remove a list of items.
Reimplemented from sofa::component::topology::EdgeSetTopologyModifier.
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 422 of file QuadSetTopologyModifier.cpp.
References removeQuads().
| void sofa::component::topology::QuadSetTopologyModifier::removePointsProcess | ( | sofa::helper::vector< unsigned int > & | indices, | |
| const bool | removeDOF = true | |||
| ) | [virtual] |
Remove a subset of points.
Elements corresponding to these points are removed from the mechanical object's state vectors.
Important : some structures might need to be warned BEFORE the points are actually deleted, so always use method removePointsWarning before calling removePointsProcess.
Reimplemented from sofa::component::topology::EdgeSetTopologyModifier.
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 310 of file QuadSetTopologyModifier.cpp.
References sofa::component::topology::QuadSetTopologyContainer::createQuadVertexShellArray(), sofa::component::topology::PointSetTopologyContainer::getNbPoints(), sofa::component::topology::QuadSetTopologyContainer::hasQuads(), sofa::component::topology::QuadSetTopologyContainer::hasQuadVertexShell(), m_container, sofa::component::topology::QuadSetTopologyContainer::m_quad, and sofa::component::topology::QuadSetTopologyContainer::m_quadVertexShell.
Referenced by removeQuadsProcess(), and sofa::component::topology::Hexa2QuadTopologicalMapping::updateTopologicalMapping().
| void sofa::component::topology::QuadSetTopologyModifier::removeQuads | ( | sofa::helper::vector< unsigned int > & | quads, | |
| const bool | removeIsolatedEdges, | |||
| const bool | removeIsolatedPoints | |||
| ) | [virtual] |
Remove a set of quads.
| quads | an array of quad indices to be removed (note that the array is not const since it needs to be sorted) | |
| removeIsolatedEdges | if true isolated edges are also removed | |
| removeIsolatedPoints | if true isolated vertices are also removed |
add the topological changes in the queue
Definition at line 408 of file QuadSetTopologyModifier.cpp.
References sofa::component::topology::QuadSetTopologyContainer::checkTopology(), m_container, sofa::component::topology::PointSetTopologyModifier::propagateTopologicalChanges(), removeQuadsProcess(), and removeQuadsWarning().
Referenced by removeItems(), sofa::component::topology::Hexa2QuadTopologicalMapping::updateTopologicalMapping(), and sofa::component::topology::Edge2QuadTopologicalMapping::updateTopologicalMapping().
| void sofa::component::topology::QuadSetTopologyModifier::removeQuadsProcess | ( | const sofa::helper::vector< unsigned int > & | indices, | |
| const bool | removeIsolatedEdges = false, |
|||
| const bool | removeIsolatedPoints = false | |||
| ) | [virtual] |
Remove a subset of quads.
Eventually remove isolated edges and vertices
Important : some structures might need to be warned BEFORE the points are actually deleted, so always use method removeEdgesWarning before calling removeEdgesProcess.
| removeIsolatedEdges | if true isolated edges are also removed | |
| removeIsolatedPoints | if true isolated vertices are also removed |
warn that edges will be deleted
actually remove edges without looking for isolated vertices
propagate to all components
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 175 of file QuadSetTopologyModifier.cpp.
References sofa::component::topology::QuadSetTopologyContainer::createQuadEdgeArray(), sofa::component::topology::QuadSetTopologyContainer::createQuadEdgeShellArray(), sofa::component::topology::QuadSetTopologyContainer::createQuadVertexShellArray(), sofa::component::topology::QuadSetTopologyContainer::getNumberOfQuads(), sofa::component::topology::EdgeSetTopologyContainer::hasEdges(), sofa::component::topology::QuadSetTopologyContainer::hasQuadEdges(), sofa::component::topology::QuadSetTopologyContainer::hasQuadEdgeShell(), sofa::component::topology::QuadSetTopologyContainer::hasQuads(), sofa::component::topology::QuadSetTopologyContainer::hasQuadVertexShell(), m_container, sofa::component::topology::QuadSetTopologyContainer::m_quad, sofa::component::topology::QuadSetTopologyContainer::m_quadEdge, sofa::component::topology::QuadSetTopologyContainer::m_quadEdgeShell, sofa::component::topology::QuadSetTopologyContainer::m_quadVertexShell, sofa::component::topology::PointSetTopologyModifier::propagateTopologicalChanges(), removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesWarning(), removePointsProcess(), and sofa::component::topology::PointSetTopologyModifier::removePointsWarning().
Referenced by removeQuads().
| void sofa::component::topology::QuadSetTopologyModifier::removeQuadsWarning | ( | sofa::helper::vector< unsigned int > & | quads | ) | [virtual] |
Sends a message to warn that some quads are about to be deleted.
sort vertices to remove in a descendent order
Definition at line 164 of file QuadSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange().
Referenced by sofa::component::topology::HexahedronSetTopologyModifier::removeHexahedraProcess(), and removeQuads().
| void sofa::component::topology::QuadSetTopologyModifier::renumberPoints | ( | const sofa::helper::vector< unsigned int > & | index, | |
| const sofa::helper::vector< unsigned int > & | inv_index | |||
| ) | [virtual] |
Generic method for points renumbering.
add the topological changes in the queue
Reimplemented from sofa::component::topology::EdgeSetTopologyModifier.
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 427 of file QuadSetTopologyModifier.cpp.
References sofa::component::topology::QuadSetTopologyContainer::checkTopology(), m_container, sofa::component::topology::PointSetTopologyModifier::propagateTopologicalChanges(), renumberPointsProcess(), and sofa::component::topology::PointSetTopologyModifier::renumberPointsWarning().
| void sofa::component::topology::QuadSetTopologyModifier::renumberPointsProcess | ( | const sofa::helper::vector< unsigned int > & | index, | |
| const sofa::helper::vector< unsigned int > & | inv_index, | |||
| const bool | renumberDOF = true | |||
| ) | [virtual] |
Reorder this topology.
Important : the points are actually renumbered in the mechanical object's state vectors iff (renumberDOF == true)
Reimplemented from sofa::component::topology::EdgeSetTopologyModifier.
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 380 of file QuadSetTopologyModifier.cpp.
References sofa::component::topology::QuadSetTopologyContainer::hasQuads(), sofa::component::topology::QuadSetTopologyContainer::hasQuadVertexShell(), m_container, sofa::component::topology::QuadSetTopologyContainer::m_quad, and sofa::component::topology::QuadSetTopologyContainer::m_quadVertexShell.
Referenced by renumberPoints(), sofa::component::topology::Hexa2QuadTopologicalMapping::updateTopologicalMapping(), and sofa::component::topology::Edge2QuadTopologicalMapping::updateTopologicalMapping().
Reimplemented from sofa::component::topology::EdgeSetTopologyModifier.
Reimplemented in sofa::component::topology::HexahedronSetTopologyModifier.
Definition at line 175 of file QuadSetTopologyModifier.h.
Referenced by addEdgesProcess(), addPointsProcess(), addQuadProcess(), addQuadsProcess(), removeEdgesProcess(), removePointsProcess(), removeQuads(), removeQuadsProcess(), renumberPoints(), and renumberPointsProcess().
1.5.7.1