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

#include <MeshTopology.h>

Inheritance diagram for sofa::component::topology::MeshTopology:

Classes

class  PrimitiveUpdate
 

Public Attributes

Data< SeqPointsseqPoints
 List of point positions. More...
 
Data< SeqEdgesseqEdges
 List of edge indices. More...
 
Data< SeqTrianglesseqTriangles
 List of triangle indices. More...
 
Data< SeqQuadsseqQuads
 List of quad indices. More...
 
Data< SeqTetrahedraseqTetrahedra
 List of tetrahedron indices. More...
 
Data< SeqHexahedraseqHexahedra
 List of hexahedron indices. More...
 
Data< SeqUVseqUVs
 List of uv coordinates. More...
 
int revision
 
Data< bool_drawEdges
 if true, draw the topology Edges More...
 
Data< bool_drawTriangles
 if true, draw the topology Triangles More...
 
Data< bool_drawQuads
 if true, draw the topology Quads More...
 
Data< bool_drawTetra
 if true, draw the topology Tetrahedra More...
 
Data< bool_drawHexa
 if true, draw the topology hexahedra More...
 
- Public Attributes inherited from sofa::core::objectmodel::BaseObject
Data< boolf_listening
 if true, handle the events, otherwise ignore the events More...
 
- Public Attributes inherited from sofa::core::objectmodel::Base
helper::system::SofaOStream< helper::logging::Message::Warningserr
 
helper::system::SofaOStream< helper::logging::Message::Infosout
 
helper::system::SofaEndl< Basesendl
 runs the stream processing More...
 
Data< std::string > name
 Name of the object. More...
 
Data< boolf_printLog
 if true, emits extra messages at runtime. More...
 
Data< sofa::core::objectmodel::TagSetf_tags
 list of the subsets the objet belongs to More...
 
Data< sofa::defaulttype::BoundingBoxf_bbox
 this object bounding box More...
 
Data< ComponentStated_componentstate
 the object state More...
 
Data< ComponentState > & m_componentstate {d_componentstate}
 TODO bruno: uncomment once c++17 is enabled in SOFA. More...
 
std::string m_definitionSourceFileName {""}
 
int m_definitionSourceFilePos {-1}
 
std::string m_instanciationSourceFileName {""}
 
int m_instanciationSourceFilePos {-1}
 

Protected Attributes

int nbPoints
 
bool validTetrahedra
 
bool validHexahedra
 
helper::vector< EdgesAroundVertexm_edgesAroundVertex
 
helper::vector< EdgesAroundVertexm_orientedEdgesAroundVertex
 
helper::vector< EdgesInTrianglem_edgesInTriangle
 
helper::vector< EdgesInQuadm_edgesInQuad
 provides the 4 edges in each quad More...
 
helper::vector< EdgesInTetrahedronm_edgesInTetrahedron
 provides the set of edges for each tetrahedron More...
 
helper::vector< EdgesInHexahedronm_edgesInHexahedron
 provides the set of edges for each hexahedron More...
 
helper::vector< TrianglesAroundVertexm_trianglesAroundVertex
 for each vertex provides the set of triangles adjacent to that vertex More...
 
helper::vector< TrianglesAroundVertexm_orientedTrianglesAroundVertex
 for each vertex provides the set of oriented triangles adjacent to that vertex More...
 
helper::vector< TrianglesAroundEdgem_trianglesAroundEdge
 for each edge provides the set of triangles adjacent to that edge More...
 
helper::vector< TrianglesInTetrahedronm_trianglesInTetrahedron
 provides the set of triangles adjacent to each tetrahedron More...
 
helper::vector< QuadsAroundVertexm_quadsAroundVertex
 for each vertex provides the set of quads adjacent to that vertex More...
 
helper::vector< QuadsAroundVertexm_orientedQuadsAroundVertex
 for each vertex provides the set of oriented quads adjacent to that vertex More...
 
helper::vector< QuadsAroundEdgem_quadsAroundEdge
 for each edge provides the set of quads adjacent to that edge More...
 
helper::vector< QuadsInHexahedronm_quadsInHexahedron
 provides the set of quads adjacents to each hexahedron More...
 
helper::vector< TetrahedraAroundVertexm_tetrahedraAroundVertex
 provides the set of tetrahedrons adjacents to each vertex More...
 
helper::vector< TetrahedraAroundEdgem_tetrahedraAroundEdge
 for each edge provides the set of tetrahedra adjacent to that edge More...
 
helper::vector< TetrahedraAroundTrianglem_tetrahedraAroundTriangle
 for each triangle provides the set of tetrahedrons adjacent to that triangle More...
 
helper::vector< HexahedraAroundVertexm_hexahedraAroundVertex
 provides the set of hexahedrons for each vertex More...
 
helper::vector< HexahedraAroundEdgem_hexahedraAroundEdge
 for each edge provides the set of tetrahedra adjacent to that edge More...
 
helper::vector< HexahedraAroundQuadm_hexahedraAroundQuad
 for each quad provides the set of hexahedrons adjacent to that quad More...
 
sofa::core::topology::TopologyObjectType UpperTopology
 
- Protected Attributes inherited from sofa::core::topology::BaseMeshTopology
sofa::core::objectmodel::DataFileName fileTopology
 
- Protected Attributes inherited from sofa::core::objectmodel::BaseObject
SingleLink< BaseObject, BaseContext, BaseLink::FLAG_DOUBLELINKl_context
 
LinkSlaves l_slaves
 
SingleLink< BaseObject, BaseObject, BaseLink::FLAG_DOUBLELINKl_master
 
- Protected Attributes inherited from sofa::core::objectmodel::Base
VecData m_vecData
 List of fields (Data instances) More...
 
MapData m_aliasData
 name -> Data multi-map (includes names and aliases) More...
 
VecLink m_vecLink
 List of links. More...
 
MapLink m_aliasLink
 name -> Link multi-map (includes names and aliases) More...
 

Public Member Functions

 SOFA_CLASS (MeshTopology, core::topology::BaseMeshTopology)
 
void parse (core::objectmodel::BaseObjectDescription *arg) override
 Parse the given description to assign values to this object's fields and potentially other parameters. More...
 
void init () override
 Initialization method called at graph creation and modification, during top-down traversal. More...
 
int getNbPoints () const override
 
void setNbPoints (int n) override
 
const SeqEdgesgetEdges () override
 
const SeqTrianglesgetTriangles () override
 
const SeqQuadsgetQuads () override
 
const SeqTetrahedragetTetrahedra () override
 
const SeqHexahedragetHexahedra () override
 
size_t getNbEdges () override
 
size_t getNbTriangles () override
 
size_t getNbQuads () override
 
size_t getNbTetrahedra () override
 
size_t getNbHexahedra () override
 
const Edge getEdge (EdgeID i) override
 
const Triangle getTriangle (TriangleID i) override
 
const Quad getQuad (QuadID i) override
 
const Tetra getTetrahedron (TetraID i) override
 
const Hexa getHexahedron (HexaID i) override
 
virtual const SeqUVgetUVs ()
 
virtual size_t getNbUVs ()
 
virtual const UV getUV (UVID i)
 
void addUV (SReal u, SReal v)
 
SReal getPosX (int i) const
 
SReal getPosY (int i) const
 
SReal getPosZ (int i) const
 
bool hasPos () const override
 
SReal getPX (int i) const override
 
SReal getPY (int i) const override
 
SReal getPZ (int i) const override
 
void clear () override
 
void addPoint (SReal px, SReal py, SReal pz) override
 
void addEdge (int a, int b) override
 
void addTriangle (int a, int b, int c) override
 
void addQuad (int a, int b, int c, int d) override
 
void addTetra (int a, int b, int c, int d) override
 
void addHexa (int a, int b, int c, int d, int e, int f, int g, int h) override
 
int getRevision () const override
 get the current revision of this mesh (use to detect changes) More...
 
void draw (const core::visual::VisualParams *vparams) override
 Render internal data of this object, for debugging purposes. More...
 
virtual bool hasVolume ()
 
virtual bool hasSurface ()
 
virtual bool hasLines ()
 
virtual bool isVolume ()
 
virtual bool isSurface ()
 
virtual bool isLines ()
 
virtual const EdgesAroundVertexgetOrientedEdgesAroundVertex (PointID i)
 Returns the set of edges adjacent to a given vertex. More...
 
virtual const TrianglesAroundVertexgetOrientedTrianglesAroundVertex (PointID i)
 Returns the set of oriented triangle adjacent to a given vertex. More...
 
virtual const QuadsAroundVertexgetOrientedQuadsAroundVertex (PointID i)
 Returns the set of oriented quad adjacent to a given vertex. More...
 
