sofa::core::componentmodel::topology::TopologicalMapping Class Reference

This Interface is a new kind of Mapping, called TopologicalMapping, which converts an INPUT TOPOLOGY to an OUTPUT TOPOLOGY (both topologies are of type BaseTopology). More...

#include <TopologicalMapping.h>

Inheritance diagram for sofa::core::componentmodel::topology::TopologicalMapping:

Inheritance graph
[legend]
Collaboration diagram for sofa::core::componentmodel::topology::TopologicalMapping:

Collaboration graph
[legend]

Public Types

typedef BaseMeshTopology In
 Input Topology.
typedef BaseMeshTopology Out
 Output Topology.

Public Member Functions

 TopologicalMapping (In *from, Out *to)
virtual ~TopologicalMapping ()
In * getFrom ()
 Specify the input and output topologies.
Out * getTo ()
 Accessor to the OUTPUT topology of the TopologicalMapping :.
virtual void updateTopologicalMapping ()=0
 Method called at each topological changes propagation which comes from the INPUT topology to adapt the OUTPUT topology :.
const std::map< unsigned int,
unsigned int > & 
getGlob2LocMap ()
 Accessor to index maps :.
const sofa::helper::vector
< unsigned int > & 
getLoc2GlobVec ()
virtual unsigned int getGlobIndex (unsigned int ind)
virtual unsigned int getFromIndex (unsigned int)
const std::map< unsigned int,
sofa::helper::vector< unsigned
int > > & 
getIn2OutMap ()

Protected Attributes

In * fromModel
 Input source BaseTopology.
Out * toModel
 Output target BaseTopology.
sofa::helper::vector< unsigned
int > 
Loc2GlobVec
std::map< unsigned int,
unsigned int > 
Glob2LocMap
std::map< unsigned int,
sofa::helper::vector< unsigned
int > > 
In2OutMap

Detailed Description

This Interface is a new kind of Mapping, called TopologicalMapping, which converts an INPUT TOPOLOGY to an OUTPUT TOPOLOGY (both topologies are of type BaseTopology).

It first initializes the mesh of the output topology from the mesh of the input topology, and it creates the two Index Maps that maintain the correspondence between the indices of their common elements.

Then, at each propagation of topological changes, it translates the topological change events that are propagated from the INPUT topology into specific actions that call element adding or element removal methods on the OUTPUT topology, and it updates the Index Maps.

So, at each time step, the geometrical and adjacency information are consistent in both topologies.

Definition at line 61 of file TopologicalMapping.h.


Member Typedef Documentation

Input Topology.

Definition at line 65 of file TopologicalMapping.h.

Output Topology.

Definition at line 67 of file TopologicalMapping.h.


Constructor & Destructor Documentation

sofa::core::componentmodel::topology::TopologicalMapping::TopologicalMapping ( In *  from,
Out *  to 
) [inline]

Definition at line 69 of file TopologicalMapping.h.

virtual sofa::core::componentmodel::topology::TopologicalMapping::~TopologicalMapping (  )  [inline, virtual]

Definition at line 73 of file TopologicalMapping.h.


Member Function Documentation

In* sofa::core::componentmodel::topology::TopologicalMapping::getFrom (  )  [inline]

Specify the input and output topologies.

Accessor to the INPUT topology of the TopologicalMapping :

Definition at line 83 of file TopologicalMapping.h.

References fromModel.

Referenced by sofa::component::collision::CarvingManager::doCarve(), and sofa::component::collision::TopologicalChangeManager::removeItemsFromTriangleModel().

virtual unsigned int sofa::core::componentmodel::topology::TopologicalMapping::getFromIndex ( unsigned int   )  [inline, virtual]

const std::map<unsigned int, unsigned int>& sofa::core::componentmodel::topology::TopologicalMapping::getGlob2LocMap (  )  [inline]

Accessor to index maps :.

Definition at line 92 of file TopologicalMapping.h.

References Glob2LocMap.

virtual unsigned int sofa::core::componentmodel::topology::TopologicalMapping::getGlobIndex ( unsigned int  ind  )  [inline, virtual]

const std::map<unsigned int, sofa::helper::vector<unsigned int> >& sofa::core::componentmodel::topology::TopologicalMapping::getIn2OutMap (  )  [inline]

Definition at line 109 of file TopologicalMapping.h.

References In2OutMap.

const sofa::helper::vector<unsigned int>& sofa::core::componentmodel::topology::TopologicalMapping::getLoc2GlobVec (  )  [inline]

Definition at line 93 of file TopologicalMapping.h.

References Loc2GlobVec.

Out* sofa::core::componentmodel::topology::TopologicalMapping::getTo (  )  [inline]

Accessor to the OUTPUT topology of the TopologicalMapping :.

Definition at line 86 of file TopologicalMapping.h.

References toModel.

virtual void sofa::core::componentmodel::topology::TopologicalMapping::updateTopologicalMapping (  )  [pure virtual]


Field Documentation


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

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