Developer Documentation
|
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 More... | |
~OFFImporter () | |
base class needs virtual destructor More... | |
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 More... | |
Vec3f | vertex (uint _index) |
get vertex with given index More... | |
int | addTexCoord (const Vec2f &_coord) |
add texture coordinates More... | |
int | addColor (const Vec4f &_color) |
add a color More... | |
int | addNormal (const Vec3f &_normal) |
add a normal More... | |
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 More... | |
void | setNormal (VertexHandle _vh, int _normalID) |
set vertex normal More... | |
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 More... | |
bool | hasVertexNormals () |
Query Object Options. More... | |
bool | hasTextureCoords () |
bool | hasVertexColors () |
bool | hasFaceColors () |
bool | isTriangleMesh () |
bool | isPolyMesh () |
bool | isBinary () |
uint | n_vertices () |
Global Properties. More... | |
uint | n_normals () |
uint | n_texCoords () |
void | reserve (unsigned int _nv, unsigned int _ne, unsigned int _nf) |
QString | path () |
Path of the OFF file. More... | |
void | setPath (QString _path) |
void | setObjectOptions (ObjectOptions _options) |
void | addOption (ObjectOptionsE _option) |
add an option More... | |
void | removeOption (ObjectOptionsE _option) |
remove an option More... | |
bool | hasOption (ObjectOptionsE _option) |
test if object has a certain option More... | |
ObjectOptions & | objectOptions () |
get Object Options More... | |
void | setObjectName (QString _name) |
change the name of an object More... | |
BaseObject * | getObject () |
get BaseObject data of object More... | |
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_ |
Definition at line 75 of file OFFImporter.hh.
typedef uint OFFImporter::ObjectOptions |
Definition at line 95 of file OFFImporter.hh.
enum OFFImporter::ObjectOptionsE |
Definition at line 79 of file OFFImporter.hh.
OFFImporter::OFFImporter | ( | ) |
constructor
Definition at line 56 of file OFFImporter.cc.
OFFImporter::~OFFImporter | ( | ) |
base class needs virtual destructor
Definition at line 49 of file OFFImporter.cc.
int OFFImporter::addColor | ( | const Vec4f & | _color | ) |
add a color
Definition at line 122 of file OFFImporter.cc.
int OFFImporter::addFace | ( | const VHandles & | _indices | ) |
add a face with indices _indices refering to vertices
Definition at line 261 of file OFFImporter.cc.
int OFFImporter::addNormal | ( | const Vec3f & | _normal | ) |
add a normal
Definition at line 113 of file OFFImporter.cc.
void OFFImporter::addObject | ( | BaseObject * | _object | ) |
void OFFImporter::addOption | ( | ObjectOptionsE | _option | ) |
add an option
Definition at line 524 of file OFFImporter.cc.
int OFFImporter::addTexCoord | ( | const Vec2f & | _coord | ) |
add texture coordinates
Definition at line 104 of file OFFImporter.cc.
VertexHandle OFFImporter::addVertex | ( | const Vec3f & | _point | ) |
add a vertex with coordinate _point
Definition at line 236 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 329 of file OFFImporter.cc.
BaseObject * OFFImporter::getObject | ( | ) |
get BaseObject data of object
Definition at line 499 of file OFFImporter.cc.
bool OFFImporter::hasFaceColors | ( | ) |
Definition at line 451 of file OFFImporter.cc.
bool OFFImporter::hasOption | ( | ObjectOptionsE | _option | ) |
test if object has a certain option
Definition at line 457 of file OFFImporter.cc.
bool OFFImporter::hasTextureCoords | ( | ) |
Definition at line 439 of file OFFImporter.cc.
bool OFFImporter::hasVertexColors | ( | ) |
Definition at line 445 of file OFFImporter.cc.
bool OFFImporter::hasVertexNormals | ( | ) |
Query Object Options.
Definition at line 432 of file OFFImporter.cc.
bool OFFImporter::isBinary | ( | ) |
Definition at line 426 of file OFFImporter.cc.
bool OFFImporter::isPolyMesh | ( | ) |
Definition at line 420 of file OFFImporter.cc.
bool OFFImporter::isTriangleMesh | ( | ) |
Definition at line 414 of file OFFImporter.cc.
|
inline |
Definition at line 106 of file OFFImporter.hh.
|
inline |
Definition at line 108 of file OFFImporter.hh.
uint OFFImporter::n_normals | ( | ) |
Definition at line 469 of file OFFImporter.cc.
uint OFFImporter::n_texCoords | ( | ) |
Definition at line 475 of file OFFImporter.cc.
uint OFFImporter::n_vertices | ( | ) |
Global Properties.
Definition at line 463 of file OFFImporter.cc.
OFFImporter::ObjectOptions & OFFImporter::objectOptions | ( | ) |
get Object Options
Definition at line 536 of file OFFImporter.cc.
QString OFFImporter::path | ( | ) |
Path of the OFF file.
Definition at line 506 of file OFFImporter.cc.
PolyMesh * OFFImporter::polyMesh | ( | ) |
get a pointer to the active polyMesh
get mesh as polyMesh
Definition at line 131 of file OFFImporter.cc.
void OFFImporter::removeOption | ( | ObjectOptionsE | _option | ) |
remove an option
Definition at line 530 of file OFFImporter.cc.
void OFFImporter::reserve | ( | unsigned int | _nv, |
unsigned int | _ne, | ||
unsigned int | _nf | ||
) |
Definition at line 481 of file OFFImporter.cc.
void OFFImporter::setFaceColor | ( | FaceHandle | _fh, |
int | _colorIndex | ||
) |
void OFFImporter::setNormal | ( | VertexHandle | _vh, |
int | _normalID | ||
) |
set vertex normal
Definition at line 196 of file OFFImporter.cc.
void OFFImporter::setObjectName | ( | QString | _name | ) |
change the name of an object
Definition at line 542 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 518 of file OFFImporter.cc.
void OFFImporter::setPath | ( | QString | _path | ) |
Definition at line 512 of file OFFImporter.cc.
void OFFImporter::setVertexColor | ( | VertexHandle | _vh, |
int | _colorIndex | ||
) |
void OFFImporter::setVertexTexCoord | ( | VertexHandle | _vh, |
int | _texCoordID | ||
) |
set vertex texture coordinate
Definition at line 151 of file OFFImporter.cc.
TriMesh * OFFImporter::triMesh | ( | ) |
get a pointer to the active triMesh
get mesh as triMesh
Definition at line 141 of file OFFImporter.cc.
Vec3f OFFImporter::vertex | ( | uint | _index | ) |
get vertex with given index
Definition at line 93 of file OFFImporter.cc.
|
private |
Definition at line 200 of file OFFImporter.hh.
|
private |
Definition at line 208 of file OFFImporter.hh.
|
private |
Definition at line 215 of file OFFImporter.hh.
|
private |
Definition at line 224 of file OFFImporter.hh.
|
private |
Definition at line 227 of file OFFImporter.hh.
|
private |
Definition at line 198 of file OFFImporter.hh.
|
private |
Definition at line 220 of file OFFImporter.hh.
|
private |
Definition at line 221 of file OFFImporter.hh.
|
private |
Definition at line 203 of file OFFImporter.hh.
|
private |
Definition at line 210 of file OFFImporter.hh.
|
private |
Definition at line 199 of file OFFImporter.hh.
|
private |
Definition at line 217 of file OFFImporter.hh.
|
private |
Definition at line 206 of file OFFImporter.hh.
|
private |
Definition at line 213 of file OFFImporter.hh.
|
private |
Definition at line 197 of file OFFImporter.hh.