int computeRelativeOrientationInTri (const unsigned int ind_p0, const unsigned int ind_p1, const unsigned int ind_t)
 
int computeRelativeOrientationInQuad (const unsigned int ind_p0, const unsigned int ind_p1, const unsigned int ind_q)
 
void reOrientateTriangle (TriangleID id) override
 Will change order of vertices in triangle: t[1] <=> t[2]. More...
 
EdgeID getEdgeIndex (PointID v1, PointID v2) override
 Returns the index of the edge joining vertex v1 and vertex v2; returns InvalidID if no edge exists. More...
 
TriangleID getTriangleIndex (PointID v1, PointID v2, PointID v3) override
 
QuadID getQuadIndex (PointID v1, PointID v2, PointID v3, PointID v4) override
 Returns the index of the quad joining vertex v1, v2, v3 and v4; returns InvalidID if none. More...
 
TetrahedronID getTetrahedronIndex (PointID v1, PointID v2, PointID v3, PointID v4) override
 Returns the index of the tetrahedron given four vertex indices; returns InvalidID if none. More...
 
HexahedronID getHexahedronIndex (PointID v1, PointID v2, PointID v3, PointID v4, PointID v5, PointID v6, PointID v7, PointID v8) override
 Returns the index of the hexahedron given eight vertex indices; returns InvalidID if none. More...
 
int getVertexIndexInTriangle (const Triangle &t, PointID vertexIndex) const override
 Returns the index (either 0, 1 ,2 or 3) of the vertex whose global index is vertexIndex. Returns -1 if none. 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. Returns -1 if none. More...
 
int getVertexIndexInQuad (const Quad &t, PointID vertexIndex) const override
 Returns the index (either 0, 1 ,2 or 3) of the vertex whose global index is vertexIndex. Returns -1 if none. More...
 
int getEdgeIndexInQuad (const EdgesInQuad &t, EdgeID edgeIndex) const override
 Returns the index (either 0, 1 ,2, 3) of the edge whose global index is edgeIndex. Returns -1 if none. More...
 
int getVertexIndexInTetrahedron (const Tetra &t, PointID vertexIndex) const override
 Returns the index (either 0, 1 ,2 or 3) of the vertex whose global index is vertexIndex. Returns -1 if none. More...
 
int getEdgeIndexInTetrahedron (const EdgesInTetrahedron &t, EdgeID edgeIndex) const override
 Returns the index (either 0, 1 ,2 ,3, 4, 5) of the edge whose global index is edgeIndex. Returns -1 if none. More...
 
int getTriangleIndexInTetrahedron (const TrianglesInTetrahedron &t, TriangleID triangleIndex) const override
 Returns the index (either 0, 1 ,2 ,3) of the triangle whose global index is triangleIndex. Returns -1 if none. More...
 
int getVertexIndexInHexahedron (const Hexa &t, PointID vertexIndex) const override
 Returns the index (either 0, 1 ,2, 3, 4, 5, 6, or 7) of the vertex whose global index is vertexIndex. Returns -1 if none. More...
 
int getEdgeIndexInHexahedron (const EdgesInHexahedron &t, EdgeID edgeIndex) const override
 Returns the index (either 0, 1 ,2 ,3, 4, 5, 6, 7, 8, 9, 10, 11) of the edge whose global index is edgeIndex. Returns -1 if none. More...
 
int getQuadIndexInHexahedron (const QuadsInHexahedron &t, QuadID quadIndex) const override
 Returns the index (either 0, 1 ,2 ,3, 4, 5) of the quad whose global index is quadIndex. Returns -1 if none. More...
 
Edge getLocalEdgesInTetrahedron (const unsigned int i) const override
 Returns for each index (between 0 and 5) the two vertex indices that are adjacent to that edge. More...
 
Edge getLocalEdgesInHexahedron (const unsigned int i) const override
 Returns for each index (between 0 and 12) the two vertex indices that are adjacent to that edge. More...
 
sofa::core::topology::TopologyObjectType getTopologyType () const override
 
void invalidate ()
 
virtual void updateTetrahedra ()
 
virtual void updateHexahedra ()
 
neighbors queries for Edge Topology

Returns the set of edges adjacent to a given vertex.

const EdgesAroundVertexgetEdgesAroundVertex (PointID i) override
 Returns the set of edges adjacent to a given vertex. More...
 
const helper::vector< EdgesAroundVertex > & getEdgesAroundVertexArray ()
 Returns the TrianglesAroundVertex array (i.e. provide the triangles indices adjacent to each vertex). More...
 
neighbors queries for Triangle Topology

Returns the set of triangle adjacent to a given vertex.

const TrianglesAroundVertexgetTrianglesAroundVertex (PointID i) override
 Returns the set of triangles adjacent to a given vertex. More...
 
const helper::vector< TrianglesAroundVertex > & getTrianglesAroundVertexArray ()
 Returns the TrianglesAroundVertex array (i.e. provide the triangles indices adjacent to each vertex). More...
 
const EdgesInTrianglegetEdgesInTriangle (TriangleID i) override
 Returns the set of 3 edge indices of a given triangle. More...
 
const helper::vector< EdgesInTriangle > & getEdgesInTriangleArray ()
 Returns the EdgesInTriangle array (i.e. provide the 3 edge indices for each triangle). More...
 
const TrianglesAroundEdgegetTrianglesAroundEdge (EdgeID i) override
 Returns the set of triangle adjacent to a given edge. More...
 
const helper::vector< TrianglesAroundEdge > & getTrianglesAroundEdgeArray ()
 Returns the TrianglesAroundEdge array (i.e. provide the triangles indices adjacent to each edge). More...
 
neighbors queries for Quad Topology

Returns the set of quad adjacent to a given vertex.

const QuadsAroundVertexgetQuadsAroundVertex (PointID i) override
 Returns the set of quads adjacent to a given vertex. More...
 
const helper::vector< QuadsAroundVertex > & getQuadsAroundVertexArray ()
 Returns the QuadsAroundVertex array (i.e. provide the quad indices adjacent to each vertex). More...
 
const EdgesInQuadgetEdgesInQuad (QuadID i) override
 Returns the set of edges adjacent to a given quad. More...
 
const helper::vector< EdgesInQuad > & getEdgesInQuadArray ()
 Returns the EdgesInQuadArray array (i.e. provide the 4 edge indices for each quad) More...
 
const QuadsAroundEdgegetQuadsAroundEdge (EdgeID i) override
 Returns the set of quad adjacent to a given edge. More...
 
const helper::vector< QuadsAroundEdge > & getQuadsAroundEdgeArray ()
 Returns the QuadsAroundEdge array (i.e. provide the quad indices adjacent to each edge). More...
 
neighbors queries for Tetrahedron Topology

Returns the set of tetrahedra adjacent to a given vertex.

const TetrahedraAroundVertexgetTetrahedraAroundVertex (PointID i) override
 Returns the set of tetrahedra adjacent to a given vertex. More...
 
const helper::vector< TetrahedraAroundVertex > & getTetrahedraAroundVertexArray ()
 Returns the TetrahedraAroundVertex array (i.e. provide the tetrahedron indices adjacent to each vertex). More...
 
const EdgesInTetrahedrongetEdgesInTetrahedron (TetraID i) override
 Returns the set of edges adjacent to a given tetrahedron. More...
 
const helper::vector< EdgesInTetrahedron > & getEdgesInTetrahedronArray ()
 Returns the EdgesInTetrahedron array (i.e. provide the 6 edge indices for each tetrahedron). More...
 
const TetrahedraAroundEdgegetTetrahedraAroundEdge (EdgeID i) override
 Returns the set of tetrahedra adjacent to a given edge. More...
 
const helper::vector< TetrahedraAroundEdge > & getTetrahedraAroundEdgeArray ()
 Returns the TetrahedraAroundEdge array (i.e. provide the tetrahedron indices adjacent to each edge). More...
 
const TrianglesInTetrahedrongetTrianglesInTetrahedron (TetraID i) override
 Returns the set of triangles adjacent to a given tetrahedron. More...
 
const helper::vector< TrianglesInTetrahedron > & getTrianglesInTetrahedronArray ()
 Returns the TrianglesInTetrahedron array (i.e. provide the 4 triangle indices for each tetrahedron). More...
 
const TetrahedraAroundTrianglegetTetrahedraAroundTriangle (TriangleID i) override
 Returns the set of tetrahedra adjacent to a given triangle. More...
 
