#include <import_obj.h>
Classes | |
| class | Info |
| struct | ObjIndexedFace |
| struct | ObjTexCoord |
Public Types | |
| typedef OpenMeshType::CoordType | CoordType |
| typedef OpenMeshType::FaceIterator | FaceIterator |
| typedef OpenMeshType::FaceType | FaceType |
| enum | OBJError { E_NOERROR = 0x000, E_NON_CRITICAL_ERROR = 0x001, E_MATERIAL_FILE_NOT_FOUND = 0x003, E_MATERIAL_NOT_FOUND = 0x005, E_TEXTURE_NOT_FOUND = 0x007, E_VERTICES_WITH_SAME_IDX_IN_FACE = 0x009, E_CANTOPEN = 0x00A, E_UNESPECTEDEOF = 0x00C, E_ABORTED = 0x00E, E_NO_VERTEX = 0x010, E_NO_FACE = 0x012, E_BAD_VERTEX_STATEMENT = 0x014, E_BAD_VERT_TEX_STATEMENT = 0x016, E_BAD_VERT_NORMAL_STATEMENT = 0x018, E_LESS_THAN_3VERTINFACE = 0x01A, E_BAD_VERT_INDEX = 0x01C, E_BAD_VERT_TEX_INDEX = 0x01E, E_BAD_VERT_NORMAL_INDEX = 0x020 } |
| typedef OpenMeshType::ScalarType | ScalarType |
| typedef OpenMeshType::VertexIterator | VertexIterator |
| typedef OpenMeshType::VertexPointer | VertexPointer |
| typedef OpenMeshType::VertexType | VertexType |
Static Public Member Functions | |
| static bool | ErrorCritical (int err) |
| static const char * | ErrorMsg (int error) |
| static bool | GoodObjIndex (int &index, const int maxVal) |
| static bool | LoadMask (const char *filename, int &mask) |
| static bool | LoadMask (const char *filename, Info &oi) |
| static bool | LoadMaterials (const char *filename, std::vector< Material > &materials, std::vector< std::string > &textures) |
| static int | Open (OpenMeshType &m, const char *filename, Info &oi) |
| static int | Open (OpenMeshType &mesh, const char *filename, int &loadmask, CallBackPos *cb=0) |
| static const void | SplitToken (std::string token, int &vId, int &nId, int &tId, int mask) |
| static const void | SplitVToken (std::string token, std::string &vertex) |
| static const void | SplitVVNToken (std::string token, std::string &vertex, std::string &normal) |
| static const void | SplitVVTToken (std::string token, std::string &vertex, std::string &texcoord) |
| static const void | SplitVVTVNToken (std::string token, std::string &vertex, std::string &texcoord, std::string &normal) |
| static const void | TokenizeNextLine (std::ifstream &stream, std::vector< std::string > &tokens) |
This class encapsulate a filter for importing obj (Alias Wavefront) meshes. Warning: this code assume little endian (PC) architecture!!!
Definition at line 51 of file import_obj.h.
| typedef OpenMeshType::CoordType vcg::tri::io::ImporterOBJ< OpenMeshType >::CoordType |
Definition at line 61 of file import_obj.h.
| typedef OpenMeshType::FaceIterator vcg::tri::io::ImporterOBJ< OpenMeshType >::FaceIterator |
Definition at line 60 of file import_obj.h.
| typedef OpenMeshType::FaceType vcg::tri::io::ImporterOBJ< OpenMeshType >::FaceType |
Definition at line 58 of file import_obj.h.
| typedef OpenMeshType::ScalarType vcg::tri::io::ImporterOBJ< OpenMeshType >::ScalarType |
Definition at line 56 of file import_obj.h.
| typedef OpenMeshType::VertexIterator vcg::tri::io::ImporterOBJ< OpenMeshType >::VertexIterator |
Definition at line 59 of file import_obj.h.
| typedef OpenMeshType::VertexPointer vcg::tri::io::ImporterOBJ< OpenMeshType >::VertexPointer |
Definition at line 55 of file import_obj.h.
| typedef OpenMeshType::VertexType vcg::tri::io::ImporterOBJ< OpenMeshType >::VertexType |
Definition at line 57 of file import_obj.h.
| enum vcg::tri::io::ImporterOBJ::OBJError |
Definition at line 119 of file import_obj.h.
| static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::ErrorCritical | ( | int | err | ) | [inline, static] |
Definition at line 146 of file import_obj.h.
| static const char* vcg::tri::io::ImporterOBJ< OpenMeshType >::ErrorMsg | ( | int | error | ) | [inline, static] |
Definition at line 152 of file import_obj.h.
| static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::GoodObjIndex | ( | int & | index, | |
| const int | maxVal | |||
| ) | [inline, static] |
Definition at line 188 of file import_obj.h.
| static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::LoadMask | ( | const char * | filename, | |
| int & | mask | |||
| ) | [inline, static] |
Definition at line 924 of file import_obj.h.
| static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::LoadMask | ( | const char * | filename, | |
| Info & | oi | |||
| ) | [inline, static] |
Retrieves infos about kind of data stored into the file and fills a mask appropriately
| filename | The name of the file to open | |
| mask | A mask which will be filled according to type of data found in the object | |
| oi | A structure which will be filled with infos about the object to be opened |
Definition at line 856 of file import_obj.h.
| static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::LoadMaterials | ( | const char * | filename, | |
| std::vector< Material > & | materials, | |||
| std::vector< std::string > & | textures | |||
| ) | [inline, static] |
Definition at line 932 of file import_obj.h.
| static int vcg::tri::io::ImporterOBJ< OpenMeshType >::Open | ( | OpenMeshType & | m, | |
| const char * | filename, | |||
| Info & | oi | |||
| ) | [inline, static] |
Opens an object file (in ascii format) and populates the mesh passed as first accordingly to read data
| m | The mesh model to be populated with data stored into the file | |
| filename | The name of the file to be opened | |
| oi | A structure containing infos about the object to be opened |
Definition at line 216 of file import_obj.h.
| static int vcg::tri::io::ImporterOBJ< OpenMeshType >::Open | ( | OpenMeshType & | mesh, | |
| const char * | filename, | |||
| int & | loadmask, | |||
| CallBackPos * | cb = 0 | |||
| ) | [inline, static] |
Definition at line 199 of file import_obj.h.
| static const void vcg::tri::io::ImporterOBJ< OpenMeshType >::SplitToken | ( | std::string | token, | |
| int & | vId, | |||
| int & | nId, | |||
| int & | tId, | |||
| int | mask | |||
| ) | [inline, static] |
Definition at line 733 of file import_obj.h.
| static const void vcg::tri::io::ImporterOBJ< OpenMeshType >::SplitVToken | ( | std::string | token, | |
| std::string & | vertex | |||
| ) | [inline, static] |
Definition at line 749 of file import_obj.h.
| static const void vcg::tri::io::ImporterOBJ< OpenMeshType >::SplitVVNToken | ( | std::string | token, | |
| std::string & | vertex, | |||
| std::string & | normal | |||
| ) | [inline, static] |
Definition at line 783 of file import_obj.h.
| static const void vcg::tri::io::ImporterOBJ< OpenMeshType >::SplitVVTToken | ( | std::string | token, | |
| std::string & | vertex, | |||
| std::string & | texcoord | |||
| ) | [inline, static] |
Definition at line 754 of file import_obj.h.
| static const void vcg::tri::io::ImporterOBJ< OpenMeshType >::SplitVVTVNToken | ( | std::string | token, | |
| std::string & | vertex, | |||
| std::string & | texcoord, | |||
| std::string & | normal | |||
| ) | [inline, static] |
Definition at line 813 of file import_obj.h.
| static const void vcg::tri::io::ImporterOBJ< OpenMeshType >::TokenizeNextLine | ( | std::ifstream & | stream, | |
| std::vector< std::string > & | tokens | |||
| ) | [inline, static] |
Read the next valid line and parses it into "tokens", allowing the tokens to be read one at a time.
| stream | The object providing the input stream | |
| tokens | The "tokens" in the next line |
Definition at line 702 of file import_obj.h.