SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::component::topology::TriangleSetTopologyContainer Class Reference

#include <TriangleSetTopologyContainer.h>

: Object that stores a set of triangles and provides access to each triangle and its edges and vertices More...

Inheritance diagram for sofa::component::topology::TriangleSetTopologyContainer:

Detailed Description

: Object that stores a set of triangles and provides access to each triangle and its edges and vertices

Public Attributes

Data< sofa::helper::vector< Triangle > > d_triangle
 provides the set of triangles. More...
 
- Public Attributes inherited from sofa::component::topology::EdgeSetTopologyContainer
Data< sofa::helper::vector< Edge > > d_edge
 List of edge indices. More...
 
Data< boolm_checkConnexity
 It true, will check the connexity of the mesh. More...
 
- Public Attributes inherited from sofa::component::topology::PointSetTopologyContainer
Data< InitTypes::VecCoordd_initPoints
 Initial position of points. More...
 
Data< boold_checkTopology
 Bool parameter to activate internal topology checks in several methods. More...
 

Protected Attributes

sofa::helper::vector< EdgesInTrianglem_edgesInTriangle
 provides the 3 edges in each triangle. More...
 
sofa::helper::vector< TrianglesAroundVertexm_trianglesAroundVertex
 for each vertex provides the set of triangles adjacent to that vertex. More...
 
sofa::helper::vector< TrianglesAroundEdgem_trianglesAroundEdge
 for each edge provides the set of triangles adjacent to that edge. More...
 
sofa::helper::vector< TriangleIDm_trianglesOnBorder
 Set of triangle indices on topology border. More...
 
sofa::helper::vector< EdgeIDm_edgesOnBorder
 Set of edge indices on topology border. More...
 
sofa::helper::vector< PointIDm_pointsOnBorder
 Set of point indices on topology border. More...
 
bool m_triangleTopologyDirty
 Boolean used to know if the topology Data of this container is dirty. More...
 
std::list< sofa::core::topology::TopologyEngine * > m_enginesList
 List of engines related to this specific container. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_dataGraph
 variables used to display the graph of Data/DataEngines linked to this Data array. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_enginesGraph
 
- Protected Attributes inherited from sofa::component::topology::EdgeSetTopologyContainer
sofa::helper::vector< EdgesAroundVertexm_edgesAroundVertex
 
bool m_edgeTopologyDirty
 Boolean used to know if the topology Data of this container is dirty. More...
 
std::list< sofa::core::topology::TopologyEngine * > m_enginesList
 List of engines related to this specific container. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_dataGraph
 variables used to display the graph of Data/DataEngines linked to this Data array. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_enginesGraph
 
- Protected Attributes inherited from sofa::component::topology::PointSetTopologyContainer
bool m_pointTopologyDirty
 Boolean used to know if the topology Data of this container is dirty. More...
 
std::list< sofa::core::topology::TopologyEngine * > m_enginesList
 List of engines related to this specific container. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_dataGraph
 variables used to display the graph of Data/DataEngines linked to this Data array. More...
 
sofa::helper::vector< sofa::helper::vector< std::string > > m_enginesGraph
 

Public Member Functions

 SOFA_CLASS (TriangleSetTopologyContainer, EdgeSetTopologyContainer)
 
void init () override
 
void reinit () override
 
bool hasTriangles () const
 
bool hasEdgesInTriangle () const
 
bool hasTrianglesAroundVertex () const
 
bool hasTrianglesAroundEdge () const
 
bool hasBorderElementLists () const
 
void createElementsOnBorder ()
 : Create element lists which are on topology border: More...
 
void reOrientateTriangle (TriangleID id) override
 Will change order of vertices in triangle: t[1] <=> t[2]. More...
 
void clear () override
 
void addEdge (int, int) override
 
void addTriangle (int a, int b, int c) override
 
const SeqTrianglesgetTriangles () override
 Returns the quad array. More...
 
Data< sofa::helper::vector< Triangle > > & getTriangleDataArray ()
 Returns a reference to the Data of triangles array container. More...
 
