Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Public Attributes | Private Member Functions
jafar::modeler::Mesher Class Reference

Mesher is the base class of all the modeling classes. More...


Detailed Description

Mesher is the base class of all the modeling classes.

Definition at line 40 of file mesher.hpp.

#include <mesher.hpp>

Inheritance diagram for jafar::modeler::Mesher:
Inheritance graph
[legend]

List of all members.

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)

Constructor & Destructor Documentation

jafar::modeler::Mesher::Mesher ( JfrMesh _mesh) [inline]
Parameters:
_mesh,:an existing mesh

Definition at line 70 of file mesher.hpp.

jafar::modeler::Mesher::Mesher ( const std::string &  filename) [inline]

Constructor.

Parameters:
filenameXYZ 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.


Member Function Documentation

void jafar::modeler::Mesher::addVertex ( unsigned int  id,
const JfrMesh::CoordType &  v,
unsigned int &  internal_id 
)

adds a single vertex

Parameters:
idvertex id
v3D coordinates
internal_idthe corresponding vertex position in the mesh internal vertices vector
Remarks:
no update is run
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

Parameters:
idvertex id
v3D coordinates
originesthe vector of interest features the vertex originates from
Returns:
Parameters:
internal_idthe corresponding vertex position in the mesh internal vertices vector
Remarks:
no update is run
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

Parameters:
idvertex id
v3D coordinates
originesthe vector of interest features the vertex originates from
Remarks:
no update is run
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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:42 for Jafar by doxygen 1.7.6.1
LAAS-CNRS