Developer Documentation
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
 
PolyMeshpolyMesh ()
 get a pointer to the active polyMesh More...
 
TriMeshtriMesh ()
 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
 
BaseObjectgetObject ()
 get BaseObject data of object
 
void finish ()
 

Private Attributes

std::vector< Vec3fvertices_
 
std::vector< Vec3fnormals_
 
std::vector< Vec2ftexCoords_
 
std::vector< Vec4fcolors_
 
QString path_
 
std::map< int, PolyMesh::VertexHandlevertexMapPoly_
 
std::vector< PolyMesh::FaceHandle > faceMapPoly_
 
PolyMeshpolyMesh_
 
std::map< int, TriMesh::VertexHandlevertexMapTri_
 
std::vector< TriMesh::FaceHandle > faceMapTri_
 
TriMeshtriMesh_
 
BaseObjectobject_
 
ObjectOptions objectOptions_
 
std::vector< OMVHandles > invalidFaces_
 
unsigned int maxFaceValence_
 

Detailed Description

Definition at line 75 of file OFFImporter.hh.

Member Function Documentation

◆ addObject()

void OFFImporter::addObject ( BaseObject _object)

add initial object

add a mesh

Definition at line 66 of file OFFImporter.cc.

◆ finish()

void OFFImporter::finish ( )

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

Definition at line 329 of file OFFImporter.cc.

◆ polyMesh()

PolyMesh * OFFImporter::polyMesh ( )

get a pointer to the active polyMesh

get mesh as polyMesh

Definition at line 131 of file OFFImporter.cc.

◆ setFaceColor()

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

set face color

set RGBA color of face

Definition at line 595 of file OFFImporter.cc.

◆ setObjectOptions()

void OFFImporter::setObjectOptions ( ObjectOptions  _options)

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

Definition at line 522 of file OFFImporter.cc.

◆ setVertexColor()

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

set vertex color

set RGBA color of vertex

Definition at line 555 of file OFFImporter.cc.

◆ triMesh()

TriMesh * OFFImporter::triMesh ( )

get a pointer to the active triMesh

get mesh as triMesh

Definition at line 141 of file OFFImporter.cc.


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