SOFA API  014b24ea
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::helper::vector< Vector3 > & getVertices ()
 
const sofa::helper::vector< Vector3 > & getVertices () const
 
sofa::helper::vector< Topology::Edge > & getEdges ()
 
const sofa::helper::vector< Topology::Edge > & getEdges () const
 
sofa::helper::vector< Topology::Triangle > & getTriangles ()
 
const sofa::helper::vector< Topology::Triangle > & getTriangles () const
 
sofa::helper::vector< Topology::Quad > & getQuads ()
 
const sofa::helper::vector< Topology::Quad > & getQuads () const
 
sofa::helper::vector< Topology::Tetrahedron > & getTetrahedra ()
 
const sofa::helper::vector< Topology::Tetrahedron > & getTetrahedra () const
 
sofa::helper::vector< Topology::Hexahedron > & getHexahedra ()
 
const sofa::helper::vector< Topology::Hexahedron > & getHexahedra () const
 
sofa::helper::vector< Vector3 > & getTexCoords ()
 
const sofa::helper::vector< Vector3 > & getTexCoords () const
 
sofa::helper::vector< Vector3 > & getNormals ()
 
const sofa::helper::vector< Vector3 > & getNormals () const
 
sofa::helper::vector< vector< vector< int > > > & getFacets ()
 
const sofa::helper::vector< vector< vector< int > > > & getFacets () const
 
const sofa::helper::vector< PrimitiveGroup > & getEdgesGroups () const
 
const sofa::helper::vector< PrimitiveGroup > & getTrianglesGroups () const
 
const sofa::helper::vector< PrimitiveGroup > & getQuadsGroups () const
 
const sofa::helper::vector< PrimitiveGroup > & getPolygonsGroups () const
 
const sofa::helper::vector< PrimitiveGroup > & getTetrahedraGroups () const
 
const sofa::helper::vector< PrimitiveGroup > & getHexahedraGroups () const
 
const sofa::helper::vector< PrimitiveGroup > & getPentahedraGroups () const
 
const sofa::helper::vector< PrimitiveGroup > & getPyramidsGroups () const
 
const sofa::helper::vector< HighOrderEdgePosition > & getHighOrderEdgePositions () const
 
const sofa::helper::vector< HighOrderTrianglePosition > & getHighOrderTrianglePositions () const
 
const sofa::helper::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::helper::vector< Vector3m_vertices
 
sofa::helper::vector< Topology::Edgem_edges
 Edges of the mesh loaded. More...
 
sofa::helper::vector< Topology::Trianglem_triangles
 Triangles of the mesh loaded. More...
 
sofa::helper::vector< Topology::Quadm_quads
 Quads of the mesh loaded. More...
 
helper::vector< helper::vector< unsigned int > > m_polygons
 Polygons of the mesh loaded. More...
 
helper::vector< HighOrderEdgePositionm_highOrderEdgePositions
 High order edge points of the mesh loaded. More...
 
helper::vector< HighOrderTrianglePositionm_highOrderTrianglePositions
 High order triangle points of the mesh loaded. More...
 
helper::vector< HighOrderQuadPositionm_highOrderQuadPositions
 High order quad points of the mesh loaded. More...
 
sofa::helper::vector< Topology::Tetrahedronm_tetrahedra
 Tetrahedra of the mesh loaded. More...
 
sofa::helper::vector< Topology::Hexahedronm_hexahedra
 Hexahedra of the mesh loaded. More...
 
helper::vector< PrimitiveGroupm_edgesGroups
 Groups of Edges. More...
 
helper::vector< PrimitiveGroupm_trianglesGroups
 Groups of Triangles. More...
 
helper::vector< PrimitiveGroupm_quadsGroups
 Groups of Quads. More...
 
helper::vector< PrimitiveGroupm_polygonsGroups
 Groups of Polygons. More...
 
helper::vector< PrimitiveGroupm_tetrahedraGroups
 Groups of Tetrahedra. More...
 
helper::vector< PrimitiveGroupm_hexahedraGroups
 Groups of Hexahedra. More...
 
helper::vector< PrimitiveGroupm_pentahedraGroups
 Groups of Pentahedra. More...
 
helper::vector< PrimitiveGroupm_pyramidsGroups
 Groups of Pyramids. More...
 
sofa::helper::vector< Vector3texCoords
 
sofa::helper::vector< Vector3normals
 
sofa::helper::vector< sofa::helper::vector< sofa::helper::vector< int > > > 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

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

Function details

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