sofa::component::topology::EdgeSetTopologyContainer Class Reference

a class that stores a set of edges and provides access to the adjacency between points and edges More...

#include <EdgeSetTopologyContainer.h>

Inheritance diagram for sofa::component::topology::EdgeSetTopologyContainer:

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

Collaboration graph
[legend]

Public Member Functions

 EdgeSetTopologyContainer ()
 EdgeSetTopologyContainer (const sofa::helper::vector< Edge > &edges)
virtual ~EdgeSetTopologyContainer ()
virtual void init ()
 Initialization method called at graph modification, during bottom-up traversal.
virtual bool checkTopology () const
 Checks if the topology is coherent.
unsigned int getNumberOfEdges () const
 Returns the number of edges in this topology.
virtual const
sofa::helper::vector< Edge > & 
getEdgeArray ()
 Returns the Edge array.
virtual const
sofa::helper::vector
< sofa::helper::vector
< unsigned int > > & 
getEdgeVertexShellArray ()
 Returns the Edge Shell array.
virtual int getNumberConnectedComponents (sofa::helper::vector< unsigned int > &components)
 Returns the number of connected components from the graph containing all edges and give, for each vertex, which component it belongs to (use BOOST GRAPH LIBRAIRY).
virtual sofa::helper::vector
< unsigned int > & 
getEdgeVertexShellForModification (const unsigned int i)
 Returns a non-const edge shell of the ith DOF for subsequent modification.
virtual void createEdgeSetArray ()
 Creates the EdgeSet array.
virtual void createEdgeVertexShellArray ()
 Creates the EdgeSetIndex.
bool hasEdges () const
bool hasEdgeVertexShell () const
void clearEdges ()
void clearEdgeVertexShell ()
virtual void clear ()
 Procedural creation methods.
virtual void addEdge (int a, int b)
virtual const SeqEdges & getEdges ()
 BaseMeshTopology API.
virtual const VertexEdges & getEdgeVertexShell (PointID i)
 Returns the edge shell of the ith DOF.
virtual int getEdgeIndex (PointID v1, PointID v2)
 Returns the index of the edge joining vertex v1 and vertex v2; returns -1 if no edge exists.

Protected Member Functions

virtual void loadFromMeshLoader (sofa::component::MeshLoader *loader)

Protected Attributes

sofa::helper::vector< Edge > m_edge
sofa::helper::vector
< sofa::helper::vector
< unsigned int > > 
m_edgeVertexShell
 the array that stores the set of edge-vertex shells, ie for each vertex gives the set of adjacent edges

Friends

class EdgeSetTopologyModifier
std::ostream & operator<< (std::ostream &out, const EdgeSetTopologyContainer &t)
std::istream & operator>> (std::istream &in, EdgeSetTopologyContainer &t)
 Needed to be compliant with Datas.

Detailed Description

a class that stores a set of edges and provides access to the adjacency between points and edges

Definition at line 47 of file EdgeSetTopologyContainer.h.


Constructor & Destructor Documentation

sofa::component::topology::EdgeSetTopologyContainer::EdgeSetTopologyContainer (  ) 

Definition at line 59 of file EdgeSetTopologyContainer.cpp.

sofa::component::topology::EdgeSetTopologyContainer::EdgeSetTopologyContainer ( const sofa::helper::vector< Edge > &  edges  ) 

virtual sofa::component::topology::EdgeSetTopologyContainer::~EdgeSetTopologyContainer (  )  [inline, virtual]

Definition at line 56 of file EdgeSetTopologyContainer.h.


Member Function Documentation

void sofa::component::topology::EdgeSetTopologyContainer::addEdge ( int  a,
int  b 
) [virtual]

bool sofa::component::topology::EdgeSetTopologyContainer::checkTopology (  )  const [virtual]

void sofa::component::topology::EdgeSetTopologyContainer::clear (  )  [virtual]

void sofa::component::topology::EdgeSetTopologyContainer::clearEdges (  ) 

Definition at line 275 of file EdgeSetTopologyContainer.cpp.

References m_edge.

Referenced by clear().

void sofa::component::topology::EdgeSetTopologyContainer::clearEdgeVertexShell (  ) 

void sofa::component::topology::EdgeSetTopologyContainer::createEdgeSetArray (  )  [virtual]

void sofa::component::topology::EdgeSetTopologyContainer::createEdgeVertexShellArray (  )  [virtual]

const sofa::helper::vector< Edge > & sofa::component::topology::EdgeSetTopologyContainer::getEdgeArray (  )  [virtual]

int sofa::component::topology::EdgeSetTopologyContainer::getEdgeIndex ( PointID  v1,
PointID  v2 
) [virtual]

virtual const SeqEdges& sofa::component::topology::EdgeSetTopologyContainer::getEdges (  )  [inline, virtual]

BaseMeshTopology API.

Reimplemented from sofa::core::componentmodel::topology::TopologyContainer.

Definition at line 69 of file EdgeSetTopologyContainer.h.

References getEdgeArray().

const VertexEdges & sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShell ( PointID  i  )  [virtual]

const sofa::helper::vector< sofa::helper::vector< unsigned int > > & sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShellArray (  )  [virtual]

sofa::helper::vector< unsigned int > & sofa::component::topology::EdgeSetTopologyContainer::getEdgeVertexShellForModification ( const unsigned int  i  )  [virtual]

Returns a non-const edge shell of the ith DOF for subsequent modification.

