Classes | Public Types | Static Public Member Functions
vcg::tri::io::ImporterOBJ< OpenMeshType > Class Template Reference

#include <import_obj.h>

List of all members.

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)

Detailed Description

template<class OpenMeshType>
class vcg::tri::io::ImporterOBJ< OpenMeshType >

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.


Member Typedef Documentation

template<class OpenMeshType >
typedef OpenMeshType::CoordType vcg::tri::io::ImporterOBJ< OpenMeshType >::CoordType

Definition at line 64 of file import_obj.h.

template<class OpenMeshType >
typedef OpenMeshType::EdgeType vcg::tri::io::ImporterOBJ< OpenMeshType >::EdgeType

Definition at line 60 of file import_obj.h.

template<class OpenMeshType >
typedef OpenMeshType::FaceIterator vcg::tri::io::ImporterOBJ< OpenMeshType >::FaceIterator

Definition at line 63 of file import_obj.h.

template<class OpenMeshType >
typedef OpenMeshType::FaceType vcg::tri::io::ImporterOBJ< OpenMeshType >::FaceType

Definition at line 61 of file import_obj.h.

template<class OpenMeshType >
typedef OpenMeshType::ScalarType vcg::tri::io::ImporterOBJ< OpenMeshType >::ScalarType

Definition at line 58 of file import_obj.h.

template<class OpenMeshType >
typedef OpenMeshType::VertexIterator vcg::tri::io::ImporterOBJ< OpenMeshType >::VertexIterator

Definition at line 62 of file import_obj.h.

template<class OpenMeshType >
typedef OpenMeshType::VertexPointer vcg::tri::io::ImporterOBJ< OpenMeshType >::VertexPointer

Definition at line 57 of file import_obj.h.

template<class OpenMeshType >
typedef OpenMeshType::VertexType vcg::tri::io::ImporterOBJ< OpenMeshType >::VertexType

Definition at line 59 of file import_obj.h.


Member Enumeration Documentation

template<class OpenMeshType >
enum vcg::tri::io::ImporterOBJ::OBJError
Enumerator:
E_NOERROR 
E_NON_CRITICAL_ERROR 
E_MATERIAL_FILE_NOT_FOUND 
E_MATERIAL_NOT_FOUND 
E_TEXTURE_NOT_FOUND 
E_VERTICES_WITH_SAME_IDX_IN_FACE 
E_LESS_THAN_3_VERT_IN_FACE 
E_CANTOPEN 
E_UNEXPECTED_EOF 
E_ABORTED 
E_NO_VERTEX 
E_NO_FACE 
E_BAD_VERTEX_STATEMENT 
E_BAD_VERT_TEX_STATEMENT 
E_BAD_VERT_NORMAL_STATEMENT 
E_BAD_VERT_INDEX 
E_BAD_VERT_TEX_INDEX 
E_BAD_VERT_NORMAL_INDEX 
E_LESS_THAN_4_VERT_IN_QUAD 

Definition at line 130 of file import_obj.h.


Member Function Documentation

template<class OpenMeshType >
static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::ErrorCritical ( int  err) [inline, static]

Definition at line 158 of file import_obj.h.

template<class OpenMeshType >
static const char* vcg::tri::io::ImporterOBJ< OpenMeshType >::ErrorMsg ( int  error) [inline, static]

Definition at line 165 of file import_obj.h.

template<class OpenMeshType >
static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::GoodObjIndex ( int &  index,
const int  maxVal 
) [inline, static]

Definition at line 201 of file import_obj.h.

template<class OpenMeshType >
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

Parameters:
filenameThe name of the file to open
maskA mask which will be filled according to type of data found in the object
oiA structure which will be filled with infos about the object to be opened

Definition at line 960 of file import_obj.h.

template<class OpenMeshType >
static bool vcg::tri::io::ImporterOBJ< OpenMeshType >::LoadMask ( const char *  filename,
int &  mask 
) [inline, static]

Definition at line 1046 of file import_obj.h.

template<class OpenMeshType >
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.

template<class OpenMeshType >
static int& vcg::tri::io::ImporterOBJ< OpenMeshType >::MRGBLineCount ( ) [inline, static]

Definition at line 55 of file import_obj.h.

template<class OpenMeshType >
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.

template<class OpenMeshType >
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

Parameters:
mThe mesh model to be populated with data stored into the file
filenameThe name of the file to be opened
oiA structure containing infos about the object to be opened

Definition at line 229 of file import_obj.h.

template<class OpenMeshType >
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.

template<class OpenMeshType >
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.

Parameters:
streamThe object providing the input stream
tokensThe "tokens" in the next line

Definition at line 740 of file import_obj.h.


The documentation for this class was generated from the following file:


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:44:03