const Triangle getTriangle (TriangleID i) override
 Returns the triangle corresponding to the TriangleID i. More...
 
TriangleID getTriangleIndex (PointID v1, PointID v2, PointID v3) override
 
const EdgesInTrianglegetEdgesInTriangle (TriangleID id) override
 Returns the 3 edges adjacent to a given triangle. More...
 
const TrianglesAroundVertexgetTrianglesAroundVertex (PointID id) override
 Returns the set of triangles adjacent to a given vertex. More...
 
const TrianglesAroundEdgegetTrianglesAroundEdge (EdgeID id) override
 Returns the set of triangles adjacent to a given edge. More...
 
int getVertexIndexInTriangle (const Triangle &t, PointID vertexIndex) const override
 Returns the index (either 0, 1 ,2) of the vertex whose global index is vertexIndex. More...
 
int getEdgeIndexInTriangle (const EdgesInTriangle &t, EdgeID edgeIndex) const override
 Returns the index (either 0, 1 ,2) of the edge whose global index is edgeIndex. More...
 
void initTopology ()
 
bool checkTopology () const override
 Checks if the topology is coherent. More...
 
size_t getNumberOfTriangles () const
 Returns the number of triangles in this topology. The difference to getNbTriangles() is that this method does not generate the triangle array if it does not exist. More...
 
size_t getNumberOfElements () const override
 Returns the number of topological element of the current topology. This function avoids to know which topological container is in used. More...
 
const sofa::helper::vector< Triangle > & getTriangleArray ()
 Returns the Triangle array. More...
 
const sofa::helper::vector< EdgesInTriangle > & getEdgesInTriangleArray ()
 Returns the EdgesInTriangle array (i.e. provide the 3 edge indices for each triangle). More...
 
const sofa::helper::vector< TrianglesAroundVertex > & getTrianglesAroundVertexArray ()
 Returns the TrianglesAroundVertex array (i.e. provide the triangles indices adjacent to each vertex). More...
 
const sofa::helper::vector< TrianglesAroundEdge > & getTrianglesAroundEdgeArray ()
 Returns the TrianglesAroundEdge array (i.e. provide the triangles indices adjacent to each edge). More...
 
const sofa::helper::vector< TriangleID > & getTrianglesOnBorder () override
 : Return a list of TriangleID which are on a border. More...
 
const sofa::helper::vector< EdgeID > & getEdgesOnBorder () override
 : Return a list of EdgeID which are on a border. More...
 
const sofa::helper::vector< PointID > & getPointsOnBorder () override
 : Return a vector of PointID which are on a border. More...
 
bool checkConnexity () override
 Checks if the topology has only one connected component. More...
 
size_t getNumberOfConnectedComponent () override
 Returns the number of connected component. More...
 
const VecTriangleID getConnectedElement (TriangleID elem) override
 Returns the set of element indices connected to an input one (i.e. which can be reached by topological links) More...
 
const VecTriangleID getElementAroundElement (TriangleID elem) override
 Returns the set of element indices adjacent to a given element (i.e. sharing a link) More...
 
const VecTriangleID getElementAroundElements (VecTriangleID elems) override
 Returns the set of element indices adjacent to a given list of elements (i.e. sharing a link) More...
 
- Public Member Functions inherited from sofa::component::topology::EdgeSetTopologyContainer
 SOFA_CLASS (EdgeSetTopologyContainer, PointSetTopologyContainer)
 
void init () override
 
void reinit () override
 
sofa::core::topology::TopologyObjectType getTopologyType () const override
 Returns the type of the topology. More...
 
void clear () override
 
void addEdge (int a, int b) override
 
const SeqEdgesgetEdges () override
 Returns the edge array. More...
 
const Edge getEdge (EdgeID i) override
 Get an Edge from its ID. More...
 
EdgeID getEdgeIndex (PointID v1, PointID v2) override
 Get the index of the edge joining two vertices. More...
 
const EdgesAroundVertexgetEdgesAroundVertex (PointID id) override
 Get the indices of the edges around a vertex. More...
 
