#include <PointSetTopologyModifier.h>


Public Member Functions | |
| PointSetTopologyModifier () | |
| virtual | ~PointSetTopologyModifier () |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| virtual void | swapPoints (const int i1, const int i2) |
| Swap points i1 and i2. | |
| void | addPointsWarning (const unsigned int nPoints, const bool addDOF=true) |
| Sends a message to warn that some points were added in this topology. | |
| void | addPointsWarning (const unsigned int nPoints, const sofa::helper::vector< sofa::helper::vector< unsigned int > > &ancestors, const sofa::helper::vector< sofa::helper::vector< double > > &coefs, const bool addDOF=true) |
| Sends a message to warn that some points were added in this topology. | |
| virtual void | addPointsProcess (const unsigned int nPoints) |
| Add some points to this topology. | |
| void | removePointsWarning (sofa::helper::vector< unsigned int > &indices, const bool removeDOF=true) |
| Sends a message to warn that some points are about to be deleted. | |
| virtual void | removePointsProcess (const sofa::helper::vector< unsigned int > &indices, const bool removeDOF=true) |
| Remove a subset of points. | |
| void | renumberPointsWarning (const sofa::helper::vector< unsigned int > &index, const sofa::helper::vector< unsigned int > &inv_index, const bool renumberDOF=true) |
| Sends a message to warn that points are about to be reordered. | |
| virtual void | renumberPointsProcess (const sofa::helper::vector< unsigned int > &index, const sofa::helper::vector< unsigned int > &, const bool renumberDOF=true) |
| Reorder this topology. | |
| void | propagateTopologicalChanges () |
| Called by a topology to warn specific topologies linked to it that TopologyChange objects happened. | |
| void | propagateStateChanges () |
| Called by a topology to warn the Mechanical Object component that points have been added or will be removed. | |
| void | notifyEndingEvent () |
| the end for the current sequence of topological change events. | |
| virtual void | removeItems (sofa::helper::vector< unsigned int > &) |
| Generic method to remove a list of items. | |
| virtual void | renumberPoints (const sofa::helper::vector< unsigned int > &, const sofa::helper::vector< unsigned int > &) |
| Generic method for points renumbering. | |
Private Attributes | |
| PointSetTopologyContainer * | m_container |
Definition at line 47 of file PointSetTopologyModifier.h.
| sofa::component::topology::PointSetTopologyModifier::PointSetTopologyModifier | ( | ) | [inline] |
Definition at line 50 of file PointSetTopologyModifier.h.
| virtual sofa::component::topology::PointSetTopologyModifier::~PointSetTopologyModifier | ( | ) | [inline, virtual] |
Definition at line 54 of file PointSetTopologyModifier.h.
| void sofa::component::topology::PointSetTopologyModifier::addPointsProcess | ( | const unsigned int | nPoints | ) | [virtual] |
Add some points to this topology.
Reimplemented in sofa::component::topology::EdgeSetTopologyModifier, sofa::component::topology::HexahedronSetTopologyModifier, sofa::component::topology::QuadSetTopologyModifier, sofa::component::topology::TetrahedronSetTopologyModifier, and sofa::component::topology::TriangleSetTopologyModifier.
Definition at line 67 of file PointSetTopologyModifier.cpp.
References sofa::component::topology::PointSetTopologyContainer::addPoints(), and m_container.
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin().
| void sofa::component::topology::PointSetTopologyModifier::addPointsWarning | ( | const unsigned int | nPoints, | |
| const sofa::helper::vector< sofa::helper::vector< unsigned int > > & | ancestors, | |||
| const sofa::helper::vector< sofa::helper::vector< double > > & | coefs, | |||
| const bool | addDOF = true | |||
| ) |
Sends a message to warn that some points were added in this topology.
Definition at line 87 of file PointSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addStateChange(), sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange(), and propagateStateChanges().
| void sofa::component::topology::PointSetTopologyModifier::addPointsWarning | ( | const unsigned int | nPoints, | |
| const bool | addDOF = true | |||
| ) |
Sends a message to warn that some points were added in this topology.
Definition at line 72 of file PointSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addStateChange(), sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange(), and propagateStateChanges().
Referenced by sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongEdge(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongLinesList(), sofa::component::topology::TriangleSetTopologyAlgorithms< DataTypes >::InciseAlongPointsList(), sofa::component::topology::EdgeSetTopologyModifier::splitEdgesProcess(), sofa::component::topology::Triangle2EdgeTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Quad2TriangleTopologicalMapping::updateTopologicalMapping(), and sofa::component::topology::Edge2QuadTopologicalMapping::updateTopologicalMapping().
| void sofa::component::topology::PointSetTopologyModifier::init | ( | void | ) | [virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::core::componentmodel::topology::TopologyModifier.
Reimplemented in sofa::component::topology::EdgeSetTopologyModifier, sofa::component::topology::HexahedronSetTopologyModifier, sofa::component::topology::ManifoldEdgeSetTopologyModifier, sofa::component::topology::QuadSetTopologyModifier, sofa::component::topology::TetrahedronSetTopologyModifier, and sofa::component::topology::TriangleSetTopologyModifier.
Definition at line 49 of file PointSetTopologyModifier.cpp.
References sofa::component::init().
Referenced by sofa::component::topology::EdgeSetTopologyModifier::init().
| void sofa::component::topology::PointSetTopologyModifier::notifyEndingEvent | ( | ) | [virtual] |
the end for the current sequence of topological change events.
Reimplemented from sofa::core::componentmodel::topology::TopologyModifier.
Definition at line 178 of file PointSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyContainer::addTopologyChange(), and m_container.
Referenced by sofa::component::collision::TopologicalChangeManager::incisionTriangleSetTopology(), sofa::component::topology::Triangle2EdgeTopologicalMapping::init(), sofa::component::topology::Tetra2TriangleTopologicalMapping::init(), sofa::component::topology::Quad2TriangleTopologicalMapping::init(), sofa::component::topology::Hexa2QuadTopologicalMapping::init(), sofa::component::topology::Edge2QuadTopologicalMapping::init(), sofa::component::topology::Triangle2EdgeTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Tetra2TriangleTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Quad2TriangleTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Hexa2QuadTopologicalMapping::updateTopologicalMapping(), and sofa::component::topology::Edge2QuadTopologicalMapping::updateTopologicalMapping().
| void sofa::component::topology::PointSetTopologyModifier::propagateStateChanges | ( | ) | [virtual] |
Called by a topology to warn the Mechanical Object component that points have been added or will be removed.
StateChangeList should contain all TopologyChange objects corresponding to vertex changes in this topology that just happened (in the case of creation) or are about to happen (in the case of destruction) since last call to propagateTopologicalChanges.
lastChange()
Reimplemented from sofa::core::componentmodel::topology::TopologyModifier.
Definition at line 169 of file PointSetTopologyModifier.cpp.
References sofa::core::objectmodel::BaseContext::executeVisitor(), sofa::core::objectmodel::BaseObject::getContext(), m_container, and sofa::core::componentmodel::topology::TopologyContainer::resetStateChangeList().
Referenced by addPointsWarning(), removePointsProcess(), renumberPointsProcess(), and swapPoints().
| void sofa::component::topology::PointSetTopologyModifier::propagateTopologicalChanges | ( | ) | [virtual] |
Called by a topology to warn specific topologies linked to it that TopologyChange objects happened.
ChangeList should contain all TopologyChange objects corresponding to changes in this topology that just happened (in the case of creation) or are about to happen (in the case of destruction) since last call to propagateTopologicalChanges.
lastChange()
Reimplemented from sofa::core::componentmodel::topology::TopologyModifier.
Definition at line 160 of file PointSetTopologyModifier.cpp.
References sofa::core::objectmodel::BaseContext::executeVisitor(), sofa::core::objectmodel::BaseObject::getContext(), m_container, and sofa::core::componentmodel::topology::TopologyContainer::resetTopologyChangeList().
Referenced by sofa::component::topology::ManifoldEdgeSetTopologyModifier::addEdges(), sofa::component::topology::EdgeSetTopologyModifier::addEdges(), sofa::component::ParticleSource< TDataTypes >::animateBegin(), sofa::component::ParticleSink< TDataTypes >::animateBegin(), sofa::component::topology::EdgeSetTopologyModifier::fuseEdgesProcess(), sofa::component::collision::TopologicalChangeManager::incisionTriangleSetTopology(), sofa::component::topology::ManifoldEdgeSetTopologyModifier::removeEdges(), sofa::component::topology::EdgeSetTopologyModifier::removeEdges(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::HexahedronSetTopologyModifier::removeHexahedra(), sofa::component::topology::HexahedronSetTopologyModifier::removeHexahedraProcess(), sofa::component::topology::QuadSetTopologyModifier::removeQuads(), sofa::component::topology::QuadSetTopologyModifier::removeQuadsProcess(), sofa::component::topology::TetrahedronSetTopologyModifier::removeTetrahedra(), sofa::component::topology::TetrahedronSetTopologyModifier::removeTetrahedraProcess(), sofa::component::topology::TriangleSetTopologyModifier::removeTriangles(), sofa::component::topology::TriangleSetTopologyModifier::removeTrianglesProcess(), sofa::component::topology::TriangleSetTopologyModifier::renumberPoints(), sofa::component::topology::TetrahedronSetTopologyModifier::renumberPoints(), sofa::component::topology::QuadSetTopologyModifier::renumberPoints(), sofa::component::topology::ManifoldEdgeSetTopologyModifier::renumberPoints(), sofa::component::topology::HexahedronSetTopologyModifier::renumberPoints(), sofa::component::topology::EdgeSetTopologyModifier::renumberPoints(), sofa::component::topology::EdgeSetTopologyModifier::splitEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::swapEdgesProcess(), sofa::component::topology::Triangle2EdgeTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Tetra2TriangleTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Quad2TriangleTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Hexa2QuadTopologicalMapping::updateTopologicalMapping(), and sofa::component::topology::Edge2QuadTopologicalMapping::updateTopologicalMapping().
| virtual void sofa::component::topology::PointSetTopologyModifier::removeItems | ( | sofa::helper::vector< unsigned int > & | ) | [inline, virtual] |
Generic method to remove a list of items.
Reimplemented from sofa::core::componentmodel::topology::TopologyModifier.
Reimplemented in sofa::component::topology::EdgeSetTopologyModifier, sofa::component::topology::HexahedronSetTopologyModifier, sofa::component::topology::ManifoldEdgeSetTopologyModifier, sofa::component::topology::QuadSetTopologyModifier, sofa::component::topology::TetrahedronSetTopologyModifier, and sofa::component::topology::TriangleSetTopologyModifier.
Definition at line 154 of file PointSetTopologyModifier.h.
| void sofa::component::topology::PointSetTopologyModifier::removePointsProcess | ( | const 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.
| indices | is not const because it is actually sorted from the highest index to the lowest one. | |
| removeDOF | if true the points are actually deleted from the mechanical object's state vectors |
Definition at line 123 of file PointSetTopologyModifier.cpp.
References m_container, propagateStateChanges(), and sofa::component::topology::PointSetTopologyContainer::removePoints().
Referenced by sofa::component::ParticleSink< TDataTypes >::animateBegin().
| void sofa::component::topology::PointSetTopologyModifier::removePointsWarning | ( | sofa::helper::vector< unsigned int > & | indices, | |
| const bool | removeDOF = true | |||
| ) |
Sends a message to warn that some points are about to be deleted.
Definition at line 105 of file PointSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addStateChange(), and sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange().
Referenced by sofa::component::ParticleSink< TDataTypes >::animateBegin(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::HexahedronSetTopologyModifier::removeHexahedraProcess(), sofa::component::topology::QuadSetTopologyModifier::removeQuadsProcess(), sofa::component::topology::TetrahedronSetTopologyModifier::removeTetrahedraProcess(), sofa::component::topology::TriangleSetTopologyModifier::removeTrianglesProcess(), sofa::component::topology::Triangle2EdgeTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Tetra2TriangleTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Quad2TriangleTopologicalMapping::updateTopologicalMapping(), and sofa::component::topology::Hexa2QuadTopologicalMapping::updateTopologicalMapping().
| virtual void sofa::component::topology::PointSetTopologyModifier::renumberPoints | ( | const sofa::helper::vector< unsigned int > & | , | |
| const sofa::helper::vector< unsigned int > & | ||||
| ) | [inline, virtual] |
Generic method for points renumbering.
Reimplemented in sofa::component::topology::EdgeSetTopologyModifier, sofa::component::topology::HexahedronSetTopologyModifier, sofa::component::topology::ManifoldEdgeSetTopologyModifier, sofa::component::topology::QuadSetTopologyModifier, sofa::component::topology::TetrahedronSetTopologyModifier, and sofa::component::topology::TriangleSetTopologyModifier.
Definition at line 159 of file PointSetTopologyModifier.h.
Referenced by sofa::component::container::SpatialGridContainer< DataTypes >::sortPoints().
| void sofa::component::topology::PointSetTopologyModifier::renumberPointsProcess | ( | const sofa::helper::vector< unsigned int > & | index, | |
| const sofa::helper::vector< unsigned int > & | , | |||
| 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 in sofa::component::topology::EdgeSetTopologyModifier, sofa::component::topology::HexahedronSetTopologyModifier, sofa::component::topology::QuadSetTopologyModifier, sofa::component::topology::TetrahedronSetTopologyModifier, and sofa::component::topology::TriangleSetTopologyModifier.
Definition at line 150 of file PointSetTopologyModifier.cpp.
References propagateStateChanges().
| void sofa::component::topology::PointSetTopologyModifier::renumberPointsWarning | ( | const sofa::helper::vector< unsigned int > & | index, | |
| const sofa::helper::vector< unsigned int > & | inv_index, | |||
| const bool | renumberDOF = true | |||
| ) |
Sends a message to warn that points are about to be reordered.
Definition at line 134 of file PointSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addStateChange(), and sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange().
Referenced by sofa::component::topology::TriangleSetTopologyModifier::renumberPoints(), sofa::component::topology::TetrahedronSetTopologyModifier::renumberPoints(), sofa::component::topology::QuadSetTopologyModifier::renumberPoints(), sofa::component::topology::ManifoldEdgeSetTopologyModifier::renumberPoints(), sofa::component::topology::HexahedronSetTopologyModifier::renumberPoints(), sofa::component::topology::EdgeSetTopologyModifier::renumberPoints(), sofa::component::topology::Triangle2EdgeTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Tetra2TriangleTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Quad2TriangleTopologicalMapping::updateTopologicalMapping(), sofa::component::topology::Hexa2QuadTopologicalMapping::updateTopologicalMapping(), and sofa::component::topology::Edge2QuadTopologicalMapping::updateTopologicalMapping().
| void sofa::component::topology::PointSetTopologyModifier::swapPoints | ( | const int | i1, | |
| const int | i2 | |||
| ) | [virtual] |
Swap points i1 and i2.
Definition at line 56 of file PointSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addStateChange(), sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange(), and propagateStateChanges().
PointSetTopologyContainer* sofa::component::topology::PointSetTopologyModifier::m_container [private] |
Reimplemented in sofa::component::topology::EdgeSetTopologyModifier, sofa::component::topology::HexahedronSetTopologyModifier, sofa::component::topology::ManifoldEdgeSetTopologyModifier, sofa::component::topology::QuadSetTopologyModifier, sofa::component::topology::TetrahedronSetTopologyModifier, and sofa::component::topology::TriangleSetTopologyModifier.
Definition at line 164 of file PointSetTopologyModifier.h.
Referenced by addPointsProcess(), notifyEndingEvent(), propagateStateChanges(), propagateTopologicalChanges(), and removePointsProcess().
1.5.7.1