sofa::component::topology::HexahedronSetTopologyModifier Class Reference

A class that modifies the topology by adding and removing hexahedra. More...

#include <HexahedronSetTopologyModifier.h>

Inheritance diagram for sofa::component::topology::HexahedronSetTopologyModifier:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::topology::HexahedronSetTopologyModifier:

Collaboration graph
[legend]

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

Detailed Description

A class that modifies the topology by adding and removing hexahedra.

Definition at line 55 of file HexahedronSetTopologyModifier.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

void sofa::component::topology::HexahedronSetTopologyModifier::addEdgesProcess ( const sofa::helper::vector< Edge > &  edges  )  [virtual]

void sofa::component::topology::HexahedronSetTopologyModifier::addHexahedraProcess ( const sofa::helper::vector< Hexahedron > &  hexahedra  )  [virtual]

Actually Add some hexahedra to this topology.

See also:
addHexahedraWarning

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.

See also:
addHexahedraProcess

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.

See also:
addHexahedraProcess

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]

void sofa::component::topology::HexahedronSetTopologyModifier::addQuadsProcess ( const sofa::helper::vector< Quad > &  quads  )  [virtual]

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]

void sofa::component::topology::HexahedronSetTopologyModifier::removeHexahedra ( sofa::helper::vector< unsigned int > &  hexahedra  )  [virtual]

Remove a set of hexahedra.

Parameters:
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.

See also:
removeHexahedraWarning
Parameters:
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.

See also:
removeHexahedraProcess
Important : parameter indices is not const because it is actually sorted from the highest index to the lowest one.

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.

See also:
removePointsWarning Important : the points are actually deleted from the mechanical object's state vectors iff (removeDOF == true)

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]

void sofa::component::topology::HexahedronSetTopologyModifier::renumberPoints ( const sofa::helper::vector< unsigned int > &  index,
const sofa::helper::vector< unsigned int > &  inv_index 
) [virtual]

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]


Field Documentation


The documentation for this class was generated from the following files:

Generated on Sun Nov 23 04:21:28 2008 for Sofa by  doxygen 1.5.7.1