void initTopology ()
 
bool checkTopology () const override
 Checks if the topology is coherent. More...
 
size_t getNumberOfEdges () const
 Returns the number of edges in this topology. More...
 
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) More...
 
virtual const sofa::helper::vector< Edge > & getEdgeArray ()
 Returns the Edge array. More...
 
Data< sofa::helper::vector< Edge > > & getEdgeDataArray ()
 Returns a reference to the Data of edges array container. More...
 
virtual const sofa::helper::vector< sofa::helper::vector< EdgeID > > & getEdgesAroundVertexArray ()
 Returns the list of Edge indices around each DOF. More...
 
bool hasEdges () const
 
bool hasEdgesAroundVertex () const
 
bool checkConnexity () override
 Checks if the topology has only one connected component. More...
 
size_t getNumberOfConnectedComponent () override
 Returns the number of connected component. More...
 
const VecEdgeID getConnectedElement (EdgeID elem) override
 Returns the set of element indices connected to an input one (i.e. which can be reached by topological links) More...
 
const VecEdgeID getElementAroundElement (EdgeID elem) override
 Returns the set of element indices adjacent to a given element (i.e. sharing a link) More...
 
const VecEdgeID getElementAroundElements (VecEdgeID elems) override
 Returns the set of element indices adjacent to a given list of elements (i.e. sharing a link) More...
 
- Public Member Functions inherited from sofa::component::topology::PointSetTopologyContainer
 SOFA_CLASS (PointSetTopologyContainer, core::topology::TopologyContainer)
 
void init () override
 
const sofa::helper::vector< PointID > & getPoints () const
 
void clear () override
 
void addPoint (double px, double py, double pz) override
 
int getNbPoints () const override
 Returns the number of vertices in this topology. More...
 
Data< InitTypes::VecCoord > & getPointDataArray ()
 Returns a reference to the Data of points array container. More...
 
void setNbPoints (int n) override
 Set the number of vertices in this topology. More...
 
bool hasPos () const override
 check if vertices in this topology have positions. More...
 
SReal getPX (int i) const override
 Returns the X coordinate of the ith DOF. More...
 
SReal getPY (int i) const override
 Returns the Y coordinate of the ith DOF. More...
 
SReal getPZ (int i) const override
 Returns the Z coordinate of the ith DOF. More...
 
sofa::core::topology::TopologyObjectType getTopologyType () const override
 Returns the type of the topology. More...
 
bool checkTopology () const override
 Checks if the Topology is coherent. More...
 
void addPoint ()
 add one DOF in this topology (simply increment the number of DOF) More...
 
void addPoints (const unsigned int nPoints)
 add a number of DOFs in this topology (simply increase the number of DOF according to this parameter) More...
 
void removePoint ()
 remove one DOF in this topology (simply decrement the number of DOF) More...
 
void removePoints (const unsigned int nPoints)
 remove a number of DOFs in this topology (simply decrease the number of DOF according to this parameter) More...
 

Protected Member Functions

 TriangleSetTopologyContainer ()
 
 ~TriangleSetTopologyContainer () override
 
virtual void createTriangleSetArray ()
 Creates the TriangleSet array. More...
 
void createEdgeSetArray () override
 Creates the EdgeSet array. More...
 
virtual void createEdgesInTriangleArray ()
 Creates the array of edge indices for each triangle. More...
 
virtual void createTrianglesAroundVertexArray ()
 Creates the TrianglesAroundVertex Array. More...
 
virtual void createTrianglesAroundEdgeArray ()
 Creates the TrianglesAroundEdge Array. More...
 
void clearTriangles ()
 
void clearEdgesInTriangle ()
 
void clearTrianglesAroundVertex ()
 
void clearTrianglesAroundEdge ()
 
void clearBorderElementLists ()
 
virtual TrianglesAroundVertexgetTrianglesAroundVertexForModification (const PointID vertexIndex)
 Returns a non-const list of triangle indices around a given DOF for subsequent modification. More...
 
