sofa::component::topology::PointSetTopologyModifier Class Reference

A class that can apply basic topology transformations on a set of points. More...

#include <PointSetTopologyModifier.h>

Inheritance diagram for sofa::component::topology::PointSetTopologyModifier:

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

Collaboration graph
[legend]

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

Detailed Description

A class that can apply basic topology transformations on a set of points.

Definition at line 47 of file PointSetTopologyModifier.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

void sofa::component::topology::PointSetTopologyModifier::addPointsProcess ( const unsigned int  nPoints  )  [virtual]

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 
)

void sofa::component::topology::PointSetTopologyModifier::addPointsWarning ( const unsigned int  nPoints,
const bool  addDOF = true 
)

void sofa::component::topology::PointSetTopologyModifier::init ( void   )  [virtual]

void sofa::component::topology::PointSetTopologyModifier::notifyEndingEvent (  )  [virtual]

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.

See also:
firstChange()

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.

See also:
firstChange()

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]

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.

See also:
removePointsWarning
Parameters:
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 
)

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

void sofa::component::topology::PointSetTopologyModifier::renumberPointsProcess ( const sofa::helper::vector< unsigned int > &  index,
const sofa::helper::vector< unsigned int > &  ,
const bool  renumberDOF = true 
) [virtual]

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 
)

void sofa::component::topology::PointSetTopologyModifier::swapPoints ( const int  i1,
const int  i2 
) [virtual]


Field Documentation


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

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