Definition at line 252 of file EdgeSetTopologyContainer.cpp.

References createEdgeVertexShellArray(), hasEdgeVertexShell(), and m_edgeVertexShell.

Referenced by sofa::component::topology::EdgeSetTopologyModifier::addEdgeProcess().

int sofa::component::topology::EdgeSetTopologyContainer::getNumberConnectedComponents ( sofa::helper::vector< unsigned int > &  components  )  [virtual]

Returns the number of connected components from the graph containing all edges and give, for each vertex, which component it belongs to (use BOOST GRAPH LIBRAIRY).

Parameters:
components the array containing the optimal vertex permutation according to the Reverse CuthillMckee algorithm

Reimplemented in sofa::component::topology::ManifoldEdgeSetTopologyContainer.

Definition at line 167 of file EdgeSetTopologyContainer.cpp.

References m_edge.

Referenced by sofa::component::collision::TopologicalChangeManager::incisionTriangleModel().

unsigned int sofa::component::topology::EdgeSetTopologyContainer::getNumberOfEdges (  )  const

Returns the number of edges in this topology.

The difference to getNbEdges() is that this method does not generate the edge array if it does not exist.

Definition at line 215 of file EdgeSetTopologyContainer.cpp.

References m_edge.

Referenced by sofa::component::topology::EdgeSetTopologyModifier::addEdgeProcess(), sofa::component::topology::ManifoldEdgeSetTopologyModifier::addEdges(), sofa::component::topology::EdgeSetTopologyModifier::addEdges(), sofa::component::topology::TetrahedronSetTopologyModifier::addEdgesProcess(), sofa::component::topology::HexahedronSetTopologyModifier::addEdgesProcess(), sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronEdgeShellArray(), sofa::component::topology::QuadSetTopologyContainer::createQuadEdgeShellArray(), sofa::component::topology::TetrahedronSetTopologyContainer::createTetrahedronEdgeShellArray(), sofa::component::topology::TriangleSetTopologyContainer::createTriangleEdgeShellArray(), sofa::component::topology::EdgeSetTopologyModifier::fuseEdgesProcess(), sofa::component::topology::TriangleSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::TetrahedronSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::QuadSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::HexahedronSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::splitEdgesProcess(), and sofa::component::topology::EdgeSetTopologyModifier::swapEdgesProcess().

bool sofa::component::topology::EdgeSetTopologyContainer::hasEdges (  )  const

Definition at line 265 of file EdgeSetTopologyContainer.cpp.

References m_edge.

Referenced by sofa::component::topology::TriangleSetTopologyModifier::addEdgesProcess(), sofa::component::topology::QuadSetTopologyModifier::addEdgesProcess(), sofa::component::topology::QuadSetTopologyModifier::addQuadProcess(), sofa::component::topology::TriangleSetTopologyModifier::addTriangleProcess(), sofa::component::topology::TriangleSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::TetrahedronSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::QuadSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::HexahedronSetTopologyContainer::createEdgeSetArray(), sofa::component::topology::ManifoldEdgeSetTopologyContainer::createEdgeVertexShellArray(), createEdgeVertexShellArray(), sofa::component::topology::HexahedronSetTopologyContainer::createHexahedronEdgeArray(), sofa::component::topology::QuadSetTopologyContainer::createQuadEdgeArray(), sofa::component::topology::QuadSetTopologyContainer::createQuadEdgeShellArray(), sofa::component::topology::TetrahedronSetTopologyContainer::createTetrahedronEdgeArray(), sofa::component::topology::TriangleSetTopologyContainer::createTriangleEdgeArray(), sofa::component::topology::TriangleSetTopologyContainer::createTriangleEdgeShellArray(), sofa::component::topology::EdgeSetTopologyModifier::fuseEdgesProcess(), getEdgeArray(), getEdgeIndex(), sofa::component::topology::TetrahedronSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::HexahedronSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::EdgeSetTopologyModifier::removeEdgesProcess(), sofa::component::topology::HexahedronSetTopologyModifier::removeHexahedraProcess(), sofa::component::topology::EdgeSetTopologyModifier::removePointsProcess(), sofa::component::topology::QuadSetTopologyModifier::removeQuadsProcess(), sofa::component::topology::TetrahedronSetTopologyModifier::removeTetrahedraProcess(), sofa::component::topology::TriangleSetTopologyModifier::removeTrianglesProcess(), sofa::component::topology::EdgeSetTopologyModifier::renumberPointsProcess(), sofa::component::topology::EdgeSetTopologyModifier::splitEdgesProcess(), and sofa::component::topology::EdgeSetTopologyModifier::swapEdgesProcess().

bool sofa::component::topology::EdgeSetTopologyContainer::hasEdgeVertexShell (  )  const

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

void sofa::component::topology::EdgeSetTopologyContainer::loadFromMeshLoader ( sofa::component::MeshLoader *  loader  )  [protected, virtual]


Friends And Related Function Documentation

friend class EdgeSetTopologyModifier [friend]

Definition at line 49 of file EdgeSetTopologyContainer.h.

std::ostream& operator<< ( std::ostream &  out,
const EdgeSetTopologyContainer &  t 
) [friend]

Definition at line 114 of file EdgeSetTopologyContainer.h.

std::istream& operator>> ( std::istream &  in,
EdgeSetTopologyContainer &  t 
) [friend]

Needed to be compliant with Datas.

Definition at line 124 of file EdgeSetTopologyContainer.h.


Field Documentation


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

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