SOFA API  1c8b807d
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_ATTRIBUTE_REPLACED__TYPEMEMBER (Vector3, sofa::type::Vec3)
 
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 > & getPentahedraGroups () 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 MaterialgetMaterial () 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::Vec3m_vertices
 
sofa::type::vector< Edgem_edges
 Edges of the mesh loaded. More...
 
sofa::type::vector< Trianglem_triangles
 Triangles of the mesh loaded. More...
 
sofa::type::vector< Quadm_quads
 Quads of the mesh loaded. More...
 
type::vector< type::vector< sofa::Index > > m_polygons
 Polygons of the mesh loaded. More...
 
type::vector< HighOrderEdgePositionm_highOrderEdgePositions
 High order edge points of the mesh loaded. More...
 
type::vector< HighOrderTrianglePositionm_highOrderTrianglePositions
 High order triangle points of the mesh loaded. More...
 
type::vector< HighOrderQuadPositionm_highOrderQuadPositions
 High order quad points of the mesh loaded. More...
 
sofa::type::vector< Tetrahedronm_tetrahedra
 Tetrahedra of the mesh loaded. More...
 
sofa::type::vector< Hexahedronm_hexahedra
 Hexahedra of the mesh loaded. More...
 
type::vector< PrimitiveGroupm_edgesGroups
 Groups of Edges. More...
 
type::vector< PrimitiveGroupm_trianglesGroups
 Groups of Triangles. More...
 
type::vector< PrimitiveGroupm_quadsGroups
 Groups of Quads. More...
 
type::vector< PrimitiveGroupm_polygonsGroups
 Groups of Polygons. More...
 
type::vector< PrimitiveGroupm_tetrahedraGroups
 Groups of Tetrahedra. More...
 
type::vector< PrimitiveGroupm_hexahedraGroups
 Groups of Hexahedra. More...
 
type::vector< PrimitiveGroupm_pentahedraGroups
 Groups of Pentahedra. More...
 
type::vector< PrimitiveGroupm_pyramidsGroups
 Groups of Pyramids. More...
 
sofa::type::vector< type::Vec3texCoords
 
sofa::type::vector< type::Vec3normals
 
sofa::type::vector< sofa::type::vector< sofa::type::vector< PointID > > > facets
 
Material material
 
std::vector< Materialmaterials
 
std::vector< PrimitiveGroupgroups
 
std::string textureName
 
- Static Public Member Functions inherited from sofa::helper::io::Mesh
static MeshCreate (const std::string &filename)
 
static MeshCreate (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