virtual TrianglesAroundEdgegetTrianglesAroundEdgeForModification (const EdgeID edgeIndex)
 Returns a non-const list of triangle indices around a given edge for subsequent modification. More...
 
void updateTopologyEngineGraph () override
 Function creating the data graph linked to d_triangle. More...
 
void setTriangleTopologyToDirty ()
 
void cleanTriangleTopologyFromDirty ()
 
const boolisTriangleTopologyDirty ()
 
- Protected Member Functions inherited from sofa::component::topology::EdgeSetTopologyContainer
 EdgeSetTopologyContainer ()
 
 ~EdgeSetTopologyContainer () override
 
virtual void createEdgesAroundVertexArray ()
 Creates the EdgesAroundVertex array. More...
 
void clearEdges ()
 
void clearEdgesAroundVertex ()
 
void updateTopologyEngineGraph () override
 Function creating the data graph linked to d_triangle. More...
 
void setEdgeTopologyToDirty ()
 
void cleanEdgeTopologyFromDirty ()
 
const boolisEdgeTopologyDirty ()
 
virtual EdgesAroundVertexgetEdgesAroundVertexForModification (const PointID i)
 Returns a non-const list of Edge indices around the ith DOF for subsequent modification. More...
 
- Protected Member Functions inherited from sofa::component::topology::PointSetTopologyContainer
 PointSetTopologyContainer (int nPoints=0)
 
 ~PointSetTopologyContainer () override
 
void updateTopologyEngineGraph () override
 Function creating the data graph linked to d_point. More...
 
virtual void updateDataEngineGraph (sofa::core::objectmodel::BaseData &my_Data, std::list< sofa::core::topology::TopologyEngine * > &my_enginesList)
 functions to really update the graph of Data/DataEngines linked to the different Data array, using member variable. More...
 
void setPointTopologyToDirty ()
 
void cleanPointTopologyFromDirty ()
 
const boolisPointTopologyDirty ()
 
void addEngineToList (sofa::core::topology::TopologyEngine *_engine)
 function to add a topologyEngine to the current list of engines. More...
 
virtual void displayDataGraph (sofa::core::objectmodel::BaseData &my_Data)
 functions to display the graph of Data/DataEngines linked to the different Data array, using member variable. More...
 

Friends

class TriangleSetTopologyModifier
 

Attribute details

Data< sofa::helper::vector<Triangle> > sofa::component::topology::TriangleSetTopologyContainer::d_triangle

provides the set of triangles.

sofa::helper::vector< sofa::helper::vector <std::string> > sofa::component::topology::TriangleSetTopologyContainer::m_dataGraph
protected

variables used to display the graph of Data/DataEngines linked to this Data array.

sofa::helper::vector<EdgesInTriangle> sofa::component::topology::TriangleSetTopologyContainer::m_edgesInTriangle
protected

provides the 3 edges in each triangle.

sofa::helper::vector<EdgeID> sofa::component::topology::TriangleSetTopologyContainer::m_edgesOnBorder
protected

Set of edge indices on topology border.

sofa::helper::vector< sofa::helper::vector <std::string> > sofa::component::topology::TriangleSetTopologyContainer::m_enginesGraph
protected
std::list<sofa::core::topology::TopologyEngine *> sofa::component::topology::TriangleSetTopologyContainer::m_enginesList
protected

List of engines related to this specific container.

sofa::helper::vector<PointID> sofa::component::topology::TriangleSetTopologyContainer::m_pointsOnBorder
protected

Set of point indices on topology border.

sofa::helper::vector< TrianglesAroundEdge > sofa::component::topology::TriangleSetTopologyContainer::m_trianglesAroundEdge
protected

for each edge provides the set of triangles adjacent to that edge.

sofa::helper::vector< TrianglesAroundVertex > sofa::component::topology::TriangleSetTopologyContainer::m_trianglesAroundVertex
protected

for each vertex provides the set of triangles adjacent to that vertex.

sofa::helper::vector<TriangleID> sofa::component::topology::TriangleSetTopologyContainer::m_trianglesOnBorder
protected

Set of triangle indices on topology border.

