SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::helper::io::MeshOBJ Class Reference

#include <MeshOBJ.h>

Inheritance diagram for sofa::helper::io::MeshOBJ:

Public Member Functions

 MeshOBJ (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

void readOBJ (std::istream &file, const std::string &filename)
 
void readMTL (const char *filename)
 

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

◆ MeshOBJ()

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

Function details

◆ init()

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

◆ readMTL()

void sofa::helper::io::MeshOBJ::readMTL ( const char filename)
protected

◆ readOBJ()

void sofa::helper::io::MeshOBJ::readOBJ ( std::istream &  file,
const std::string &  filename 
)
protected