#include <HexahedronSetTopologyModifier.h>


Public Member Functions | |
| HexahedronSetTopologyModifier () | |
| virtual | ~HexahedronSetTopologyModifier () |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| void | addHexahedraWarning (const unsigned int nHexahedra, const sofa::helper::vector< Hexahedron > &hexahedraList, const sofa::helper::vector< unsigned int > &hexahedraIndexList) |
| Sends a message to warn that some hexahedra were added in this topology. | |
| void | addHexahedraWarning (const unsigned int nHexahedra, const sofa::helper::vector< Hexahedron > &hexahedraList, const sofa::helper::vector< unsigned int > &hexahedraIndexList, 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 hexahedra were added in this topology. | |
| void | addHexahedronProcess (Hexahedron e) |
| Add a hexahedron. | |
| virtual void | addHexahedraProcess (const sofa::helper::vector< Hexahedron > &hexahedra) |
| Actually Add some hexahedra to this topology. | |
| void | removeHexahedraWarning (sofa::helper::vector< unsigned int > &hexahedra) |
| Sends a message to warn that some hexahedra are about to be deleted. | |
| virtual void | removeHexahedraProcess (const sofa::helper::vector< unsigned int > &indices, const bool removeIsolatedItems=false) |
| Remove a subset of hexahedra. | |
| virtual void | addQuadsProcess (const sofa::helper::vector< Quad > &quads) |
| Actually Add some quads to this topology. | |
| virtual void | removeQuadsProcess (const sofa::helper::vector< unsigned int > &indices, const bool removeIsolatedEdges=false, const bool removeIsolatedPoints=false) |
| Remove a subset of quads. | |
| virtual 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 | removeHexahedra (sofa::helper::vector< unsigned int > &hexahedra) |
| Remove a set of hexahedra. | |
| 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 | |
| HexahedronSetTopologyContainer * | m_container |
Definition at line 55 of file HexahedronSetTopologyModifier.h.
| sofa::component::topology::HexahedronSetTopologyModifier::HexahedronSetTopologyModifier | ( | ) | [inline] |
Definition at line 58 of file HexahedronSetTopologyModifier.h.
| virtual sofa::component::topology::HexahedronSetTopologyModifier::~HexahedronSetTopologyModifier | ( | ) | [inline, virtual] |
Definition at line 62 of file HexahedronSetTopologyModifier.h.
| void sofa::component::topology::HexahedronSetTopologyModifier::addEdgesProcess | ( | const sofa::helper::vector< Edge > & | edges | ) | [virtual] |
Add some edges to this topology.
Reimplemented from sofa::component::topology::QuadSetTopologyModifier.
Definition at line 451 of file HexahedronSetTopologyModifier.cpp.
References sofa::component::topology::EdgeSetTopologyContainer::getNumberOfEdges(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronEdgeShell(), m_container, and sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronEdgeShell.
| void sofa::component::topology::HexahedronSetTopologyModifier::addHexahedraProcess | ( | const sofa::helper::vector< Hexahedron > & | hexahedra | ) | [virtual] |
Actually Add some hexahedra to this topology.
Definition at line 242 of file HexahedronSetTopologyModifier.cpp.
References addHexahedronProcess().
| void sofa::component::topology::HexahedronSetTopologyModifier::addHexahedraWarning | ( | const unsigned int | nHexahedra, | |
| const sofa::helper::vector< Hexahedron > & | hexahedraList, | |||
| const sofa::helper::vector< unsigned int > & | hexahedraIndexList, | |||
| 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 hexahedra were added in this topology.
Definition at line 261 of file HexahedronSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange().
| void sofa::component::topology::HexahedronSetTopologyModifier::addHexahedraWarning | ( | const unsigned int | nHexahedra, | |
| const sofa::helper::vector< Hexahedron > & | hexahedraList, | |||
| const sofa::helper::vector< unsigned int > & | hexahedraIndexList | |||
| ) |
Sends a message to warn that some hexahedra were added in this topology.
Definition at line 251 of file HexahedronSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange().
| void sofa::component::topology::HexahedronSetTopologyModifier::addHexahedronProcess | ( | Hexahedron | e | ) |
Add a hexahedron.
Definition at line 57 of file HexahedronSetTopologyModifier.cpp.
References addQuadsProcess(), sofa::component::topology::QuadSetTopologyModifier::addQuadsWarning(), sofa::component::topology::EdgeSetTopologyContainer::getEdgeIndex(), sofa::component::topology::HexahedronSetTopologyContainer::getHexahedronIndex(), sofa::component::topology::HexahedronSetTopologyContainer::getHexahedronVertexShellForModification(), sofa::component::topology::HexahedronSetTopologyContainer::getNumberOfHexahedra(), sofa::component::topology::QuadSetTopologyContainer::getQuadIndex(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronEdges(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronEdgeShell(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronQuads(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronQuadShell(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronVertexShell(), sofa::component::topology::hexahedronEdgeArray, m_container, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedron, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronEdge, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronEdgeShell, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronQuad, and sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronQuadShell.
Referenced by addHexahedraProcess().
| void sofa::component::topology::HexahedronSetTopologyModifier::addPointsProcess | ( | const unsigned int | nPoints | ) | [virtual] |
Add some points to this topology.
Reimplemented from sofa::component::topology::QuadSetTopologyModifier.
Definition at line 442 of file HexahedronSetTopologyModifier.cpp.
References sofa::component::topology::PointSetTopologyContainer::getNbPoints(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronVertexShell(), m_container, and sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronVertexShell.
| void sofa::component::topology::HexahedronSetTopologyModifier::addQuadsProcess | ( | const sofa::helper::vector< Quad > & | quads | ) | [virtual] |
Actually Add some quads to this topology.
Reimplemented from sofa::component::topology::QuadSetTopologyModifier.
Definition at line 460 of file HexahedronSetTopologyModifier.cpp.
References sofa::component::topology::QuadSetTopologyContainer::getNumberOfQuads(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronQuadShell(), m_container, and sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronQuadShell.
Referenced by addHexahedronProcess().
| void sofa::component::topology::HexahedronSetTopologyModifier::init | ( | void | ) | [virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::component::topology::QuadSetTopologyModifier.
Definition at line 50 of file HexahedronSetTopologyModifier.cpp.
References sofa::core::objectmodel::BaseContext::get(), sofa::core::objectmodel::BaseObject::getContext(), and m_container.
| void sofa::component::topology::HexahedronSetTopologyModifier::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 remove isolated vertices |
Reimplemented from sofa::component::topology::QuadSetTopologyModifier.
Definition at line 503 of file HexahedronSetTopologyModifier.cpp.
References sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronEdgeShellArray(), sofa::component::topology::HexahedronSetTopologyContainer::getEdgeIndexInHexahedron(), sofa::component::topology::EdgeSetTopologyContainer::getNumberOfEdges(), sofa::component::topology::EdgeSetTopologyContainer::hasEdges(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronEdges(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronEdgeShell(), m_container, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronEdge, and sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronEdgeShell.
Referenced by removeHexahedraProcess().
| void sofa::component::topology::HexahedronSetTopologyModifier::removeHexahedra | ( | sofa::helper::vector< unsigned int > & | hexahedra | ) | [virtual] |
Remove a set of hexahedra.
| hexahedra | an array of hexahedron indices to be removed (note that the array is not const since it needs to be sorted) |
Definition at line 597 of file HexahedronSetTopologyModifier.cpp.
References sofa::component::topology::HexahedronSetTopologyContainer::checkTopology(), m_container, sofa::component::topology::PointSetTopologyModifier::propagateTopologicalChanges(), removeHexahedraProcess(), and removeHexahedraWarning().
Referenced by removeItems().
| void sofa::component::topology::HexahedronSetTopologyModifier::removeHexahedraProcess | ( | const sofa::helper::vector< unsigned int > & | indices, | |
| const bool | removeIsolatedItems = false | |||
| ) | [virtual] |
Remove a subset of hexahedra.
Elements corresponding to these points are removed form the mechanical object's state vectors.
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 remove isolated quads, edges and vertices |
warn that quads will be deleted
warn that edges will be deleted
actually remove quads without looking for isolated vertices
actually remove edges without looking for isolated vertices
Definition at line 284 of file HexahedronSetTopologyModifier.cpp.
References sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronEdgeShellArray(), sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronQuadShellArray(), sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronVertexShellArray(), sofa::component::topology::HexahedronSetTopologyContainer::getNumberOfHexahedra(), sofa::component::topology::EdgeSetTopologyContainer::hasEdges(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedra(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronEdges(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronEdgeShell(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronQuads(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronQuadShell(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronVertexShell(), sofa::component::topology::QuadSetTopologyContainer::hasQuads(), m_container, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedron, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronEdge, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronEdgeShell, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronQuad, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronQuadShell, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronVertexShell, sofa::component::topology::PointSetTopologyModifier::propagateTopologicalChanges(), removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesWarning(), removePointsProcess(), sofa::component::topology::PointSetTopologyModifier::removePointsWarning(), removeQuadsProcess(), and sofa::component::topology::QuadSetTopologyModifier::removeQuadsWarning().
Referenced by removeHexahedra().
| void sofa::component::topology::HexahedronSetTopologyModifier::removeHexahedraWarning | ( | sofa::helper::vector< unsigned int > & | hexahedra | ) |
Sends a message to warn that some hexahedra are about to be deleted.
sort vertices to remove in a descendent order
Definition at line 273 of file HexahedronSetTopologyModifier.cpp.
References sofa::core::componentmodel::topology::TopologyModifier::addTopologyChange().
Referenced by removeHexahedra().
| void sofa::component::topology::HexahedronSetTopologyModifier::removeItems | ( | sofa::helper::vector< unsigned int > & | items | ) | [virtual] |
Generic method to remove a list of items.
Reimplemented from sofa::component::topology::QuadSetTopologyModifier.
Definition at line 609 of file HexahedronSetTopologyModifier.cpp.
References removeHexahedra().
| void sofa::component::topology::HexahedronSetTopologyModifier::removePointsProcess | ( | sofa::helper::vector< unsigned int > & | indices, | |
| const bool | removeDOF = true | |||
| ) | [virtual] |
Remove a subset of points.
Elements corresponding to these points are removed form 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::QuadSetTopologyModifier.
Definition at line 469 of file HexahedronSetTopologyModifier.cpp.
References sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronVertexShellArray(), sofa::component::topology::PointSetTopologyContainer::getNbPoints(), sofa::component::topology::HexahedronSetTopologyContainer::getVertexIndexInHexahedron(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedra(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronVertexShell(), m_container, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedron, and sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronVertexShell.
Referenced by removeHexahedraProcess().
| void sofa::component::topology::HexahedronSetTopologyModifier::removeQuadsProcess | ( | const sofa::helper::vector< unsigned int > & | indices, | |
| const bool | removeIsolatedEdges = false, |
|||
| const bool | removeIsolatedPoints = false | |||
| ) | [virtual] |
Remove a subset of quads.
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 |
Reimplemented from sofa::component::topology::QuadSetTopologyModifier.
Definition at line 535 of file HexahedronSetTopologyModifier.cpp.
References sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronQuadShellArray(), sofa::component::topology::QuadSetTopologyContainer::getNumberOfQuads(), sofa::component::topology::HexahedronSetTopologyContainer::getQuadIndexInHexahedron(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronQuads(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronQuadShell(), sofa::component::topology::QuadSetTopologyContainer::hasQuads(), m_container, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronQuad, and sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronQuadShell.
Referenced by removeHexahedraProcess().
| void sofa::component::topology::HexahedronSetTopologyModifier::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::QuadSetTopologyModifier.
Definition at line 614 of file HexahedronSetTopologyModifier.cpp.
References sofa::component::topology::HexahedronSetTopologyContainer::checkTopology(), m_container, sofa::component::topology::PointSetTopologyModifier::propagateTopologicalChanges(), renumberPointsProcess(), and sofa::component::topology::PointSetTopologyModifier::renumberPointsWarning().
| void sofa::component::topology::HexahedronSetTopologyModifier::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::QuadSetTopologyModifier.
Definition at line 567 of file HexahedronSetTopologyModifier.cpp.
References sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedra(), sofa::component::topology::HexahedronSetTopologyContainer::hasHexahedronVertexShell(), m_container, sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedron, and sofa::component::topology::HexahedronSetTopologyContainer::m_hexahedronVertexShell.
Referenced by renumberPoints().
HexahedronSetTopologyContainer* sofa::component::topology::HexahedronSetTopologyModifier::m_container [private] |
Reimplemented from sofa::component::topology::QuadSetTopologyModifier.
Definition at line 188 of file HexahedronSetTopologyModifier.h.
Referenced by addEdgesProcess(), addHexahedronProcess(), addPointsProcess(), addQuadsProcess(), init(), removeEdgesProcess(), removeHexahedra(), removeHexahedraProcess(), removePointsProcess(), removeQuadsProcess(), renumberPoints(), and renumberPointsProcess().
1.5.7.1