bool sofa::component::topology::TriangleSetTopologyContainer::m_triangleTopologyDirty
protected

Boolean used to know if the topology Data of this container is dirty.

Constructor details

sofa::component::topology::TriangleSetTopologyContainer::TriangleSetTopologyContainer ( )
protected
sofa::component::topology::TriangleSetTopologyContainer::~TriangleSetTopologyContainer ( )
inlineoverrideprotected

Function details

void sofa::component::topology::TriangleSetTopologyContainer::addEdge ( int  ,
int   
)
inlineoverride
void sofa::component::topology::TriangleSetTopologyContainer::addTriangle ( int  a,
int  b,
int  c 
)
override
bool sofa::component::topology::TriangleSetTopologyContainer::checkConnexity ( )
override

Checks if the topology has only one connected component.

Get information about connexity of the mesh

Returns
true if only one connected component

Get information about connexity of the mesh

bool sofa::component::topology::TriangleSetTopologyContainer::checkTopology ( ) const
override

Checks if the topology is coherent.

Check if the shell arrays are coherent

See also
m_triangle
m_edgesInTriangle
m_trianglesAroundVertex
m_trianglesAroundEdge
void sofa::component::topology::TriangleSetTopologyContainer::cleanTriangleTopologyFromDirty ( )
protected
void sofa::component::topology::TriangleSetTopologyContainer::clear ( )
override

Procedural creation methods

void sofa::component::topology::TriangleSetTopologyContainer::clearBorderElementLists ( )
protected
void sofa::component::topology::TriangleSetTopologyContainer::clearEdgesInTriangle ( )
protected
void sofa::component::topology::TriangleSetTopologyContainer::clearTriangles ( )
protected
void sofa::component::topology::TriangleSetTopologyContainer::clearTrianglesAroundEdge ( )
protected
void sofa::component::topology::TriangleSetTopologyContainer::clearTrianglesAroundVertex ( )
protected
void sofa::component::topology::TriangleSetTopologyContainer::createEdgeSetArray ( )
overrideprotectedvirtual

Creates the EdgeSet array.

Create the set of edges when needed.

Reimplemented from sofa::component::topology::EdgeSetTopologyContainer.

void sofa::component::topology::TriangleSetTopologyContainer::createEdgesInTriangleArray ( )
protectedvirtual

Creates the array of edge indices for each triangle.

This function is only called if the EdgesInTriangle array is required. m_edgesInTriangle[i] contains the 3 indices of the 3 edges composing the ith triangle.

void sofa::component::topology::TriangleSetTopologyContainer::createElementsOnBorder ( )

: Create element lists which are on topology border:

void sofa::component::topology::TriangleSetTopologyContainer::createTrianglesAroundEdgeArray ( )
protectedvirtual

Creates the TrianglesAroundEdge Array.

This function is only called if the TrianglesAroundVertex array is required. m_trianglesAroundEdge[i] contains the indices of all triangles adjacent to the ith edge.

void sofa::component::topology::TriangleSetTopologyContainer::createTrianglesAroundVertexArray ( )
protectedvirtual

Creates the TrianglesAroundVertex Array.

This function is only called if the TrianglesAroundVertex array is required. m_trianglesAroundVertex[i] contains the indices of all triangles adjacent to the ith DOF.

void sofa::component::topology::TriangleSetTopologyContainer::createTriangleSetArray ( )
protectedvirtual

Creates the TriangleSet array.

This function must be implemented by derived classes to create a list of triangles from a set of tetrahedra for instance

Reimplemented in sofa::component::topology::TetrahedronSetTopologyContainer.

const TriangleSetTopologyContainer::VecTriangleID sofa::component::topology::TriangleSetTopologyContainer::getConnectedElement ( TriangleID  elem)
override

Returns the set of element indices connected to an input one (i.e. which can be reached by topological links)

int sofa::component::topology::TriangleSetTopologyContainer::getEdgeIndexInTriangle ( const EdgesInTriangle t,
EdgeID  edgeIndex 
) const
override