const helper::vector< TetrahedraAroundTriangle > & getTetrahedraAroundTriangleArray ()
 Returns the TetrahedraAroundTriangle array (i.e. provide the tetrahedron indices adjacent to each triangle). More...
 
neighbors queries for Hexhaedron Topology

Returns the set of hexahedra adjacent to a given vertex.

const HexahedraAroundVertexgetHexahedraAroundVertex (PointID i) override
 Returns the set of hexahedra adjacent to a given vertex. More...
 
const helper::vector< HexahedraAroundVertex > & getHexahedraAroundVertexArray ()
 Returns the HexahedraAroundVertex array (i.e. provide the hexahedron indices adjacent to each vertex). More...
 
const EdgesInHexahedrongetEdgesInHexahedron (HexaID i) override
 Returns the set of edges adjacent to a given hexahedron. More...
 
const helper::vector< EdgesInHexahedron > & getEdgesInHexahedronArray ()
 Returns the EdgesInHexahedron array (i.e. provide the 12 edge indices for each hexahedron). More...
 
const HexahedraAroundEdgegetHexahedraAroundEdge (EdgeID i) override
 Returns the set of hexahedra adjacent to a given edge. More...
 
const helper::vector< HexahedraAroundEdge > & getHexahedraAroundEdgeArray ()
 Returns the HexahedraAroundEdge array (i.e. provide the hexahedron indices adjacent to each edge). More...
 
const QuadsInHexahedrongetQuadsInHexahedron (HexaID i) override
 Returns the set of quads adjacent to a given hexahedron. More...
 
const helper::vector< QuadsInHexahedron > & getQuadsInHexahedronArray ()
 Returns the QuadsInHexahedron array (i.e. provide the 8 quad indices for each hexahedron). More...
 
const HexahedraAroundQuadgetHexahedraAroundQuad (QuadID i) override
 Returns the set of hexahedra adjacent to a given quad. More...
 
const helper::vector< HexahedraAroundQuad > & getHexahedraAroundQuadArray ()
 Returns the HexahedraAroundQuad array (i.e. provide the hexahedron indices adjacent to each quad). 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...
 
virtual const helper::vector< unsigned intgetConnectedElement (unsigned int elem) override
 Returns the set of element indices connected to an input one (i.e. which can be reached by topological links) More...
 
virtual const helper::vector< unsigned intgetElementAroundElement (unsigned int elem) override
 Returns the set of element indices adjacent to a given element (i.e. sharing a link) More...
 
