SOFA API  7226d276
Open source framework for multi-physics simuation
sofa::helper::io::MeshGmsh Class Reference

#include <MeshGmsh.h>

Inheritance diagram for sofa::helper::io::MeshGmsh:

Public Member Functions

 MeshGmsh (const std::string &filename)
 
void init (std::string filename)
 
- Public Member Functions inherited from sofa::helper::io::Mesh
sofa::type::vector< type::Vec3 > & getVertices ()
 
const sofa::type::vector< type::Vec3 > & getVertices () const
 
sofa::type::vector< Edge > & getEdges ()
 
const sofa::type::vector< Edge > & getEdges () const
 
sofa::type::vector< Triangle > & getTriangles ()
 
const sofa::type::vector< Triangle > & getTriangles () const
 
sofa::type::vector< Quad > & getQuads ()
 
const sofa::type::vector< Quad > & getQuads () const
 
sofa::type::vector< Tetrahedron > & getTetrahedra ()
 
const sofa::type::vector< Tetrahedron > & getTetrahedra () const
 
sofa::type::vector< Hexahedron > & getHexahedra ()
 
const sofa::type::vector< Hexahedron > & getHexahedra () const
 
sofa::type::vector< type::Vec3 > & getTexCoords ()
 
const sofa::type::vector< type::Vec3 > & getTexCoords () const
 
sofa::type::vector< type::Vec3 > & getNormals ()
 
const sofa::type::vector< type::Vec3 > & getNormals () const
 
sofa::type::vector< type::vector< type::vector< PointID > > > & getFacets ()
 
const sofa::type::vector< type::vector< type::vector< PointID > > > & getFacets () const
 
const sofa::type::vector< PrimitiveGroup > & getEdgesGroups () const
 
const sofa::type::vector< PrimitiveGroup > & getTrianglesGroups () const
 
const sofa::type::vector< PrimitiveGroup > & getQuadsGroups () const
 
const sofa::type::vector< PrimitiveGroup > & getPolygonsGroups () const
 
const sofa::type::vector< PrimitiveGroup > & getTetrahedraGroups () const
 
const sofa::type::vector< PrimitiveGroup > & getHexahedraGroups () const
 
const sofa::type::vector< PrimitiveGroup > & getPrismsGroups () const
 
const sofa::type::vector< PrimitiveGroup > & getPyramidsGroups () const
 
const sofa::type::vector< HighOrderEdgePosition > & getHighOrderEdgePositions () const
 
const sofa::type::vector< HighOrderTrianglePosition > & getHighOrderTrianglePositions () const
 
const sofa::type::vector< HighOrderQuadPosition > & getHighOrderQuadPositions () const
 
const Material & getMaterial () const
 
const std::vector< Material > & getMaterials ()
 
const std::vector< PrimitiveGroup > & getGroups ()
 
std::string & getTextureName ()
 

Protected Member Functions

bool readGmsh (std::ifstream &file, const unsigned int gmshFormat)
 
void addInGroup (type::vector< sofa::type::PrimitiveGroup > &group, int tag, std::size_t eid)
 
void normalizeGroup (type::vector< sofa::type::PrimitiveGroup > &group)
 

Additional Inherited Members

- Public Attributes inherited from sofa::helper::io::Mesh
std::string loaderType
 
- Protected Attributes inherited from sofa::helper::io::Mesh
sofa::type::vector< type::Vec3 > m_vertices
 
sofa::type::vector< Edge > m_edges
 Edges of the mesh loaded. More...
 
sofa::type::vector< Triangle > m_triangles
 Triangles of the mesh loaded. More...
 
sofa::type::vector< Quad > m_quads
 Quads of the mesh loaded. More...
 
type::vector< type::vector< sofa::Index > > m_polygons
 Polygons of the mesh loaded. More...
 
type::vector< HighOrderEdgePosition > m_highOrderEdgePositions
 High order edge points of the mesh loaded. More...
 
type::vector< HighOrderTrianglePosition > m_highOrderTrianglePositions
 High order triangle points of the mesh loaded. More...
 
type::vector< HighOrderQuadPosition > m_highOrderQuadPositions
 High order quad points of the mesh loaded. More...
 
sofa::type::vector< Tetrahedron > m_tetrahedra
 Tetrahedra of the mesh loaded. More...
 
sofa::type::vector< Hexahedron > m_hexahedra
 Hexahedra of the mesh loaded. More...
 
type::vector< PrimitiveGroup > m_edgesGroups
 Groups of Edges. More...
 
type::vector< PrimitiveGroup > m_trianglesGroups
 Groups of Triangles. More...
 
type::vector< PrimitiveGroup > m_quadsGroups
 Groups of Quads. More...
 
type::vector< PrimitiveGroup > m_polygonsGroups
 Groups of Polygons. More...
 
type::vector< PrimitiveGroup > m_tetrahedraGroups
 Groups of Tetrahedra. More...
 
type::vector< PrimitiveGroup > m_hexahedraGroups
 Groups of Hexahedra. More...
 
type::vector< PrimitiveGroup > m_prismsGroups
 Groups of Prisms. More...
 
type::vector< PrimitiveGroup > m_pyramidsGroups
 Groups of Pyramids. More...
 
sofa::type::vector< type::Vec3 > texCoords
 
sofa::type::vector< type::Vec3 > normals
 
sofa::type::vector< sofa::type::vector< sofa::type::vector< PointID > > > facets
 
Material material
 
std::vector< Material > materials
 
std::vector< PrimitiveGroup > groups
 
std::string textureName
 
- Static Public Member Functions inherited from sofa::helper::io::Mesh
static Mesh * Create (const std::string &filename)
 
static Mesh * Create (const std::string &loader, const std::string &filename)
 
template<class Object >
static Object * create (Object *, std::string arg)
 

Constructor details

◆ MeshGmsh()

sofa::helper::io::MeshGmsh::MeshGmsh ( const std::string &  filename)
inline

Function details

◆ addInGroup()

void sofa::helper::io::MeshGmsh::addInGroup ( type::vector< sofa::type::PrimitiveGroup > &  group,
int  tag,
std::size_t  eid 
)
protected

◆ init()

void sofa::helper::io::MeshGmsh::init ( std::string  filename)

◆ normalizeGroup()

void sofa::helper::io::MeshGmsh::normalizeGroup ( type::vector< sofa::type::PrimitiveGroup > &  group)
protected

◆ readGmsh()

bool sofa::helper::io::MeshGmsh::readGmsh ( std::ifstream &  file,
const unsigned int  gmshFormat 
)
protected