Returns the index (either 0, 1 ,2) of the edge whose global index is edgeIndex.

Parameters
Refto an EdgesInTriangle.
Idof an edge.
Returns
the position of this edge in the triangle (i.e. either 0, 1, 2).
-1 if none.
const TriangleSetTopologyContainer::EdgesInTriangle & sofa::component::topology::TriangleSetTopologyContainer::getEdgesInTriangle ( TriangleID  id)
override

Returns the 3 edges adjacent to a given triangle.

Parameters
IDof a triangle.
Returns
EdgesInTriangle list composing the input triangle.
const sofa::helper::vector< TriangleSetTopologyContainer::EdgesInTriangle > & sofa::component::topology::TriangleSetTopologyContainer::getEdgesInTriangleArray ( )

Returns the EdgesInTriangle array (i.e. provide the 3 edge indices for each triangle).

const sofa::helper::vector< TriangleSetTopologyContainer::EdgeID > & sofa::component::topology::TriangleSetTopologyContainer::getEdgesOnBorder ( )
override

: Return a list of EdgeID which are on a border.

See also
createElementsOnBorder()
const TriangleSetTopologyContainer::VecTriangleID sofa::component::topology::TriangleSetTopologyContainer::getElementAroundElement ( TriangleID  elem)
override

Returns the set of element indices adjacent to a given element (i.e. sharing a link)

const TriangleSetTopologyContainer::VecTriangleID sofa::component::topology::TriangleSetTopologyContainer::getElementAroundElements ( VecTriangleID  elems)
override

Returns the set of element indices adjacent to a given list of elements (i.e. sharing a link)

size_t sofa::component::topology::TriangleSetTopologyContainer::getNumberOfConnectedComponent ( )
override

Returns the number of connected component.

size_t sofa::component::topology::TriangleSetTopologyContainer::getNumberOfElements ( ) const
overridevirtual

Returns the number of topological element of the current topology. This function avoids to know which topological container is in used.

Reimplemented from sofa::component::topology::EdgeSetTopologyContainer.

size_t sofa::component::topology::TriangleSetTopologyContainer::getNumberOfTriangles ( ) const

Returns the number of triangles in this topology. The difference to getNbTriangles() is that this method does not generate the triangle array if it does not exist.

const sofa::helper::vector< TriangleSetTopologyContainer::PointID > & sofa::component::topology::TriangleSetTopologyContainer::getPointsOnBorder ( )
override

: Return a vector of PointID which are on a border.

See also
createElementsOnBorder()
const TriangleSetTopologyContainer::Triangle sofa::component::topology::TriangleSetTopologyContainer::getTriangle ( TriangleID  i)
override

Returns the triangle corresponding to the TriangleID i.

Parameters
IDof a triangle.
Returns
The corresponding triangle.
const sofa::helper::vector< TriangleSetTopologyContainer::Triangle > & sofa::component::topology::TriangleSetTopologyContainer::getTriangleArray ( )

Returns the Triangle array.

Data< sofa::helper::vector<Triangle> >& sofa::component::topology::TriangleSetTopologyContainer::getTriangleDataArray ( )
inline

Returns a reference to the Data of triangles array container.

TriangleSetTopologyContainer::TriangleID sofa::component::topology::TriangleSetTopologyContainer::getTriangleIndex ( PointID  v1,
PointID  v2,
PointID  v3 
)
override
const SeqTriangles& sofa::component::topology::TriangleSetTopologyContainer::getTriangles ( )
inlineoverride

Returns the quad array.

BaseMeshTopology API

const TriangleSetTopologyContainer::TrianglesAroundEdge & sofa::component::topology::TriangleSetTopologyContainer::getTrianglesAroundEdge ( EdgeID  id)
override

Returns the set of triangles adjacent to a given edge.

Parameters
IDof an edge.
Returns
TrianglesAroundEdge list around the input edge.
const sofa::helper::vector< TriangleSetTopologyContainer::TrianglesAroundEdge > & sofa::component::topology::TriangleSetTopologyContainer::getTrianglesAroundEdgeArray ( )