virtual const helper::vector< unsigned intgetElementAroundElements (helper::vector< unsigned int > 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::core::topology::BaseMeshTopology
 SOFA_ABSTRACT_CLASS (BaseMeshTopology, core::topology::Topology)
 
void init () override
 Initialization method called at graph creation and modification, during top-down traversal. More...
 
virtual bool load (const char *filename)
 
virtual std::string getFilename () const
 
virtual int getEdgeIndexInTetrahedron (const EdgesInTetrahedron &t, EdgeID edgeIndex) const
 
virtual int getEdgeIndexInHexahedron (const EdgesInHexahedron &t, EdgeID edgeIndex) const
 
virtual Triangle getLocalTrianglesInTetrahedron (const PointID i) const
 Returns for each index (between 0 and 3) the three local vertices indices that are adjacent to that triangle. More...
 
virtual Quad getLocalQuadsInHexahedron (const PointID i) const
 Returns for each index (between 0 and 6) the four vertices indices that are adjacent to that quad. More...
 
virtual const sofa::helper::vector< TriangleID > & getTrianglesOnBorder ()
 Returns the set of triangles on the border of the triangulation. More...
 
virtual const sofa::helper::vector< EdgeID > & getEdgesOnBorder ()
 Returns the set of edges on the border of the triangulation. More...
 
virtual const sofa::helper::vector< PointID > & getPointsOnBorder ()
 Returns the set of points on the border of the triangulation. More...
 
bool insertInNode (objectmodel::BaseNode *node) override
 
bool removeInNode (objectmodel::BaseNode *node) override
 
virtual size_t getNbTetras ()
 
virtual size_t getNbHexas ()
 
virtual Tetra getTetra (TetraID i)
 
virtual Hexa getHexa (HexaID i)
 
virtual const SeqTetrahedragetTetras ()
 
virtual const SeqHexahedragetHexas ()
 
virtual const VerticesAroundVertex getVerticesAroundVertex (PointID i)
 Returns the set of vertices adjacent to a given vertex (i.e. sharing an edge) More...
 
const SeqLinesgetLines ()
 
size_t getNbLines ()
 
Line getLine (LineID i)
 
bool hasPos () const override
 
SReal getPX (int) const override
 
SReal getPY (int) const override
 
SReal getPZ (int) const override
 
void addLine (int a, int b)
 
virtual std::list< const TopologyChange * >::const_iterator beginChange () const
 Provides an iterator on the first element in the list of TopologyChange objects. More...
 
virtual std::list< const TopologyChange * >::const_iterator endChange () const
 Provides an iterator on the last element in the list of TopologyChange objects. More...
 
virtual std::list< const TopologyChange * >::const_iterator beginStateChange () const
 Provides an iterator on the first element in the list of StateChange objects. More...
 
virtual std::list< const TopologyChange * >::const_iterator endStateChange () const
 Provides an iterator on the last element in the list of StateChange objects. More...
 
virtual void addTopologyEngine (TopologyEngine *_topologyEngine)
 Adds a TopologyEngine to the list. More...
 
virtual std::list< TopologyEngine * >::const_iterator beginTopologyEngine () const
 Provides an iterator on the first element in the list of TopologyEngine objects. More...
 
virtual std::list< TopologyEngine * >::const_iterator endTopologyEngine () const
 Provides an iterator on the last element in the list of TopologyEngine objects. More...
 
- Public Member Functions inherited from sofa::core::topology::Topology
 SOFA_CLASS (Topology, core::objectmodel::BaseObject)
 
bool insertInNode (objectmodel::BaseNode *node) override
 
bool removeInNode (objectmodel::BaseNode *node) override
 
- Public Member Functions inherited from sofa::core::objectmodel::BaseObject
 SOFA_CLASS (BaseObject, Base)
 
virtual void computeBBox (const core::ExecParams *, bool=false)
 
void setSrc (const std::string &v, std::vector< std::string > *attributeList=nullptr)
 Sets a source Object and parses it to collect dependent Data. More...
 
void setSrc (const std::string &v, const BaseObject *loader, std::vector< std::string > *attributeList=nullptr)
 
void * findLinkDestClass (const BaseClass *destType, const std::string &path, const BaseLink *link) override
 
virtual std::string getPathName () const
 Return the full path name of this object. More...
 
template<class T >
T::SPtr searchLocal () const
 Local search of an object of the given type. More...
 
template<class T >
T::SPtr searchUp () const
 Upward search of an object of the given type, starting from the local context. More...
 
template<class T >
T::SPtr searchDown () const
 Downward search of an object of the given type, starting from the local context. More...
 
template<class T >
T::SPtr searchFromRoot () const
 
template<class T >
T::SPtr searchInParents () const
 
template<class T >
helper::vector< typename T::SPtr > searchAllLocal () const
 Local search of all objects of the given type. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllUp () const
 Upward search of all objects of the given type, starting from the local context. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllDown () const
 Downward search of all objects of the given type, starting from the local context. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllFromRoot () const
 Search of all objects of the given type, starting from the root. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllInParents () const
 
template<class T >
helper::vector< typename T::SPtr > searchAllLocal (const Tag &t) const
 Local search of all objects of the given type with a given Tag. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllUp (const Tag &t) const
 Upward search of all objects of the given type with a given Tag, starting from the local context. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllDown (const Tag &t) const
 Downward search of all objects of the given typee with a given Tag, starting from the local context. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllFromRoot (const Tag &t) const
 Search of all objects of the given typee with a given Tag, starting from the root. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllInParents (const Tag &t) const
 
template<class T >
helper::vector< typename T::SPtr > searchAllLocal (const TagSet &t) const
 Local search of all objects of the given type with a given TagSet. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllUp (const TagSet &t) const
 Upward search of all objects of the given type with a given TagSet, starting from the local context. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllDown (const TagSet &t) const
 Downward search of all objects of the given typee with a given TagSet, starting from the local context. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllFromRoot (const TagSet &t) const
 Search of all objects of the given typee with a given TagSet, starting from the root. More...
 
template<class T >
helper::vector< typename T::SPtr > searchAllInParents (const TagSet &t) const
 
SReal getTime () const
 Current time. More...
 
const BaseContextgetContext () const
 
BaseContextgetContext ()
 
const BaseObjectgetMaster () const
 
BaseObjectgetMaster ()
 
const VecSlavesgetSlaves () const
 
BaseObjectgetSlave (const std::string &name) const
 
virtual void addSlave (BaseObject::SPtr s)
 
virtual void removeSlave (BaseObject::SPtr s)
 
void copyAspect (int destAspect, int srcAspect) override
 Copy the source aspect to the destination aspect for each Data in the component. More...
 
void releaseAspect (int aspect) override
 Release memory allocated for the specified aspect. More...
 
virtual void handleEvent (Event *)
 Handle an event. More...
 
virtual void handleTopologyChange ()
 
virtual void handleTopologyChange (core::topology::Topology *t)
 
void parse (BaseObjectDescription *arg) override
 Parse the given description to assign values to this object's fields and potentially other parameters. More...
 
virtual void bwdInit ()
 Initialization method called at graph creation and modification, during bottom-up traversal. More...
 
virtual void reinit ()
 Update method called when variables used in precomputation are modified. More...
 
void updateInternal ()
 Update method called when variables (used to compute other internal variables) are modified. More...
 
virtual void storeResetState ()
 Save the initial state for later uses in reset() More...
 
virtual void reset ()
 Reset to initial state. More...
 
virtual void cleanup ()
 
- Public Member Functions inherited from sofa::core::objectmodel::Base
virtual const BaseClassgetClass () const
 
const std::string & getName () const
 Accessor to the object name. More...
 
void setName (const std::string &n)
 Set the name of this object. More...
 
void setName (const std::string &n, int counter)
 Set the name of this object, adding an integer counter. More...
 
virtual std::string getTypeName () const
 Get the type name of this object (i.e. class and template types) More...
 
virtual std::string getClassName () const
 Get the class name of this object. More...
 
virtual std::string getTemplateName () const
 Get the template type names (if any) used to instantiate this object. More...
 
void setDefinitionSourceFileName (const std::string &sourceFileName)
 Set the source filename (where the component is implemented) More...
 
const std::string & getDefinitionSourceFileName () const
 Get the source filename (where the component is implemented) More...
 
void setDefinitionSourceFilePos (const int)
 Set the source location (where the component is implemented) More...
 
int getDefinitionSourceFilePos () const
 Get the source location (where the component is implemented) More...
 
void setInstanciationSourceFileName (const std::string &sourceFileName)
 
const std::string & getInstanciationSourceFileName () const
 
void setInstanciationSourceFilePos (const int)
 
int getInstanciationSourceFilePos () const
 
const std::string getWarnings () const
 
const std::string getOutputs () const
 use getLoggedMessageAsString() or getLoggedMessage instead. More...
 
void clearWarnings ()
 use getLoggedMessageAsString() or getLoggedMessage instead. More...
 
void clearOutputs ()
 use clearLoggedMessages() instead More...
 
void processStream (std::ostream &out)
 use clearLoggedMessages() instead More...
 
void addMessage (const sofa::helper::logging::Message &m) const
 
size_t countLoggedMessages (sofa::helper::logging::Message::TypeSet t=sofa::helper::logging::Message::AnyTypes) const
 
const std::deque< sofa::helper::logging::Message > & getLoggedMessages () const
 
const std::string getLoggedMessagesAsString (sofa::helper::logging::Message::TypeSet t=sofa::helper::logging::Message::AnyTypes) const
 
void clearLoggedMessages () const
 
bool notMuted () const
 
const sofa::core::objectmodel::TagSetgetTags () const
 Represents the subsets the object belongs to. More...
 
bool hasTag (Tag t) const
 Return true if the object belong to the given subset. More...
 
void addTag (Tag t)
 Add a subset qualification to the object. More...
 
void removeTag (Tag t)
 Remove a subset qualification to the object. More...
 
ComponentState getComponentState () const
 
bool isComponentStateValid () const
 
virtual bool parseField (const std::string &attribute, const std::string &value)
 Assign one field value (Data or Link) More...
 
virtual bool hasField (const std::string &attribute) const
 Check if a given Data field or Link exists. More...
 
void parseFields (const std::list< std::string > &str)
 Assign the field values stored in the given list of name + value pairs of strings. More...
 
virtual void parseFields (const std::map< std::string, std::string * > &str)
 Assign the field values stored in the given map of name -> value pairs. More...
 
void writeDatas (std::map< std::string, std::string * > &str)
 Write the current field values to the given map of name -> value pairs. More...
 
void writeDatas (std::ostream &out, const std::string &separator=" ")
 
BaseDatafindData (const std::string &name) const
 
std::vector< BaseData * > findGlobalField (const std::string &name) const
 Find data fields given a name: several can be found as we look into the alias map. More...
 
BaseLinkfindLink (const std::string &name) const
 
std::vector< BaseLink * > findLinks (const std::string &name) const
 Find link fields given a name: several can be found as we look into the alias map. More...
 
virtual void updateLinks (bool logErrors=true)
 Update pointers in case the pointed-to objects have appeared. More...
 
template<class T >
BaseData::BaseInitData initData (Data< T > *field, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 Helper method used to initialize a data field containing a value of type T. More...
 
template<class T >
Data< T >::InitData initData (Data< T > *field, const T &value, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 Helper method used to initialize a data field containing a value of type T. More...
 
void addData (BaseData *f, const std::string &name)
 
void addData (BaseData *f)
 
void removeData (BaseData *f)
 Remove a data field. More...
 
void addAlias (BaseData *field, const char *alias)
 Add an alias to a Data. More...
 
void addLink (BaseLink *l)
 Add a link. More...
 
void removeLink (BaseLink *l)
 Remove a link. More...
 
void addAlias (BaseLink *link, const char *alias)
 Add an alias to a Link. More...
 
const VecDatagetDataFields () const
 Accessor to the vector containing all the fields of this object. More...
 
const MapDatagetDataAliases () const
 Accessor to the map containing all the aliases of this object. More...
 
const VecLinkgetLinks () const
 Accessor to the vector containing all the fields of this object. More...
 
const MapLinkgetLinkAliases () const
 Accessor to the map containing all the aliases of this object. More...
 
virtual bool findDataLinkDest (BaseData *&ptr, const std::string &path, const BaseLink *link)
 
template<class T >
bool findLinkDest (T *&ptr, const std::string &path, const BaseLink *link)
 

Protected Member Functions

 MeshTopology ()
 
void createEdgesAroundVertexArray ()
 Creates the EdgeSetIndex. More...
 
void createEdgesInTriangleArray ()
 Creates the array of edge indices for each triangle. More...
 
void createEdgesInQuadArray ()
 Creates the array of edge indices for each quad. More...
 
void createEdgesInTetrahedronArray ()
 Creates the array of edge indices for each tetrahedron. More...
 
void createEdgesInHexahedronArray ()
 Creates the array of edge indices for each hexahedron. More...
 
void createTrianglesAroundVertexArray ()
 Creates the TrianglesAroundVertex Array. More...
 
void createOrientedTrianglesAroundVertexArray ()
 Creates the oriented Triangle Vertex Shell Array. More...
 
void createTrianglesAroundEdgeArray ()
 Creates the TrianglesAroundEdge Array. More...
 
void createTrianglesInTetrahedronArray ()
 Creates the array of triangle indices for each tetrahedron. More...
 
void createQuadsAroundVertexArray ()
 Creates the QuadsAroundVertex Array. More...
 
void createOrientedQuadsAroundVertexArray ()
 Creates the Quad Vertex Shell Array. More...
 
void createQuadsAroundEdgeArray ()
 Creates the quadsAroundEdge Array. More...
 
void createQuadsInHexahedronArray ()
 Creates the array of quad indices for each hexahedron. More...
 
void createTetrahedraAroundVertexArray ()
 Creates the TetrahedraAroundVertex Array. More...
 
void createTetrahedraAroundEdgeArray ()
 Creates the TetrahedraAroundEdge Array. More...
 
void createTetrahedraAroundTriangleArray ()
 Creates the TetrahedraAroundTriangle Array. More...
 
void createHexahedraAroundVertexArray ()
 Creates the HexahedraAroundVertex Array. More...
 
void createHexahedraAroundEdgeArray ()
 Creates the HexahedraAroundEdge Array. More...
 
void createHexahedraAroundQuadArray ()
 Creates the HexahedraAroundQuad Array. More...
 
- Protected Member Functions inherited from sofa::core::topology::BaseMeshTopology
 BaseMeshTopology ()
 
- Protected Member Functions inherited from sofa::core::topology::Topology
 Topology ()
 
 ~Topology () override
 
- Protected Member Functions inherited from sofa::core::objectmodel::BaseObject
 BaseObject ()
 
 ~BaseObject () override
 
virtual void doUpdateInternal ()
 Implementation of the internal update. More...
 
void changeContextLink (BaseContext *before, BaseContext *&after)
 
void changeSlavesLink (BaseObject::SPtr ptr, unsigned int, bool add)
 This method insures that slaves objects have master and context links set correctly. More...
 
void trackInternalData (const BaseData &data)
 Method called to add the Data to the DataTracker (listing the Data to track) More...
 
void cleanTracker ()
 
bool hasDataChanged (const BaseData &data)
 Method called to know if a tracked Data has changed. More...
 
- Protected Member Functions inherited from sofa::core::objectmodel::Base
 Base ()
 
virtual ~Base ()
 
void initData0 (BaseData *field, BaseData::BaseInitData &res, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 Helper method used by initData() More...
 
void initData0 (BaseData *field, BaseData::BaseInitData &res, const char *name, const char *help, BaseData::DataFlags dataFlags)
 Helper method used by initData() More...
 
template<class T >
void initData0 (Data< T > *field, typename Data< T >::InitData &res, const T &value, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 Helper method used by initData() More...
 

Additional Inherited Members

- Static Public Attributes inherited from sofa::core::topology::BaseMeshTopology
static EdgesInTriangle InvalidEdgesInTriangles
 
static EdgesInQuad InvalidEdgesInQuad
 
static TrianglesInTetrahedron InvalidTrianglesInTetrahedron
 
static EdgesInTetrahedron InvalidEdgesInTetrahedron
 
static QuadsInHexahedron InvalidQuadsInHexahedron
 
static EdgesInHexahedron InvalidEdgesInHexahedron
 
- Static Public Attributes inherited from sofa::core::topology::Topology
static const sofa::helper::vector< Topology::index_typeInvalidSet
 
static const Edge InvalidEdge
 
static const Triangle InvalidTriangle
 
static const Quad InvalidQuad
 
static const Tetrahedron InvalidTetrahedron
 
static const Pyramid InvalidPyramid
 
static const Pentahedron InvalidPentahedron
 
static const Hexahedron InvalidHexahedron
 
- Static Public Member Functions inherited from sofa::core::objectmodel::BaseObject
template<class T >
static bool canCreate (T *, BaseContext *, BaseObjectDescription *)
 Pre-construction check method called by ObjectFactory. More...
 
template<class T >
static T::SPtr create (T *, BaseContext *context, BaseObjectDescription *arg)
 Construction method called by ObjectFactory. More...
 
- Static Public Member Functions inherited from sofa::core::objectmodel::Base
static const MyClassGetClass ()
 
template<class T >
static void dynamicCast (T *&ptr, Base *b)
 
template<class T >
static std::string typeName (const T *ptr=nullptr)
 
template<class T >
static std::string className (const T *ptr=nullptr)
 
template<class T >
static std::string namespaceName (const T *ptr=nullptr)
 
template<class T >
static std::string templateName (const T *ptr=nullptr)
 
template<class T >
static std::string shortName (const T *ptr=nullptr, BaseObjectDescription *=nullptr)
 

Attribute details

Data< bool > sofa::component::topology::MeshTopology::_drawEdges

if true, draw the topology Edges

Data< bool > sofa::component::topology::MeshTopology::_drawHexa

if true, draw the topology hexahedra

Data< bool > sofa::component::topology::MeshTopology::_drawQuads

if true, draw the topology Quads

Data< bool > sofa::component::topology::MeshTopology::_drawTetra

if true, draw the topology Tetrahedra

Data< bool > sofa::component::topology::MeshTopology::_drawTriangles

if true, draw the topology Triangles

helper::vector< EdgesAroundVertex > sofa::component::topology::MeshTopology::m_edgesAroundVertex
protected

the array that stores the set of edge-vertex shells, ie for each vertex gives the set of adjacent edges

helper::vector< EdgesInHexahedron > sofa::component::topology::MeshTopology::m_edgesInHexahedron
protected

provides the set of edges for each hexahedron

helper::vector< EdgesInQuad > sofa::component::topology::MeshTopology::m_edgesInQuad
protected

provides the 4 edges in each quad

helper::vector< EdgesInTetrahedron > sofa::component::topology::MeshTopology::m_edgesInTetrahedron
protected

provides the set of edges for each tetrahedron

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

the array that stores the set of edge-triangle shells, ie for each triangle gives the 3 adjacent edges

helper::vector< HexahedraAroundEdge > sofa::component::topology::MeshTopology::m_hexahedraAroundEdge
protected

for each edge provides the set of tetrahedra adjacent to that edge

helper::vector< HexahedraAroundQuad > sofa::component::topology::MeshTopology::m_hexahedraAroundQuad
protected

for each quad provides the set of hexahedrons adjacent to that quad

helper::vector< HexahedraAroundVertex > sofa::component::topology::MeshTopology::m_hexahedraAroundVertex
protected

provides the set of hexahedrons for each vertex

helper::vector< EdgesAroundVertex > sofa::component::topology::MeshTopology::m_orientedEdgesAroundVertex
protected

the array that stores the set of oriented edge-vertex shells, ie for each vertex gives the set of adjacent edges

helper::vector< QuadsAroundVertex > sofa::component::topology::MeshTopology::m_orientedQuadsAroundVertex
protected

for each vertex provides the set of oriented quads adjacent to that vertex

helper::vector< TrianglesAroundVertex > sofa::component::topology::MeshTopology::m_orientedTrianglesAroundVertex
protected

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

helper::vector< QuadsAroundEdge > sofa::component::topology::MeshTopology::m_quadsAroundEdge
protected

for each edge provides the set of quads adjacent to that edge

helper::vector< QuadsAroundVertex > sofa::component::topology::MeshTopology::m_quadsAroundVertex
protected

for each vertex provides the set of quads adjacent to that vertex

helper::vector< QuadsInHexahedron > sofa::component::topology::MeshTopology::m_quadsInHexahedron
protected

provides the set of quads adjacents to each hexahedron

helper::vector< TetrahedraAroundEdge > sofa::component::topology::MeshTopology::m_tetrahedraAroundEdge
protected

for each edge provides the set of tetrahedra adjacent to that edge

helper::vector< TetrahedraAroundTriangle > sofa::component::topology::MeshTopology::m_tetrahedraAroundTriangle
protected

for each triangle provides the set of tetrahedrons adjacent to that triangle

helper::vector< TetrahedraAroundVertex> sofa::component::topology::MeshTopology::m_tetrahedraAroundVertex
protected

provides the set of tetrahedrons adjacents to each vertex

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

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

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

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

helper::vector< TrianglesInTetrahedron > sofa::component::topology::MeshTopology::m_trianglesInTetrahedron
protected

provides the set of triangles adjacent to each tetrahedron

int sofa::component::topology::MeshTopology::nbPoints
protected
int sofa::component::topology::MeshTopology::revision
Data<SeqEdges> sofa::component::topology::MeshTopology::seqEdges

List of edge indices.

Data<SeqHexahedra> sofa::component::topology::MeshTopology::seqHexahedra

List of hexahedron indices.

Data< SeqPoints > sofa::component::topology::MeshTopology::seqPoints

List of point positions.

Data<SeqQuads> sofa::component::topology::MeshTopology::seqQuads

List of quad indices.

Data<SeqTetrahedra> sofa::component::topology::MeshTopology::seqTetrahedra

List of tetrahedron indices.

Data<SeqTriangles> sofa::component::topology::MeshTopology::seqTriangles

List of triangle indices.

Data<SeqUV> sofa::component::topology::MeshTopology::seqUVs

List of uv coordinates.

sofa::core::topology::TopologyObjectType sofa::component::topology::MeshTopology::UpperTopology
protected
bool sofa::component::topology::MeshTopology::validHexahedra
protected
bool sofa::component::topology::MeshTopology::validTetrahedra
protected

Constructor details

sofa::component::topology::MeshTopology::MeshTopology ( )
protected

Function details

void sofa::component::topology::MeshTopology::addEdge ( int  a,
int  b 
)
overridevirtual
void sofa::component::topology::MeshTopology::addHexa ( int  a,
int  b,
int  c,
int  d,
int  e,
int  f,
int  g,
int  h 
)
overridevirtual
void sofa::component::topology::MeshTopology::addPoint ( SReal  px,
SReal  py,
SReal  pz 
)
overridevirtual
void sofa::component::topology::MeshTopology::addQuad ( int  a,
int  b,
int  c,
int  d 
)
overridevirtual
void sofa::component::topology::MeshTopology::addTetra ( int  a,
int  b,
int  c,
int  d 
)
overridevirtual
void sofa::component::topology::MeshTopology::addTriangle ( int  a,
int  b,
int  c 
)
overridevirtual
void sofa::component::topology::MeshTopology::addUV ( SReal  u,
SReal  v 
)
bool sofa::component::topology::MeshTopology::checkConnexity ( )
overridevirtual

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

Reimplemented from sofa::core::topology::BaseMeshTopology.

void sofa::component::topology::MeshTopology::clear ( )
overridevirtual

Procedural creation methods

Reimplemented from sofa::core::topology::BaseMeshTopology.

int sofa::component::topology::MeshTopology::computeRelativeOrientationInQuad ( const unsigned int  ind_p0,
const unsigned int  ind_p1,
const unsigned int  ind_q 
)
int sofa::component::topology::MeshTopology::computeRelativeOrientationInTri ( const unsigned int  ind_p0,
const unsigned int  ind_p1,
const unsigned int  ind_t 
)
void sofa::component::topology::MeshTopology::createEdgesAroundVertexArray ( )
protected

Creates the EdgeSetIndex.

This function is only called if the EdgesAroundVertex member is required. m_edgesAroundVertex[i] contains the indices of all edges having the ith DOF as one of their ends.

void sofa::component::topology::MeshTopology::createEdgesInHexahedronArray ( )
protected

Creates the array of edge indices for each hexahedron.

This function is only called if the EdgesInHexahedron array is required. m_edgesInHexahedron[i] contains the 12 indices of the 12 edges of each hexahedron.

void sofa::component::topology::MeshTopology::createEdgesInQuadArray ( )
protected

Creates the array of edge indices for each quad.

This function is only called if the EdgesInQuad array is required. m_edgesInQuad[i] contains the 4 indices of the 4 edges composing the ith quad.

void sofa::component::topology::MeshTopology::createEdgesInTetrahedronArray ( )
protected

Creates the array of edge indices for each tetrahedron.

This function is only called if the EdgesInTetrahedrone array is required. m_edgesInTetrahedron[i] contains the 6 indices of the 6 edges of each tetrahedron The number of each edge is the following : edge 0 links vertex 0 and 1, edge 1 links vertex 0 and 2, edge 2 links vertex 0 and 3, edge 3 links vertex 1 and 2, edge 4 links vertex 1 and 3, edge 5 links vertex 2 and 3

void sofa::component::topology::MeshTopology::createEdgesInTriangleArray ( )
protected

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::MeshTopology::createHexahedraAroundEdgeArray ( )
protected

Creates the HexahedraAroundEdge Array.

This function is only called if the HexahedraAroundEdge array is required. m_hexahedraAroundEdge[i] contains the indices of all hexahedra adjacent to the ith edge.

void sofa::component::topology::MeshTopology::createHexahedraAroundQuadArray ( )
protected

Creates the HexahedraAroundQuad Array.

This function is only called if the HexahedraAroundQuad array is required. m_hexahedraAroundQuad[i] contains the indices of all hexahedra adjacent to the ith quad.

void sofa::component::topology::MeshTopology::createHexahedraAroundVertexArray ( )
protected

Creates the HexahedraAroundVertex Array.

This function is only called if the HexahedraAroundVertex array is required. m_hexahedraAroundVertex[i] contains the indices of all hexahedra adjacent to the ith vertex.

void sofa::component::topology::MeshTopology::createOrientedQuadsAroundVertexArray ( )
protected

Creates the Quad Vertex Shell Array.

This function is only called if the QuadsAroundVertex array is required. m_quadsAroundVertex[i] contains the indices of all quads adjacent to the ith vertex

void sofa::component::topology::MeshTopology::createOrientedTrianglesAroundVertexArray ( )
protected

Creates the oriented Triangle Vertex Shell Array.

This function is only called if the OrientedTrianglesAroundVertex array is required. m_orientedTrianglesAroundVertex[i] contains the indices of all triangles adjacent to the ith vertex

void sofa::component::topology::MeshTopology::createQuadsAroundEdgeArray ( )
protected

Creates the quadsAroundEdge Array.

This function is only called if the QuadsAroundVertex array is required. m_quadsAroundEdge[i] contains the indices of all quads adjacent to the ith edge

void sofa::component::topology::MeshTopology::createQuadsAroundVertexArray ( )
protected

Creates the QuadsAroundVertex Array.

This function is only called if the QuadsAroundVertex array is required. m_quadsAroundVertex[i] contains the indices of all quads adjacent to the ith vertex.

void sofa::component::topology::MeshTopology::createQuadsInHexahedronArray ( )
protected

Creates the array of quad indices for each hexahedron.

This function is only called if the QuadsInHexahedron array is required. m_quadsInHexahedron[i] contains the 6 indices of the 6 quads of each hexahedron.

void sofa::component::topology::MeshTopology::createTetrahedraAroundEdgeArray ( )
protected

Creates the TetrahedraAroundEdge Array.

This function is only called if the TetrahedraAroundEdge array is required. m_tetrahedraAroundEdge[i] contains the indices of all tetrahedra adjacent to the ith edge.

void sofa::component::topology::MeshTopology::createTetrahedraAroundTriangleArray ( )
protected

Creates the TetrahedraAroundTriangle Array.

This function is only called if the TetrahedraAroundTriangle array is required. m_tetrahedraAroundTriangle[i] contains the indices of all tetrahedra adjacent to the ith triangle.

void sofa::component::topology::MeshTopology::createTetrahedraAroundVertexArray ( )
protected

Creates the TetrahedraAroundVertex Array.

This function is only called if the TetrahedraAroundVertex array is required. m_tetrahedraAroundVertex[i] contains the indices of all tetrahedra adjacent to the ith vertex.

void sofa::component::topology::MeshTopology::createTrianglesAroundEdgeArray ( )
protected

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::MeshTopology::createTrianglesAroundVertexArray ( )
protected

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::MeshTopology::createTrianglesInTetrahedronArray ( )
protected

Creates the array of triangle indices for each tetrahedron.

This function is only called if the TrianglesInTetrahedron array is required. m_trianglesInTetrahedron[i] contains the 4 indices of the 4 triangles composing the ith tetrahedron.

void sofa::component::topology::MeshTopology::draw ( const core::visual::VisualParams )
overridevirtual

Render internal data of this object, for debugging purposes.

Reimplemented from sofa::core::objectmodel::BaseObject.

const sofa::helper::vector< unsigned int > sofa::component::topology::MeshTopology::getConnectedElement ( unsigned int  elem)
overridevirtual

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

Reimplemented from sofa::core::topology::BaseMeshTopology.

const MeshTopology::Edge sofa::component::topology::MeshTopology::getEdge ( EdgeID  i)
overridevirtual
core::topology::Topology::EdgeID sofa::component::topology::MeshTopology::getEdgeIndex ( PointID  v1,
PointID  v2 
)
overridevirtual

Returns the index of the edge joining vertex v1 and vertex v2; returns InvalidID if no edge exists.

Reimplemented from sofa::core::topology::BaseMeshTopology.

int sofa::component::topology::MeshTopology::getEdgeIndexInHexahedron ( const EdgesInHexahedron t,
EdgeID  edgeIndex 
) const
override

Returns the index (either 0, 1 ,2 ,3, 4, 5, 6, 7, 8, 9, 10, 11) of the edge whose global index is edgeIndex. Returns -1 if none.

int sofa::component::topology::MeshTopology::getEdgeIndexInQuad ( const EdgesInQuad t,
EdgeID  edgeIndex 
) const
overridevirtual

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

Reimplemented from sofa::core::topology::BaseMeshTopology.

int sofa::component::topology::MeshTopology::getEdgeIndexInTetrahedron ( const EdgesInTetrahedron t,
EdgeID  edgeIndex 
) const
override

Returns the index (either 0, 1 ,2 ,3, 4, 5) of the edge whose global index is edgeIndex. Returns -1 if none.

int sofa::component::topology::MeshTopology::getEdgeIndexInTriangle ( const EdgesInTriangle t,
EdgeID  edgeIndex 
) const
overridevirtual

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

Reimplemented from sofa::core::topology::BaseMeshTopology.

const MeshTopology::SeqEdges & sofa::component::topology::MeshTopology::getEdges ( )
overridevirtual

Complete sequence accessors

Implements sofa::core::topology::BaseMeshTopology.

const MeshTopology::EdgesAroundVertex & sofa::component::topology::MeshTopology::getEdgesAroundVertex ( PointID  i)
overridevirtual

Returns the set of edges adjacent to a given vertex.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::EdgesAroundVertex > & sofa::component::topology::MeshTopology::getEdgesAroundVertexArray ( )

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

const MeshTopology::EdgesInHexahedron & sofa::component::topology::MeshTopology::getEdgesInHexahedron ( HexaID  i)
overridevirtual

Returns the set of edges adjacent to a given hexahedron.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::EdgesInHexahedron > & sofa::component::topology::MeshTopology::getEdgesInHexahedronArray ( )

Returns the EdgesInHexahedron array (i.e. provide the 12 edge indices for each hexahedron).

const MeshTopology::EdgesInQuad & sofa::component::topology::MeshTopology::getEdgesInQuad ( QuadID  i)
overridevirtual

Returns the set of edges adjacent to a given quad.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::EdgesInQuad > & sofa::component::topology::MeshTopology::getEdgesInQuadArray ( )

Returns the EdgesInQuadArray array (i.e. provide the 4 edge indices for each quad)

const MeshTopology::EdgesInTetrahedron & sofa::component::topology::MeshTopology::getEdgesInTetrahedron ( TetraID  i)
overridevirtual

Returns the set of edges adjacent to a given tetrahedron.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::EdgesInTetrahedron > & sofa::component::topology::MeshTopology::getEdgesInTetrahedronArray ( )

Returns the EdgesInTetrahedron array (i.e. provide the 6 edge indices for each tetrahedron).

const MeshTopology::EdgesInTriangle & sofa::component::topology::MeshTopology::getEdgesInTriangle ( TriangleID  i)
overridevirtual

Returns the set of 3 edge indices of a given triangle.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::EdgesInTriangle > & sofa::component::topology::MeshTopology::getEdgesInTriangleArray ( )

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

const sofa::helper::vector< unsigned int > sofa::component::topology::MeshTopology::getElementAroundElement ( unsigned int  elem)
overridevirtual

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

Reimplemented from sofa::core::topology::BaseMeshTopology.

const sofa::helper::vector< unsigned int > sofa::component::topology::MeshTopology::getElementAroundElements ( helper::vector< unsigned int elems)
overridevirtual

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

Reimplemented from sofa::core::topology::BaseMeshTopology.

const MeshTopology::SeqHexahedra & sofa::component::topology::MeshTopology::getHexahedra ( )
overridevirtual
const MeshTopology::HexahedraAroundEdge & sofa::component::topology::MeshTopology::getHexahedraAroundEdge ( EdgeID  i)
overridevirtual

Returns the set of hexahedra adjacent to a given edge.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::HexahedraAroundEdge > & sofa::component::topology::MeshTopology::getHexahedraAroundEdgeArray ( )

Returns the HexahedraAroundEdge array (i.e. provide the hexahedron indices adjacent to each edge).

const MeshTopology::HexahedraAroundQuad & sofa::component::topology::MeshTopology::getHexahedraAroundQuad ( QuadID  i)
overridevirtual

Returns the set of hexahedra adjacent to a given quad.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::HexahedraAroundQuad > & sofa::component::topology::MeshTopology::getHexahedraAroundQuadArray ( )

Returns the HexahedraAroundQuad array (i.e. provide the hexahedron indices adjacent to each quad).

const MeshTopology::HexahedraAroundVertex & sofa::component::topology::MeshTopology::getHexahedraAroundVertex ( PointID  i)
overridevirtual

Returns the set of hexahedra adjacent to a given vertex.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::HexahedraAroundVertex > & sofa::component::topology::MeshTopology::getHexahedraAroundVertexArray ( )

Returns the HexahedraAroundVertex array (i.e. provide the hexahedron indices adjacent to each vertex).

const MeshTopology::Hexa sofa::component::topology::MeshTopology::getHexahedron ( HexaID  i)
overridevirtual
core::topology::Topology::HexahedronID sofa::component::topology::MeshTopology::getHexahedronIndex ( PointID  v1,
PointID  v2,
PointID  v3,
PointID  v4,
PointID  v5,
PointID  v6,
PointID  v7,
PointID  v8 
)
overridevirtual

Returns the index of the hexahedron given eight vertex indices; returns InvalidID if none.

Reimplemented from sofa::core::topology::BaseMeshTopology.

MeshTopology::Edge sofa::component::topology::MeshTopology::getLocalEdgesInHexahedron ( const unsigned int  i) const
overridevirtual

Returns for each index (between 0 and 12) the two vertex indices that are adjacent to that edge.

Reimplemented from sofa::core::topology::BaseMeshTopology.

MeshTopology::Edge sofa::component::topology::MeshTopology::getLocalEdgesInTetrahedron ( const unsigned int  i) const
overridevirtual

Returns for each index (between 0 and 5) the two vertex indices that are adjacent to that edge.

Reimplemented from sofa::core::topology::BaseMeshTopology.

size_t sofa::component::topology::MeshTopology::getNbEdges ( )
overridevirtual

Random accessors

Reimplemented from sofa::core::topology::BaseMeshTopology.

size_t sofa::component::topology::MeshTopology::getNbHexahedra ( )
overridevirtual
int sofa::component::topology::MeshTopology::getNbPoints ( ) const
overridevirtual
size_t sofa::component::topology::MeshTopology::getNbQuads ( )
overridevirtual
size_t sofa::component::topology::MeshTopology::getNbTetrahedra ( )
overridevirtual
size_t sofa::component::topology::MeshTopology::getNbTriangles ( )
overridevirtual
size_t sofa::component::topology::MeshTopology::getNbUVs ( )
virtual
size_t sofa::component::topology::MeshTopology::getNumberOfConnectedComponent ( )
overridevirtual

Returns the number of connected component.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const MeshTopology::EdgesAroundVertex & sofa::component::topology::MeshTopology::getOrientedEdgesAroundVertex ( PointID  i)
virtual

Returns the set of edges adjacent to a given vertex.

const MeshTopology::QuadsAroundVertex & sofa::component::topology::MeshTopology::getOrientedQuadsAroundVertex ( PointID  i)
virtual

Returns the set of oriented quad adjacent to a given vertex.

const MeshTopology::TrianglesAroundVertex & sofa::component::topology::MeshTopology::getOrientedTrianglesAroundVertex ( PointID  i)
virtual

Returns the set of oriented triangle adjacent to a given vertex.

SReal sofa::component::topology::MeshTopology::getPosX ( int  i) const
SReal sofa::component::topology::MeshTopology::getPosY ( int  i) const
SReal sofa::component::topology::MeshTopology::getPosZ ( int  i) const
SReal sofa::component::topology::MeshTopology::getPX ( int  i) const
overridevirtual

Reimplemented from sofa::core::topology::Topology.

SReal sofa::component::topology::MeshTopology::getPY ( int  i) const
overridevirtual

Reimplemented from sofa::core::topology::Topology.

SReal sofa::component::topology::MeshTopology::getPZ ( int  i) const
overridevirtual

Reimplemented from sofa::core::topology::Topology.

const MeshTopology::Quad sofa::component::topology::MeshTopology::getQuad ( QuadID  i)
overridevirtual
core::topology::Topology::QuadID sofa::component::topology::MeshTopology::getQuadIndex ( PointID  v1,
PointID  v2,
PointID  v3,
PointID  v4 
)
overridevirtual

Returns the index of the quad joining vertex v1, v2, v3 and v4; returns InvalidID if none.

Reimplemented from sofa::core::topology::BaseMeshTopology.

int sofa::component::topology::MeshTopology::getQuadIndexInHexahedron ( const QuadsInHexahedron t,
QuadID  quadIndex 
) const
overridevirtual

Returns the index (either 0, 1 ,2 ,3, 4, 5) of the quad whose global index is quadIndex. Returns -1 if none.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const MeshTopology::SeqQuads & sofa::component::topology::MeshTopology::getQuads ( )
overridevirtual
const vector< MeshTopology::QuadID > & sofa::component::topology::MeshTopology::getQuadsAroundEdge ( EdgeID  i)
overridevirtual

Returns the set of quad adjacent to a given edge.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::QuadsAroundEdge > & sofa::component::topology::MeshTopology::getQuadsAroundEdgeArray ( )

Returns the QuadsAroundEdge array (i.e. provide the quad indices adjacent to each edge).

const MeshTopology::QuadsAroundVertex & sofa::component::topology::MeshTopology::getQuadsAroundVertex ( PointID  i)
overridevirtual

Returns the set of quads adjacent to a given vertex.

Returns the set of quad adjacent to a given vertex.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::QuadsAroundVertex > & sofa::component::topology::MeshTopology::getQuadsAroundVertexArray ( )

Returns the QuadsAroundVertex array (i.e. provide the quad indices adjacent to each vertex).

const MeshTopology::QuadsInHexahedron & sofa::component::topology::MeshTopology::getQuadsInHexahedron ( HexaID  i)
overridevirtual

Returns the set of quads adjacent to a given hexahedron.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::QuadsInHexahedron > & sofa::component::topology::MeshTopology::getQuadsInHexahedronArray ( )

Returns the QuadsInHexahedron array (i.e. provide the 8 quad indices for each hexahedron).

int sofa::component::topology::MeshTopology::getRevision ( ) const
inlineoverridevirtual

get the current revision of this mesh (use to detect changes)

Reimplemented from sofa::core::topology::BaseMeshTopology.

const MeshTopology::SeqTetrahedra & sofa::component::topology::MeshTopology::getTetrahedra ( )
overridevirtual
const MeshTopology::TetrahedraAroundEdge & sofa::component::topology::MeshTopology::getTetrahedraAroundEdge ( EdgeID  i)
overridevirtual

Returns the set of tetrahedra adjacent to a given edge.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::TetrahedraAroundEdge > & sofa::component::topology::MeshTopology::getTetrahedraAroundEdgeArray ( )

Returns the TetrahedraAroundEdge array (i.e. provide the tetrahedron indices adjacent to each edge).

const MeshTopology::TetrahedraAroundTriangle & sofa::component::topology::MeshTopology::getTetrahedraAroundTriangle ( TriangleID  i)
overridevirtual

Returns the set of tetrahedra adjacent to a given triangle.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::TetrahedraAroundTriangle > & sofa::component::topology::MeshTopology::getTetrahedraAroundTriangleArray ( )

Returns the TetrahedraAroundTriangle array (i.e. provide the tetrahedron indices adjacent to each triangle).

const MeshTopology::TetrahedraAroundVertex & sofa::component::topology::MeshTopology::getTetrahedraAroundVertex ( PointID  i)
overridevirtual

Returns the set of tetrahedra adjacent to a given vertex.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::TetrahedraAroundVertex > & sofa::component::topology::MeshTopology::getTetrahedraAroundVertexArray ( )

Returns the TetrahedraAroundVertex array (i.e. provide the tetrahedron indices adjacent to each vertex).

const MeshTopology::Tetra sofa::component::topology::MeshTopology::getTetrahedron ( TetraID  i)
overridevirtual
core::topology::Topology::TetrahedronID sofa::component::topology::MeshTopology::getTetrahedronIndex ( PointID  v1,
PointID  v2,
PointID  v3,
PointID  v4 
)
overridevirtual

Returns the index of the tetrahedron given four vertex indices; returns InvalidID if none.

Reimplemented from sofa::core::topology::BaseMeshTopology.

sofa::core::topology::TopologyObjectType sofa::component::topology::MeshTopology::getTopologyType ( ) const
inlineoverridevirtual

\ brief returns the topologyType

Implements sofa::core::topology::BaseMeshTopology.

const MeshTopology::Triangle sofa::component::topology::MeshTopology::getTriangle ( TriangleID  i)
overridevirtual
core::topology::Topology::TriangleID sofa::component::topology::MeshTopology::getTriangleIndex ( PointID  v1,
PointID  v2,
PointID  v3 
)
overridevirtual

Returns the indices of a triangle given three vertex indices : returns InvalidID if none

Reimplemented from sofa::core::topology::BaseMeshTopology.

int sofa::component::topology::MeshTopology::getTriangleIndexInTetrahedron ( const TrianglesInTetrahedron t,
TriangleID  triangleIndex 
) const
overridevirtual

Returns the index (either 0, 1 ,2 ,3) of the triangle whose global index is triangleIndex. Returns -1 if none.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const MeshTopology::SeqTriangles & sofa::component::topology::MeshTopology::getTriangles ( )
overridevirtual
const MeshTopology::TrianglesAroundEdge & sofa::component::topology::MeshTopology::getTrianglesAroundEdge ( EdgeID  i)
overridevirtual

Returns the set of triangle adjacent to a given edge.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::TrianglesAroundEdge > & sofa::component::topology::MeshTopology::getTrianglesAroundEdgeArray ( )

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

const MeshTopology::TrianglesAroundVertex & sofa::component::topology::MeshTopology::getTrianglesAroundVertex ( PointID  i)
overridevirtual

Returns the set of triangles adjacent to a given vertex.

Returns the set of triangle adjacent to a given vertex.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::TrianglesAroundVertex > & sofa::component::topology::MeshTopology::getTrianglesAroundVertexArray ( )

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

const MeshTopology::TrianglesInTetrahedron & sofa::component::topology::MeshTopology::getTrianglesInTetrahedron ( TetraID  i)
overridevirtual

Returns the set of triangles adjacent to a given tetrahedron.

Reimplemented from sofa::core::topology::BaseMeshTopology.

const vector< MeshTopology::TrianglesInTetrahedron > & sofa::component::topology::MeshTopology::getTrianglesInTetrahedronArray ( )

Returns the TrianglesInTetrahedron array (i.e. provide the 4 triangle indices for each tetrahedron).

const MeshTopology::UV sofa::component::topology::MeshTopology::getUV ( UVID  i)
virtual
const MeshTopology::SeqUV & sofa::component::topology::MeshTopology::getUVs ( )
virtual
int sofa::component::topology::MeshTopology::getVertexIndexInHexahedron ( const Hexa t,
PointID  vertexIndex 
) const
overridevirtual

Returns the index (either 0, 1 ,2, 3, 4, 5, 6, or 7) of the vertex whose global index is vertexIndex. Returns -1 if none.

Reimplemented from sofa::core::topology::BaseMeshTopology.

int sofa::component::topology::MeshTopology::getVertexIndexInQuad ( const Quad t,
PointID  vertexIndex 
) const
overridevirtual

Returns the index (either 0, 1 ,2 or 3) of the vertex whose global index is vertexIndex. Returns -1 if none.

Reimplemented from sofa::core::topology::BaseMeshTopology.

int sofa::component::topology::MeshTopology::getVertexIndexInTetrahedron ( const Tetra t,
PointID  vertexIndex 
) const
overridevirtual

Returns the index (either 0, 1 ,2 or 3) of the vertex whose global index is vertexIndex. Returns -1 if none.

Reimplemented from sofa::core::topology::BaseMeshTopology.

int sofa::component::topology::MeshTopology::getVertexIndexInTriangle ( const Triangle t,
PointID  vertexIndex 
) const
overridevirtual

Returns the index (either 0, 1 ,2 or 3) of the vertex whose global index is vertexIndex. Returns -1 if none.

Reimplemented from sofa::core::topology::BaseMeshTopology.

virtual bool sofa::component::topology::MeshTopology::hasLines ( )
inlinevirtual
bool sofa::component::topology::MeshTopology::hasPos ( ) const
overridevirtual
virtual bool sofa::component::topology::MeshTopology::hasSurface ( )
inlinevirtual
virtual bool sofa::component::topology::MeshTopology::hasVolume ( )
inlinevirtual
void sofa::component::topology::MeshTopology::init ( void  )
overridevirtual

Initialization method called at graph creation and modification, during top-down traversal.

Reimplemented from sofa::core::objectmodel::BaseObject.

Reimplemented in sofa::component::topology::SparseGridTopology, and sofa::component::topology::RegularGridTopology.

void sofa::component::topology::MeshTopology::invalidate ( )
virtual bool sofa::component::topology::MeshTopology::isLines ( )
inlinevirtual
virtual bool sofa::component::topology::MeshTopology::isSurface ( )
inlinevirtual
virtual bool sofa::component::topology::MeshTopology::isVolume ( )
inlinevirtual
void sofa::component::topology::MeshTopology::parse ( core::objectmodel::BaseObjectDescription arg)
overridevirtual

Parse the given description to assign values to this object's fields and potentially other parameters.

Reimplemented from sofa::core::objectmodel::Base.

Reimplemented in sofa::component::topology::RegularGridTopology.

void sofa::component::topology::MeshTopology::reOrientateTriangle ( TriangleID  id)
overridevirtual

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

Reimplemented from sofa::core::topology::BaseMeshTopology.

void sofa::component::topology::MeshTopology::setNbPoints ( int  n)
overridevirtual

Reimplemented from sofa::core::topology::Topology.

sofa::component::topology::MeshTopology::SOFA_CLASS ( MeshTopology  ,
core::topology::BaseMeshTopology   
)
void sofa::component::topology::MeshTopology::updateHexahedra ( )
virtual
void sofa::component::topology::MeshTopology::updateTetrahedra ( )
virtual