Public Types | Static Public Member Functions | Static Protected Member Functions
vcg::tri::io::ImporterOFF< MESH_TYPE > Class Template Reference

#include <import_off.h>

List of all members.

Public Types

typedef MESH_TYPE::CoordType CoordType
typedef MESH_TYPE::FaceIterator FaceIterator
typedef MESH_TYPE::FacePointer FacePointer
typedef MESH_TYPE::FaceType FaceType
enum  OFFCodes {
  NoError = 0, CantOpen, InvalidFile, InvalidFile_MissingOFF,
  UnsupportedFormat, ErrorNotTriangularFace, ErrorHighDimension, ErrorDegenerateFace
}
typedef MESH_TYPE::ScalarType ScalarType
typedef MESH_TYPE::VertexIterator VertexIterator
typedef MESH_TYPE::VertexPointer VertexPointer
typedef MESH_TYPE::VertexType VertexType

Static Public Member Functions

static const char * ErrorMsg (int message_code)
static bool LoadMask (const char *filename, int &loadmask)
static int Open (MESH_TYPE &mesh, const char *filename, CallBackPos *cb=0)
static int Open (MESH_TYPE &mesh, const char *filename, int &loadmask, CallBackPos *cb=0)
static int OpenMem (MESH_TYPE &mesh, const char *mem, size_t sz, int &loadmask, CallBackPos *cb=0)
static int OpenStream (MESH_TYPE &mesh, std::istream &stream, int &loadmask, CallBackPos *cb=0)

Static Protected Member Functions

static const vcg::Color4f ColorMap (int i)
static void TokenizeNextLine (std::istream &stream, std::vector< std::string > &tokens)

Detailed Description

template<class MESH_TYPE>
class vcg::tri::io::ImporterOFF< MESH_TYPE >

This class encapsulate a filter for importing OFF meshes. A basic description of the OFF file format can be found at http://www.geomview.org/docs/html/geomview_41.html

Definition at line 42 of file import_off.h.


Member Typedef Documentation

template<class MESH_TYPE >
typedef MESH_TYPE::CoordType vcg::tri::io::ImporterOFF< MESH_TYPE >::CoordType

Definition at line 52 of file import_off.h.

template<class MESH_TYPE >
typedef MESH_TYPE::FaceIterator vcg::tri::io::ImporterOFF< MESH_TYPE >::FaceIterator

Definition at line 50 of file import_off.h.

template<class MESH_TYPE >
typedef MESH_TYPE::FacePointer vcg::tri::io::ImporterOFF< MESH_TYPE >::FacePointer

Definition at line 51 of file import_off.h.

template<class MESH_TYPE >
typedef MESH_TYPE::FaceType vcg::tri::io::ImporterOFF< MESH_TYPE >::FaceType

Definition at line 49 of file import_off.h.

template<class MESH_TYPE >
typedef MESH_TYPE::ScalarType vcg::tri::io::ImporterOFF< MESH_TYPE >::ScalarType

Definition at line 53 of file import_off.h.

template<class MESH_TYPE >
typedef MESH_TYPE::VertexIterator vcg::tri::io::ImporterOFF< MESH_TYPE >::VertexIterator

Definition at line 47 of file import_off.h.

template<class MESH_TYPE >
typedef MESH_TYPE::VertexPointer vcg::tri::io::ImporterOFF< MESH_TYPE >::VertexPointer

Definition at line 48 of file import_off.h.

template<class MESH_TYPE >
typedef MESH_TYPE::VertexType vcg::tri::io::ImporterOFF< MESH_TYPE >::VertexType

Definition at line 46 of file import_off.h.


Member Enumeration Documentation

template<class MESH_TYPE >
enum vcg::tri::io::ImporterOFF::OFFCodes
Enumerator:
NoError 
CantOpen 
InvalidFile 
InvalidFile_MissingOFF 
UnsupportedFormat 
ErrorNotTriangularFace 
ErrorHighDimension 
ErrorDegenerateFace 

Definition at line 56 of file import_off.h.


Member Function Documentation

template<class MESH_TYPE >
static const vcg::Color4f vcg::tri::io::ImporterOFF< MESH_TYPE >::ColorMap ( int  i) [inline, static, protected]

Provide the int->color mapping, according to the Geomview's `cmap.fmap' file.

Parameters:
ithe color index
Returns:
the corresponding vcg::Color4f color

Definition at line 642 of file import_off.h.

template<class MESH_TYPE >
static const char* vcg::tri::io::ImporterOFF< MESH_TYPE >::ErrorMsg ( int  message_code) [inline, static]

Standard call for knowing the meaning of an error code

Parameters:
message_codeThe code returned by Open
Returns:
The string describing the error code

Definition at line 65 of file import_off.h.

template<class MESH_TYPE >
static bool vcg::tri::io::ImporterOFF< MESH_TYPE >::LoadMask ( const char *  filename,
int &  loadmask 
) [inline, static]

Load only the properties of the 3D objects.

Parameters:
filenamethe name of the file to read from
loadmaskthe mask which encodes the properties
Returns:
the operation result

Definition at line 86 of file import_off.h.

template<class MESH_TYPE >
static int vcg::tri::io::ImporterOFF< MESH_TYPE >::Open ( MESH_TYPE &  mesh,
const char *  filename,
CallBackPos cb = 0 
) [inline, static]

Definition at line 95 of file import_off.h.

template<class MESH_TYPE >
static int vcg::tri::io::ImporterOFF< MESH_TYPE >::Open ( MESH_TYPE &  mesh,
const char *  filename,
int &  loadmask,
CallBackPos cb = 0 
) [inline, static]

Standard call for reading a mesh.

Parameters:
meshthe destination mesh
filenamethe name of the file to read from
Returns:
the operation result

Definition at line 117 of file import_off.h.

template<class MESH_TYPE >
static int vcg::tri::io::ImporterOFF< MESH_TYPE >::OpenMem ( MESH_TYPE &  mesh,
const char *  mem,
size_t  sz,
int &  loadmask,
CallBackPos cb = 0 
) [inline, static]

Definition at line 101 of file import_off.h.

template<class MESH_TYPE >
static int vcg::tri::io::ImporterOFF< MESH_TYPE >::OpenStream ( MESH_TYPE &  mesh,
std::istream &  stream,
int &  loadmask,
CallBackPos cb = 0 
) [inline, static]

Definition at line 126 of file import_off.h.

template<class MESH_TYPE >
static void vcg::tri::io::ImporterOFF< MESH_TYPE >::TokenizeNextLine ( std::istream &  stream,
std::vector< std::string > &  tokens 
) [inline, static, protected]

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 610 of file import_off.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