Commit 9ea79e65 authored by untereiner's avatar untereiner

Merge cgogn:~vanhoey/CGoGN

parents b102db67 6d652049
......@@ -76,7 +76,37 @@ bool exportTrian(typename PFP::MAP& map, const typename PFP::TVEC3& position, ch
* @return true
*/
template <typename PFP>
bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const FunctorSelect& good = allDarts) ;
bool exportPlySLFgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format).
*
* exports position + any attribute named : "frame_T" (frame tangent : VEC3), "frame_B" (frame binormal : VEC3), "frame_N" (frame normal : VEC3),
* "colorPTM_a<i> : VEC3" (coefficient number i of the 3 polynomials - one per channel - ; the max i depends on the degree of the PTM polynomial),
* "errL2 : REAL" (L2 fitting error), "errLmax : REAL" (maximal fitting error), "stdDev : REAL" (standard deviation of the L2 fitting errors).
*
* @param map map to be exported
* @param filename filename of ply file
* @param position the position container
* @return true
*/
template <typename PFP>
bool exportPlySLFgenericBin(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a PLYSLF file (K. Vanhoey generic format).
*
* exports position + any attribute named : "frame_T" (frame tangent : VEC3), "frame_B" (frame binormal : VEC3), "frame_N" (frame normal : VEC3),
* "SLF_<i> : VEC3" (coefficient number i of the 3 - one per channel - ; the max i is nbCoefs),
*
* @param map map to be exported
* @param filename filename of ply file
* @param position the position container
* @param nbCoefs the number of coefficients of the representation
* @return true
*/
template <typename PFP>
bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format)
......@@ -88,7 +118,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ
* @return true
*/
template <typename PFP>
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const typename PFP::TVEC3 frame[3], const typename PFP::TVEC3 colorPTM[6], const FunctorSelect& good) ;
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const typename PFP::TVEC3 frame[3], const typename PFP::TVEC3 colorPTM[6], const FunctorSelect& good = allDarts) ;
} // namespace Export
......
This diff is collapsed.
......@@ -52,7 +52,7 @@ namespace Import
namespace ImportSurfacique
{
enum ImportType { UNKNOWNSURFACE, TRIAN, TRIANBGZ, PLY, PLYPTM, PLYPTMgeneric, OFF, OBJ, VRML, AHEM };
enum ImportType { UNKNOWNSURFACE, TRIAN, TRIANBGZ, MESHBIN, PLY, PLYPTM, PLYSLFgeneric, PLYSLFgenericBin, OFF, OBJ, VRML, AHEM };
}
namespace ImportVolumique
......@@ -109,12 +109,16 @@ public:
bool importOff(const std::string& filename, std::vector<std::string>& attrNames);
bool importMeshBin(const std::string& filename, std::vector<std::string>& attrNames);
bool importObj(const std::string& filename, std::vector<std::string>& attrNames);
bool importPly(const std::string& filename, std::vector<std::string>& attrNames);
bool importPlyPTM(const std::string& filename, std::vector<std::string>& attrNames);
bool importPlyPTMgeneric(const std::string& filename, std::vector<std::string>& attrNames);
bool importPlySLFgeneric(const std::string& filename, std::vector<std::string>& attrNames);
bool importPlySLFgenericBin(const std::string& filename, std::vector<std::string>& attrNames);
#ifdef WITH_ASSIMP
bool importASSIMP(const std::string& filename, std::vector<std::string>& attrNames);
#endif
......
......@@ -402,7 +402,7 @@ public:
*/
std::string selectFileSave(const std::string& title = "open file", const std::string& dir = ".", const std::string& filters = "all (*.*)");
void snapshot(const QString& filename);
void snapshot(const QString& filename, const char* format = 0, const int& quality = -1);
public slots:
virtual void cb_New() { std::cerr << "callback not implemented" << std::endl; }
......
......@@ -514,10 +514,10 @@ void SimpleQT::cb_about()
QMessageBox::about(this, tr("About App"), m_helpString.c_str());
}
void SimpleQT::snapshot(const QString& filename)
void SimpleQT::snapshot(const QString& filename, const char* format, const int& quality)
{
QImage im = m_glWidget->grabFrameBuffer(false);
im.save(filename);
im.save(filename, format, quality);
}
void SimpleQT::setGeometry(int x, int y, int w, int h)
......
......@@ -117,7 +117,7 @@ void GLWidget::recalcModelView()
oglTranslate(m_obj_pos[0], m_obj_pos[1], m_obj_pos[2]);
// ajout transformation
// m_cbs->modelViewMatrix() *=m_cbs->transfoMatrix();
// m_cbs->modelViewMatrix() *= m_cbs->transfoMatrix();
newModel = 0;
......@@ -487,6 +487,7 @@ float GLWidget::getWidthInWorld(unsigned int pixel_width, const Geom::Vec3f& cen
void GLWidget::transfoRotate(float angle, float x, float y, float z)
{
m_cbs->transfoMatrix() = glm::rotate( m_cbs->transfoMatrix(), angle, glm::vec3(x,y,z));
recalcModelView() ;
}
void GLWidget::transfoTranslate(float tx, float ty, float tz)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment