Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
OFFImporter Class Reference

## Public Types
enum | ObjectOptionsE { NONE = 0, BINARY = 1, TRIMESH = 1 << 1, POLYMESH = 1 << 2, VERTEXNORMAL = 1 << 3, VERTEXTEXCOORDS = 1 << 4, VERTEXCOLOR = 1 << 5, FACECOLOR = 1 << 6, COLORALPHA = 1 << 7, FORCE_NOCOLOR = 1 << 8, FORCE_NONORMALS = 1 << 9, FORCE_NOTEXTURES = 1 << 10 }
typedef uint | ObjectOptions

## Public Member Functions
| OFFImporter ()
| constructor
| ~OFFImporter ()
| base class needs virtual destructor
void | addObject (BaseObject *_object)
| add initial object More...
unsigned int | maxFaceValence () const
void | maxFaceValence (unsigned int _maxValence)
VertexHandle | addVertex (const Vec3f &_point)
| add a vertex with coordinate `_point`
Vec3f | vertex (uint _index)
| get vertex with given index
int | addTexCoord (const Vec2f &_coord)
| add texture coordinates
int | addColor (const Vec4f &_color)
| add a color
int | addNormal (const Vec3f &_normal)
| add a normal
PolyMesh * | polyMesh ()
| get a pointer to the active polyMesh More...
TriMesh * | triMesh ()
| get a pointer to the active triMesh More...
void | setVertexTexCoord (VertexHandle _vh, int _texCoordID)
| set vertex texture coordinate
void | setNormal (VertexHandle _vh, int _normalID)
| set vertex normal
void | setVertexColor (VertexHandle _vh, int _colorIndex)
| set vertex color More...
void | setFaceColor (FaceHandle _fh, int _colorIndex)
| set face color More...
int | addFace (const VHandles &_indices)
| add a face with indices _indices refering to vertices
bool | hasVertexNormals ()
| Query Object Options.
bool | hasTextureCoords ()
bool | hasVertexColors ()
bool | hasFaceColors ()
bool | isTriangleMesh ()
bool | isPolyMesh ()
bool | isBinary ()
uint | n_vertices ()
| Global Properties.
uint | n_normals ()
uint | n_texCoords ()
void | reserve (unsigned int _nv, unsigned int _ne, unsigned int _nf)
QString | path ()
| Path of the OFF file.
void | setPath (QString _path)
void | setObjectOptions (ObjectOptions _options)
void | addOption (ObjectOptionsE _option)
| add an option
void | removeOption (ObjectOptionsE _option)
| remove an option
bool | hasOption (ObjectOptionsE _option)
| test if object has a certain option
ObjectOptions & | objectOptions ()
| get Object Options
void | setObjectName (QString _name)
| change the name of an object
BaseObject * | getObject ()
| get BaseObject data of object
void | finish ()

## Private Attributes
std::vector< Vec3f > | vertices_
std::vector< Vec3f > | normals_
std::vector< Vec2f > | texCoords_
std::vector< Vec4f > | colors_
QString | path_
std::map< int, PolyMesh::VertexHandle > | vertexMapPoly_
std::vector< PolyMesh::FaceHandle > | faceMapPoly_
PolyMesh * | polyMesh_
std::map< int, TriMesh::VertexHandle > | vertexMapTri_
std::vector< TriMesh::FaceHandle > | faceMapTri_
TriMesh * | triMesh_
BaseObject * | object_
ObjectOptions | objectOptions_
std::vector< OMVHandles > | invalidFaces_
unsigned int | maxFaceValence_

## Detailed Description

Definition at line 81 of file OFFImporter.hh.

## Member Function Documentation

void OFFImporter::addObject | ( | BaseObject * | _object | ) |

add initial object

add a mesh

Definition at line 72 of file OFFImporter.cc.

void OFFImporter::finish | ( |  | ) |

Finish up importing process: Duplicate vertices of non-manifold faces and add these faces as isolated ones

Definition at line 335 of file OFFImporter.cc.

PolyMesh * OFFImporter::polyMesh | ( |  | ) |

get a pointer to the active polyMesh

get mesh as polyMesh

Definition at line 137 of file OFFImporter.cc.

void OFFImporter::setFaceColor | ( | FaceHandle | _fh,
|  | int | _colorIndex
| ) |  |

set face color

set RGBA color of face

Definition at line 601 of file OFFImporter.cc.

void OFFImporter::setObjectOptions | ( | ObjectOptions | _options | ) |

store an initial options object for an object containing info about the meshType

Definition at line 528 of file OFFImporter.cc.

void OFFImporter::setVertexColor | ( | VertexHandle | _vh,
|  | int | _colorIndex
| ) |  |

set vertex color

set RGBA color of vertex

Definition at line 561 of file OFFImporter.cc.

TriMesh * OFFImporter::triMesh | ( |  | ) |

get a pointer to the active triMesh

get mesh as triMesh

Definition at line 147 of file OFFImporter.cc.

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

- PluginCollection-FilePlugins/Plugin-FileOFF/OFFImporter.hh
- PluginCollection-FilePlugins/Plugin-FileOFF/OFFImporter.cc