Returns the TrianglesAroundEdge array (i.e. provide the triangles indices adjacent to each edge).

TriangleSetTopologyContainer::TrianglesAroundEdge & sofa::component::topology::TriangleSetTopologyContainer::getTrianglesAroundEdgeForModification ( const EdgeID  edgeIndex)
protectedvirtual

Returns a non-const list of triangle indices around a given edge for subsequent modification.

Returns
TrianglesAroundEdge lists in non-const.
See also
getTrianglesAroundEdge()
const TriangleSetTopologyContainer::TrianglesAroundVertex & sofa::component::topology::TriangleSetTopologyContainer::getTrianglesAroundVertex ( PointID  id)
override

Returns the set of triangles adjacent to a given vertex.

Parameters
IDof a vertex
Returns
TrianglesAroundVertex list around the input vertex
const sofa::helper::vector< TriangleSetTopologyContainer::TrianglesAroundVertex > & sofa::component::topology::TriangleSetTopologyContainer::getTrianglesAroundVertexArray ( )

Returns the TrianglesAroundVertex array (i.e. provide the triangles indices adjacent to each vertex).

TriangleSetTopologyContainer::TrianglesAroundVertex & sofa::component::topology::TriangleSetTopologyContainer::getTrianglesAroundVertexForModification ( const PointID  vertexIndex)
protectedvirtual

Returns a non-const list of triangle indices around a given DOF for subsequent modification.

Returns
TrianglesAroundVertex lists in non-const.
See also
getTrianglesAroundVertex()
const sofa::helper::vector< TriangleSetTopologyContainer::TriangleID > & sofa::component::topology::TriangleSetTopologyContainer::getTrianglesOnBorder ( )
override

: Return a list of TriangleID which are on a border.

See also
createElementsOnBorder()
int sofa::component::topology::TriangleSetTopologyContainer::getVertexIndexInTriangle ( const Triangle t,
PointID  vertexIndex 
) const
override

Returns the index (either 0, 1 ,2) of the vertex whose global index is vertexIndex.

Parameters
Refto a triangle.
Idof a vertex.
Returns
the position of this vertex in the triangle (i.e. either 0, 1, 2).
-1 if none.
bool sofa::component::topology::TriangleSetTopologyContainer::hasBorderElementLists ( ) const
bool sofa::component::topology::TriangleSetTopologyContainer::hasEdgesInTriangle ( ) const
bool sofa::component::topology::TriangleSetTopologyContainer::hasTriangles ( ) const
bool sofa::component::topology::TriangleSetTopologyContainer::hasTrianglesAroundEdge ( ) const
bool sofa::component::topology::TriangleSetTopologyContainer::hasTrianglesAroundVertex ( ) const
void sofa::component::topology::TriangleSetTopologyContainer::init ( void  )
override
void sofa::component::topology::TriangleSetTopologyContainer::initTopology ( )

Dynamic Topology API

Method called by component Init method. Will create all the topology neighboorhood buffers and call

See also
EdgeSetTopologyContainer::initTopology()
const bool& sofa::component::topology::TriangleSetTopologyContainer::isTriangleTopologyDirty ( )
inlineprotected
void sofa::component::topology::TriangleSetTopologyContainer::reinit ( )
override
void sofa::component::topology::TriangleSetTopologyContainer::reOrientateTriangle ( TriangleID  id)
override

Will change order of vertices in triangle: t[1] <=> t[2].

void sofa::component::topology::TriangleSetTopologyContainer::setTriangleTopologyToDirty ( )
protected

Use a specific boolean

See also
m_triangleTopologyDirty in order to know if topology Data is dirty or not. Set/Get function access to this boolean
sofa::component::topology::TriangleSetTopologyContainer::SOFA_CLASS ( TriangleSetTopologyContainer  ,
EdgeSetTopologyContainer   
)
void sofa::component::topology::TriangleSetTopologyContainer::updateTopologyEngineGraph ( )
overrideprotected

Function creating the data graph linked to d_triangle.

Related details

friend class TriangleSetTopologyModifier
friend