#include <import_obj.h>
Classes | |
class | Info |
struct | ObjEdge |
struct | ObjIndexedFace |
struct | ObjTexCoord |
Public Types | |
typedef OpenMeshType::CoordType | CoordType |
typedef OpenMeshType::EdgeType | EdgeType |
typedef OpenMeshType::FaceIterator | FaceIterator |
typedef OpenMeshType::FaceType | FaceType |
enum | OBJError { E_NOERROR = 0*2+0, E_NON_CRITICAL_ERROR = 0*2+1, E_MATERIAL_FILE_NOT_FOUND = 1*2+1, E_MATERIAL_NOT_FOUND = 2*2+1, E_TEXTURE_NOT_FOUND = 3*2+1, E_VERTICES_WITH_SAME_IDX_IN_FACE = 4*2+1, E_LESS_THAN_3_VERT_IN_FACE = 5*2+1, E_CANTOPEN = 6*2+0, E_UNEXPECTED_EOF = 7*2+0, E_ABORTED = 8*2+0, E_NO_VERTEX = 9*2+0, E_NO_FACE = 10*2+0, E_BAD_VERTEX_STATEMENT = 11*2+0, E_BAD_VERT_TEX_STATEMENT = 12*2+0, E_BAD_VERT_NORMAL_STATEMENT = 13*2+0, E_BAD_VERT_INDEX = 14*2+0, E_BAD_VERT_TEX_INDEX = 15*2+0, E_BAD_VERT_NORMAL_INDEX = 16*2+0, E_LESS_THAN_4_VERT_IN_QUAD = 17*2+0 } |
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, Info &oi) |
static bool | LoadMask (const char *filename, int &mask) |
static bool | LoadMaterials (const char *filename, std::vector< Material > &materials, std::vector< std::string > &textures) |
static int & | MRGBLineCount () |
static int | Open (OpenMeshType &mesh, const char *filename, int &loadmask, CallBackPos *cb=0) |
static int | Open (OpenMeshType &m, const char *filename, Info &oi) |
static void | SplitToken (const std::string &token, int &vId, int &nId, int &tId, int mask) |
static void | TokenizeNextLine (std::ifstream &stream, std::vector< std::string > &tokens, std::vector< Color4b > *colVec) |
This class encapsulate a filter for importing obj (Alias Wavefront) meshes. Warning: this code assume little endian (PC) architecture!!!
Definition at line 52 of file import_obj.h.
typedef OpenMeshType::CoordType vcg::tri::io::ImporterOBJ< OpenMeshType >::CoordType |
Definition at line 64 of file import_obj.h.
typedef OpenMeshType::EdgeType vcg::tri::io::ImporterOBJ< OpenMeshType >::EdgeType |
Definition at line 60 of file import_obj.h.
typedef OpenMeshType::FaceIterator vcg::tri::io::ImporterOBJ< OpenMeshType >::FaceIterator |
Definition at line 63 of file import_obj.h.
typedef OpenMeshType::FaceType vcg::tri::io::ImporterOBJ< OpenMeshType >::FaceType |
Definition at line 61 of file import_obj.h.
typedef OpenMeshType::ScalarType vcg::tri::io::ImporterOBJ< OpenMeshType >::ScalarType |
Definition at line 58 of file import_obj.h.
typedef OpenMeshType::VertexIterator vcg::tri::io::ImporterOBJ< OpenMeshType >::VertexIterator |
Definition at line 62 of file import_obj.h.
typedef OpenMeshType::VertexPointer vcg::tri::io::ImporterOBJ< OpenMeshType >::VertexPointer |
Definition at line 57 of file import_obj.h.
typedef OpenMeshType::VertexType vcg::tri::io::ImporterOBJ< OpenMeshType >::VertexType |
Definition at line 59 of file import_obj.h.
enum vcg::tri::io::ImporterOBJ::OBJError |
Definition at line 130 of file import_obj.h.
static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::ErrorCritical | ( | int | err | ) | [inline, static] |
Definition at line 158 of file import_obj.h.
static const char* vcg::tri::io::ImporterOBJ< OpenMeshType >::ErrorMsg | ( | int | error | ) | [inline, static] |
Definition at line 165 of file import_obj.h.
static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::GoodObjIndex | ( | int & | index, |
const int | maxVal | ||
) | [inline, static] |
Definition at line 201 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 960 of file import_obj.h.
static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::LoadMask | ( | const char * | filename, |
int & | mask | ||
) | [inline, static] |
Definition at line 1046 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 1054 of file import_obj.h.
static int& vcg::tri::io::ImporterOBJ< OpenMeshType >::MRGBLineCount | ( | ) | [inline, static] |
Definition at line 55 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 212 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 229 of file import_obj.h.
static void vcg::tri::io::ImporterOBJ< OpenMeshType >::SplitToken | ( | const std::string & | token, |
int & | vId, | ||
int & | nId, | ||
int & | tId, | ||
int | mask | ||
) | [inline, static] |
Definition at line 799 of file import_obj.h.
static void vcg::tri::io::ImporterOBJ< OpenMeshType >::TokenizeNextLine | ( | std::ifstream & | stream, |
std::vector< std::string > & | tokens, | ||
std::vector< Color4b > * | colVec | ||
) | [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 740 of file import_obj.h.