Jafar
|
Mesher is the base class of all the modeling classes. More...
Mesher is the base class of all the modeling classes.
Definition at line 40 of file mesher.hpp.
#include <mesher.hpp>
Public Types | |
enum | HandledTypes { XYZ, PLY, UNKNOWN } |
typedef std::vector < fdetect_v2::InterestFeature < fdetect_v2::FloatDescriptor > * > | Origines |
Public Member Functions | |
Mesher () | |
Default consttructor. | |
Mesher (JfrMesh &_mesh) | |
Mesher (const std::string &filename) | |
Constructor. | |
virtual void | run (const float &, const float &, const float &)=0 |
geometrically constructs the mesh. | |
void | save (const std::string &file_name, bool save_binary=false) |
void | load (const std::string &file_name, int &mask) |
void | setVertices (const std::map< unsigned int, jblas::vec3 > &points) |
sets all the vertices no origines given | |
void | setVertices (const std::map< unsigned int, jblas::vec3 > &points, const std::map< unsigned int, Mesher::Origines > &origines) |
sets all the vertices along with their origines | |
void | addVertex (unsigned int id, const JfrMesh::CoordType &v, unsigned int &internal_id) |
adds a single vertex | |
void | addVertex (unsigned int id, const JfrMesh::CoordType &v, const std::vector< unsigned int > &origines, unsigned int &internal_id) |
adds a single vertex with the features it originates from | |
void | addVertex (unsigned int id, const JfrMesh::CoordType &v, const std::vector< unsigned int > &origines) |
adds a single vertex with the features it originates from | |
JfrMesh::VertexPointer | pointerFromPos (unsigned int position) |
return a vertex pointer to vertex at position in mesh vertices vector | |
void | setShots (const std::map< unsigned int, jblas::vec > &cameras, const std::map< unsigned int, geom::T3D * > &frames) |
sets all the shots | |
void | setShots (const jblas::vec &intrinsic, const std::map< unsigned int, geom::T3D * > &frames) |
sets all the shots, only one physical camera is present | |
void | addShot (unsigned int id, const jblas::vec &intr, const geom::T3D *extr) |
adds a single shot | |
void | addFeature (fdetect_v2::InterestFeature< fdetect_v2::FloatDescriptor > *ft) |
adds a feature to the mesh | |
void | update () |
update the mesh bounding box and the per face normals | |
void | update (JfrMesh::VertexPointer &vp) |
update a vertex pointer if necessary | |
unsigned int | lastShotId () |
returns the last shot id | |
Public Attributes | |
JfrMesh | mesh |
The processed mesh. | |
vcg::tri::Allocator< JfrMesh > ::PointerUpdater < JfrMesh::VertexPointer > | pu |
The pointer updater. | |
Private Member Functions | |
void | typeFromFileName (const std::string &filename, HandledTypes &type, std::string &extension) |
jafar::modeler::Mesher::Mesher | ( | JfrMesh & | _mesh | ) | [inline] |
_mesh,: | an existing mesh |
Definition at line 70 of file mesher.hpp.
jafar::modeler::Mesher::Mesher | ( | const std::string & | filename | ) | [inline] |
Constructor.
filename | XYZ or ply file name |
Definition at line 74 of file mesher.hpp.
References jafar::modeler::ModelerException::FILE_READING_ERROR, JFR_ERROR, jafar::kernel::CSVFileLoad::load(), mesh, and jafar::modeler::ModelerException::WRONG_TYPE.
void jafar::modeler::Mesher::addVertex | ( | unsigned int | id, |
const JfrMesh::CoordType & | v, | ||
unsigned int & | internal_id | ||
) |
adds a single vertex
id | vertex id |
v | 3D coordinates |
internal_id | the corresponding vertex position in the mesh internal vertices vector |
void jafar::modeler::Mesher::addVertex | ( | unsigned int | id, |
const JfrMesh::CoordType & | v, | ||
const std::vector< unsigned int > & | origines, | ||
unsigned int & | internal_id | ||
) |
adds a single vertex with the features it originates from
id | vertex id |
v | 3D coordinates |
origines | the vector of interest features the vertex originates from |
internal_id | the corresponding vertex position in the mesh internal vertices vector |
void jafar::modeler::Mesher::addVertex | ( | unsigned int | id, |
const JfrMesh::CoordType & | v, | ||
const std::vector< unsigned int > & | origines | ||
) |
adds a single vertex with the features it originates from
id | vertex id |
v | 3D coordinates |
origines | the vector of interest features the vertex originates from |
virtual void jafar::modeler::Mesher::run | ( | const float & | , |
const float & | , | ||
const float & | |||
) | [pure virtual] |
geometrically constructs the mesh.
Should be implemented by all the inheriting classes
Implemented in jafar::modeler::BPA.
Generated on Wed Oct 15 2014 00:37:42 for Jafar by doxygen 1.7.6.1 |