Commit eeaa15ab authored by Pierre Kraemer's avatar Pierre Kraemer

CGoGNendl -> std::endl : incompatible avec ostream

parent c1269877
...@@ -47,7 +47,6 @@ using namespace CGoGN ; ...@@ -47,7 +47,6 @@ using namespace CGoGN ;
* Ajouter les widgets necessaires, mettre des noms clairs pour * Ajouter les widgets necessaires, mettre des noms clairs pour
* les utiliser dans le .cpp (pour les call back principalement) * les utiliser dans le .cpp (pour les call back principalement)
*/ */
class MyQT: public Utils::QT::SimpleQT class MyQT: public Utils::QT::SimpleQT
{ {
Q_OBJECT Q_OBJECT
......
...@@ -149,7 +149,7 @@ void decimate( ...@@ -149,7 +149,7 @@ void decimate(
while(!finished) while(!finished)
{ {
CGoGNout << "Countdown : " ; CGoGNout << "Countdown : " ;
CGoGNout << std::setprecision(8) << (nbVertices - nbWantedVertices) << "\r" << std::flush; CGoGNout << std::setprecision(8) << (nbVertices - nbWantedVertices) << "\r" << /* flush */ CGoGNendl ;
if(!selector->nextEdge(d)) { if(!selector->nextEdge(d)) {
CGoGNout << CGoGNendl << "out" << CGoGNendl ; CGoGNout << CGoGNendl << "out" << CGoGNendl ;
......
...@@ -86,28 +86,28 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons ...@@ -86,28 +86,28 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
} }
} }
out << "ply" << CGoGNendl ; out << "ply" << std::endl ;
out << "format ascii 1.0" << CGoGNendl ; out << "format ascii 1.0" << std::endl ;
out << "comment no comment" << CGoGNendl ; out << "comment no comment" << std::endl ;
out << "element vertex " << vertices.size() << CGoGNendl ; out << "element vertex " << vertices.size() << std::endl ;
out << "property float x" << CGoGNendl ; out << "property float x" << std::endl ;
out << "property float y" << CGoGNendl ; out << "property float y" << std::endl ;
out << "property float z" << CGoGNendl ; out << "property float z" << std::endl ;
out << "element face " << facesSize.size() << CGoGNendl ; out << "element face " << facesSize.size() << std::endl ;
out << "property list uchar int vertex_indices" << CGoGNendl ; out << "property list uchar int vertex_indices" << std::endl ;
out << "end_header" << CGoGNendl ; out << "end_header" << std::endl ;
for(unsigned int i = 0; i < vertices.size(); ++i) for(unsigned int i = 0; i < vertices.size(); ++i)
{ {
const VEC3& v = position[vertices[i]] ; const VEC3& v = position[vertices[i]] ;
out << v[0] << " " << v[1] << " " << v[2] << CGoGNendl ; out << v[0] << " " << v[1] << " " << v[2] << std::endl ;
} }
for(unsigned int i = 0; i < facesSize.size(); ++i) for(unsigned int i = 0; i < facesSize.size(); ++i)
{ {
out << facesSize[i] ; out << facesSize[i] ;
for(unsigned int j = 0; j < facesIdx[i].size(); ++j) for(unsigned int j = 0; j < facesIdx[i].size(); ++j)
out << " " << facesIdx[i][j] ; out << " " << facesIdx[i][j] ;
out << CGoGNendl ; out << std::endl ;
} }
out.close() ; out.close() ;
...@@ -164,20 +164,20 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons ...@@ -164,20 +164,20 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
} }
} }
out << "OFF" << CGoGNendl ; out << "OFF" << std::endl ;
out << vertices.size() << " " << facesSize.size() << " " << 0 << CGoGNendl ; out << vertices.size() << " " << facesSize.size() << " " << 0 << std::endl ;
for(unsigned int i = 0; i < vertices.size(); ++i) for(unsigned int i = 0; i < vertices.size(); ++i)
{ {
const VEC3& v = position[vertices[i]] ; const VEC3& v = position[vertices[i]] ;
out << v[0] << " " << v[1] << " " << v[2] << CGoGNendl ; out << v[0] << " " << v[1] << " " << v[2] << std::endl ;
} }
for(unsigned int i = 0; i < facesSize.size(); ++i) for(unsigned int i = 0; i < facesSize.size(); ++i)
{ {
out << facesSize[i] ; out << facesSize[i] ;
for(unsigned int j = 0; j < facesIdx[i].size(); ++j) for(unsigned int j = 0; j < facesIdx[i].size(); ++j)
out << " " << facesIdx[i][j] ; out << " " << facesIdx[i][j] ;
out << CGoGNendl ; out << std::endl ;
} }
out.close() ; out.close() ;
...@@ -219,7 +219,6 @@ bool exportCTM(typename PFP::MAP& the_map, const typename PFP::TVEC3& position, ...@@ -219,7 +219,6 @@ bool exportCTM(typename PFP::MAP& the_map, const typename PFP::TVEC3& position,
verticesBuffer.push_back(vert[0]); verticesBuffer.push_back(vert[0]);
verticesBuffer.push_back(vert[1]); verticesBuffer.push_back(vert[1]);
verticesBuffer.push_back(vert[2]); verticesBuffer.push_back(vert[2]);
// CGoGNout << vert<< CGoGNendl;
} }
indicesBuffer.push_back(tableVertLab[e]); indicesBuffer.push_back(tableVertLab[e]);
e = the_map.phi1(e); e = the_map.phi1(e);
...@@ -227,13 +226,6 @@ bool exportCTM(typename PFP::MAP& the_map, const typename PFP::TVEC3& position, ...@@ -227,13 +226,6 @@ bool exportCTM(typename PFP::MAP& the_map, const typename PFP::TVEC3& position,
} }
} }
// for (int i=0; i< indicesBuffer.size(); ++i)
// {
// CGoGNout << indicesBuffer[i]<<", "<< CGoGNendl;
// if (i%3==0)
// CGoGNout << CGoGNendl;
// }
// Save the file using the OpenCTM API // Save the file using the OpenCTM API
CTMexporter ctm; CTMexporter ctm;
...@@ -311,43 +303,43 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P ...@@ -311,43 +303,43 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
} }
} }
out << "ply" << CGoGNendl ; out << "ply" << std::endl ;
out << "format ascii 1.0" << CGoGNendl ; out << "format ascii 1.0" << std::endl ;
out << "comment ply PTM (F. Larue format)" << CGoGNendl ; out << "comment ply PTM (F. Larue format)" << std::endl ;
out << "element vertex " << vertices.size() << CGoGNendl ; out << "element vertex " << vertices.size() << std::endl ;
out << "property float x" << CGoGNendl ; out << "property float x" << std::endl ;
out << "property float y" << CGoGNendl ; out << "property float y" << std::endl ;
out << "property float z" << CGoGNendl ; out << "property float z" << std::endl ;
out << "property float tx" << CGoGNendl ; out << "property float tx" << std::endl ;
out << "property float ty" << CGoGNendl ; out << "property float ty" << std::endl ;
out << "property float tz" << CGoGNendl ; out << "property float tz" << std::endl ;
out << "property float bx" << CGoGNendl ; out << "property float bx" << std::endl ;
out << "property float by" << CGoGNendl ; out << "property float by" << std::endl ;
out << "property float bz" << CGoGNendl ; out << "property float bz" << std::endl ;
out << "property float nx" << CGoGNendl ; out << "property float nx" << std::endl ;
out << "property float ny" << CGoGNendl ; out << "property float ny" << std::endl ;
out << "property float nz" << CGoGNendl ; out << "property float nz" << std::endl ;
out << "property float L1_a" << CGoGNendl ; out << "property float L1_a" << std::endl ;
out << "property float L1_b" << CGoGNendl ; out << "property float L1_b" << std::endl ;
out << "property float L1_c" << CGoGNendl ; out << "property float L1_c" << std::endl ;
out << "property float L1_d" << CGoGNendl ; out << "property float L1_d" << std::endl ;
out << "property float L1_e" << CGoGNendl ; out << "property float L1_e" << std::endl ;
out << "property float L1_f" << CGoGNendl ; out << "property float L1_f" << std::endl ;
out << "property float L2_a" << CGoGNendl ; out << "property float L2_a" << std::endl ;
out << "property float L2_b" << CGoGNendl ; out << "property float L2_b" << std::endl ;
out << "property float L2_c" << CGoGNendl ; out << "property float L2_c" << std::endl ;
out << "property float L2_d" << CGoGNendl ; out << "property float L2_d" << std::endl ;
out << "property float L2_e" << CGoGNendl ; out << "property float L2_e" << std::endl ;
out << "property float L2_f" << CGoGNendl ; out << "property float L2_f" << std::endl ;
out << "property float L3_a" << CGoGNendl ; out << "property float L3_a" << std::endl ;
out << "property float L3_b" << CGoGNendl ; out << "property float L3_b" << std::endl ;
out << "property float L3_c" << CGoGNendl ; out << "property float L3_c" << std::endl ;
out << "property float L3_d" << CGoGNendl ; out << "property float L3_d" << std::endl ;
out << "property float L3_e" << CGoGNendl ; out << "property float L3_e" << std::endl ;
out << "property float L3_f" << CGoGNendl ; out << "property float L3_f" << std::endl ;
out << "element face " << nbf << CGoGNendl ; out << "element face " << nbf << std::endl ;
out << "property list uchar int vertex_indices" << CGoGNendl ; out << "property list uchar int vertex_indices" << std::endl ;
out << "end_header" << CGoGNendl ; out << "end_header" << std::endl ;
for(unsigned int i = 0; i < vertices.size(); ++i) for(unsigned int i = 0; i < vertices.size(); ++i)
{ {
...@@ -358,7 +350,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P ...@@ -358,7 +350,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
out << frame[2][vi][0] << " " << frame[2][vi][1] << " " << frame[2][vi][2] << " " ; out << frame[2][vi][0] << " " << frame[2][vi][1] << " " << frame[2][vi][2] << " " ;
out << colorPTM[0][vi][0] << " " << colorPTM[1][vi][0] << " " << colorPTM[2][vi][0] << " " << colorPTM[3][vi][0] << " " << colorPTM[4][vi][0] << " " << colorPTM[5][vi][0] <<" " ; out << colorPTM[0][vi][0] << " " << colorPTM[1][vi][0] << " " << colorPTM[2][vi][0] << " " << colorPTM[3][vi][0] << " " << colorPTM[4][vi][0] << " " << colorPTM[5][vi][0] <<" " ;
out << colorPTM[0][vi][1] << " " << colorPTM[1][vi][1] << " " << colorPTM[2][vi][1] << " " << colorPTM[3][vi][1] << " " << colorPTM[4][vi][1] << " " << colorPTM[5][vi][1] <<" " ; out << colorPTM[0][vi][1] << " " << colorPTM[1][vi][1] << " " << colorPTM[2][vi][1] << " " << colorPTM[3][vi][1] << " " << colorPTM[4][vi][1] << " " << colorPTM[5][vi][1] <<" " ;
out << colorPTM[0][vi][2] << " " << colorPTM[1][vi][2] << " " << colorPTM[2][vi][2] << " " << colorPTM[3][vi][2] << " " << colorPTM[4][vi][2] << " " << colorPTM[5][vi][2] << CGoGNendl ; out << colorPTM[0][vi][2] << " " << colorPTM[1][vi][2] << " " << colorPTM[2][vi][2] << " " << colorPTM[3][vi][2] << " " << colorPTM[4][vi][2] << " " << colorPTM[5][vi][2] << std::endl ;
} }
std::vector<unsigned int>::iterator it = faces.begin(); std::vector<unsigned int>::iterator it = faces.begin();
...@@ -368,7 +360,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P ...@@ -368,7 +360,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
out << nbe ; out << nbe ;
for(unsigned int j = 0; j < nbe; ++j) for(unsigned int j = 0; j < nbe; ++j)
out << " " << *it++; out << " " << *it++;
out << CGoGNendl ; out << std::endl ;
} }
out.close() ; out.close() ;
......
...@@ -56,8 +56,7 @@ typename PFP::VEC3 stringToEmb(std::string s) ...@@ -56,8 +56,7 @@ typename PFP::VEC3 stringToEmb(std::string s)
return coord; return coord;
} }
inline unsigned int gcd(unsigned int a, unsigned int b)
unsigned int gcd(unsigned int a, unsigned int b)
{ {
while ( true ) while ( true )
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "Algo/ProgressiveMesh/vsplit.h" #include "Algo/ProgressiveMesh/vsplit.h"
#include "Algo/Decimation/selector.h" #include "Algo/Decimation/selector.h"
#include "Algo/Decimation/edgeSelector.h"
#include "Algo/Decimation/geometryApproximator.h" #include "Algo/Decimation/geometryApproximator.h"
#include "Algo/Decimation/geometryPredictor.h" #include "Algo/Decimation/geometryPredictor.h"
#include "Algo/Decimation/lightfieldApproximator.h" #include "Algo/Decimation/lightfieldApproximator.h"
......
...@@ -41,7 +41,7 @@ ProgressiveMesh<PFP>::ProgressiveMesh( ...@@ -41,7 +41,7 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
) : ) :
m_map(map), positionsTable(position), inactiveMarker(inactive), dartSelect(inactiveMarker) m_map(map), positionsTable(position), inactiveMarker(inactive), dartSelect(inactiveMarker)
{ {
CGoGNout << " creating approximator and predictor.." << std::flush ; CGoGNout << " creating approximator and predictor.." << /* flush */ CGoGNendl ;
switch(a) switch(a)
{ {
case Algo::Decimation::A_QEM : { case Algo::Decimation::A_QEM : {
...@@ -70,17 +70,10 @@ ProgressiveMesh<PFP>::ProgressiveMesh( ...@@ -70,17 +70,10 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
m_predictors.push_back(pred) ; m_predictors.push_back(pred) ;
m_approximators.push_back(new Algo::Decimation::Approximator_MidEdge<PFP>(m_map, positionsTable, pred)) ; m_approximators.push_back(new Algo::Decimation::Approximator_MidEdge<PFP>(m_map, positionsTable, pred)) ;
break ; } break ; }
case Algo::Decimation::A_LightfieldFull : {
m_approximators.push_back(new Algo::Decimation::Approximator_QEM<PFP>(m_map, positionsTable)) ;
AttributeHandler<Geom::Matrix<3,3,typename PFP::REAL> > frame = m_map.template getAttribute<Geom::Matrix<3,3,typename PFP::REAL> >(VERTEX_ORBIT, "frame") ;
AttributeHandler<Geom::Matrix<3,6,typename PFP::REAL> > RGBfunctions = m_map.template getAttribute<Geom::Matrix<3,6,typename PFP::REAL> >(VERTEX_ORBIT, "RGBfunctions") ;
m_approximators.push_back(new Algo::Decimation::Approximator_Frame<PFP>(m_map, frame)) ;
m_approximators.push_back(new Algo::Decimation::Approximator_RGBfunctions<PFP>(m_map, RGBfunctions)) ;
break ; }
} }
CGoGNout << "..done" << CGoGNendl ; CGoGNout << "..done" << CGoGNendl ;
CGoGNout << " creating selector.." << std::flush ; CGoGNout << " creating selector.." << /* flush */ CGoGNendl ;
switch(s) switch(s)
{ {
case Algo::Decimation::S_MapOrder : { case Algo::Decimation::S_MapOrder : {
...@@ -101,15 +94,12 @@ ProgressiveMesh<PFP>::ProgressiveMesh( ...@@ -101,15 +94,12 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
case Algo::Decimation::S_Curvature : { case Algo::Decimation::S_Curvature : {
m_selector = new Algo::Decimation::EdgeSelector_Curvature<PFP>(m_map, positionsTable, m_approximators, dartSelect) ; m_selector = new Algo::Decimation::EdgeSelector_Curvature<PFP>(m_map, positionsTable, m_approximators, dartSelect) ;
break ; } break ; }
case Algo::Decimation::S_Lightfield : {
m_selector = new Algo::Decimation::EdgeSelector_Lightfield<PFP>(map, positionsTable, m_approximators, dartSelect) ;
break ; }
} }
CGoGNout << "..done" << CGoGNendl ; CGoGNout << "..done" << CGoGNendl ;
m_initOk = true ; m_initOk = true ;
CGoGNout << " initializing approximators.." << std::flush ; CGoGNout << " initializing approximators.." << /* flush */ CGoGNendl ;
for(typename std::vector<Algo::Decimation::ApproximatorGen<PFP>*>::iterator it = m_approximators.begin(); it != m_approximators.end(); ++it) for(typename std::vector<Algo::Decimation::ApproximatorGen<PFP>*>::iterator it = m_approximators.begin(); it != m_approximators.end(); ++it)
{ {
if(! (*it)->init()) if(! (*it)->init())
...@@ -119,13 +109,13 @@ ProgressiveMesh<PFP>::ProgressiveMesh( ...@@ -119,13 +109,13 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
} }
CGoGNout << "..done" << CGoGNendl ; CGoGNout << "..done" << CGoGNendl ;
CGoGNout << " initializing predictors.." << std::flush ; CGoGNout << " initializing predictors.." << /* flush */ CGoGNendl ;
for(typename std::vector<Algo::Decimation::PredictorGen<PFP>*>::iterator it = m_predictors.begin(); it != m_predictors.end(); ++it) for(typename std::vector<Algo::Decimation::PredictorGen<PFP>*>::iterator it = m_predictors.begin(); it != m_predictors.end(); ++it)
if(! (*it)->init()) if(! (*it)->init())
m_initOk = false ; m_initOk = false ;
CGoGNout << "..done" << CGoGNendl ; CGoGNout << "..done" << CGoGNendl ;
CGoGNout << " initializing selector.." << std::flush ; CGoGNout << " initializing selector.." << /* flush */ CGoGNendl ;
m_initOk = m_selector->init() ; m_initOk = m_selector->init() ;
CGoGNout << "..done" << CGoGNendl ; CGoGNout << "..done" << CGoGNendl ;
...@@ -155,7 +145,7 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices) ...@@ -155,7 +145,7 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices)
{ {
unsigned int nbVertices = m_map.getNbOrbits(VERTEX_ORBIT) ; unsigned int nbVertices = m_map.getNbOrbits(VERTEX_ORBIT) ;
unsigned int nbWantedVertices = nbVertices * percentWantedVertices / 100 ; unsigned int nbWantedVertices = nbVertices * percentWantedVertices / 100 ;
CGoGNout << " creating PM (" << nbVertices << " vertices).." << std::flush ; CGoGNout << " creating PM (" << nbVertices << " vertices).." << /* flush */ CGoGNendl ;
bool finished = false ; bool finished = false ;
Dart d ; Dart d ;
...@@ -535,7 +525,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion() ...@@ -535,7 +525,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion()
float distance; float distance;
Point p; Point p;
CGoGNout << "calcul de la courbe débit distortion " << std::flush; CGoGNout << "calcul de la courbe débit distortion " << CGoGNendl;
// get original detail vectors // get original detail vectors
for(unsigned int i = 0; i < m_splits.size(); ++i) for(unsigned int i = 0; i < m_splits.size(); ++i)
...@@ -573,7 +563,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion() ...@@ -573,7 +563,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion()
courbe.push_back(p); courbe.push_back(p);
// returns to coarse mesh // returns to coarse mesh
gotoLevel(nbSplits()); gotoLevel(nbSplits());
CGoGNout << "..." << std::flush; CGoGNout << "..." << CGoGNendl;
} }
q.erase(); q.erase();
} }
......
...@@ -34,7 +34,6 @@ namespace Algo ...@@ -34,7 +34,6 @@ namespace Algo
namespace PMesh namespace PMesh
{ {
template <typename PFP> template <typename PFP>
class VSplit class VSplit
{ {
...@@ -98,7 +97,6 @@ public: ...@@ -98,7 +97,6 @@ public:
} }
} ; } ;
} //namespace PMesh } //namespace PMesh
} //namespace Algo } //namespace Algo
......
...@@ -284,8 +284,7 @@ Intersection intersectionSegmentTriangle(const VEC3& PA, const VEC3& PB, const V ...@@ -284,8 +284,7 @@ Intersection intersectionSegmentTriangle(const VEC3& PA, const VEC3& PB, const V
template <typename VEC3, typename PLANE3D> template <typename VEC3, typename PLANE3D>
Intersection intersectPlaneRay(const PLANE3D& pl,const VEC3& p1,const VEC3& dir, VEC3& Inter) Intersection intersectPlaneRay(const PLANE3D& pl,const VEC3& p1,const VEC3& dir, VEC3& Inter)
{ {
typename VEC3::DATA_TYPE isect; typename VEC3::DATA_TYPE isect = (pl.normal() * (pl.normal()*pl.d()-p1)) / (pl.normal()*dir);
isect = (pl.normal()*(pl.normal()*pl.d()-p1)) / (pl.normal()*dir);
if(0.0f <= isect) if(0.0f <= isect)
{ {
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
namespace CGoGN { namespace Utils { class GLSLShader; } } namespace CGoGN { namespace Utils { class GLSLShader; } }
//namespace CGoGN { namespace Geom { class Vec3f; } }
namespace CGoGN namespace CGoGN
{ {
...@@ -173,6 +172,11 @@ public: ...@@ -173,6 +172,11 @@ public:
*/ */
void setParamObject(float width, float* pos) { m_glWidget->setParamObject(width, pos); } void setParamObject(float width, float* pos) { m_glWidget->setParamObject(width, pos); }
/**
* set focal
*/
void setFocal(float f) { m_glWidget->setFocal(f); }
/** /**
* get the mouse position in GL widget * get the mouse position in GL widget
*/ */
...@@ -310,7 +314,7 @@ public: ...@@ -310,7 +314,7 @@ public:
* @param dir base directory * @param dir base directory
* @param filters file filters (syntax: "label1 (filter1);; label2 (filter2);; ...") * @param filters file filters (syntax: "label1 (filter1);; label2 (filter2);; ...")
*/ */
std::string selectFile(const std::string& title = "open file", const std::string& dir = ".", const std::string& filters = "all (*.*)"); std::string selectFile(const std::string& title = "open file", const std::string& dir = ".", const std::string& filters = "all (*.*)");
public slots: public slots:
virtual void cb_New() { std::cerr << "callback not implemented" << std::endl; } virtual void cb_New() { std::cerr << "callback not implemented" << std::endl; }
......
...@@ -71,8 +71,6 @@ protected: ...@@ -71,8 +71,6 @@ protected:
int m_current_button; int m_current_button;
int beginx; int beginx;
int beginy; int beginy;
// float curquat[4];
// float lastquat[4];
int newModel; int newModel;
int moving; int moving;
......
...@@ -34,14 +34,16 @@ namespace Utils ...@@ -34,14 +34,16 @@ namespace Utils
namespace QT namespace QT
{ {
class uiDockInterface: public QDockWidget, public Ui::DockWidget class uiDockInterface : public QDockWidget, public Ui::DockWidget
{ {
public: public:
uiDockInterface() { setupUi(this); } uiDockInterface() { setupUi(this); }
}; };
} } // namespace QT
}
} } // namespace Utils
} // namespace CGoGN
#endif #endif
...@@ -72,11 +72,11 @@ public: ...@@ -72,11 +72,11 @@ public:
void zero () ; void zero () ;
friend std::ostream& operator<< (std::ostream &out, const QuadricRGBfunctions& q) { friend std::ostream& operator<< (std::ostream &out, const QuadricRGBfunctions& q) {
out << "quadricRGBf : " << CGoGNendl ; out << "quadricRGBf : " << std::endl ;
out << "q.A" << "= " << q.A << CGoGNendl ; out << "q.A" << "= " << q.A << std::endl ;
for (unsigned int i = 0 ; i < 3 ; ++i) { for (unsigned int i = 0 ; i < 3 ; ++i) {
out << "q.b["<<i<<"] = " << q.b[i] << CGoGNendl ; out << "q.b["<<i<<"] = " << q.b[i] << std::endl ;
out << "q.c["<<i<<"] = " << q.c[i] << CGoGNendl ; out << "q.c["<<i<<"] = " << q.c[i] << std::endl ;
} }
return out ; return out ;
} ; } ;
......
...@@ -280,7 +280,7 @@ void Quantization<VEC>::vectorQuantizationDistortion(float distortionGoal, std:: ...@@ -280,7 +280,7 @@ void Quantization<VEC>::vectorQuantizationDistortion(float distortionGoal, std::
computeDiscreteEntropy() ; computeDiscreteEntropy() ;
} }
float log2(float x) inline float log2(float x)
{ {
return log(x) / log(2.0f) ; return log(x) / log(2.0f) ;
} }
......
...@@ -542,7 +542,8 @@ bool GLSLShader::bind() const ...@@ -542,7 +542,8 @@ bool GLSLShader::bind() const
glUseProgramObjectARB( m_program_object ); glUseProgramObjectARB( m_program_object );
return true; return true;
} }
else return false; else
return false;
} }
void GLSLShader::unbind() const void GLSLShader::unbind() const
......
...@@ -43,7 +43,6 @@ namespace QT ...@@ -43,7 +43,6 @@ namespace QT
SimpleQT::SimpleQT(): SimpleQT::SimpleQT():
m_dock(NULL) m_dock(NULL)
{ {
m_glWidget = new GLWidget(this); m_glWidget = new GLWidget(this);
setCentralWidget(m_glWidget); setCentralWidget(m_glWidget);
setWindowTitle(tr("CGoGN")); setWindowTitle(tr("CGoGN"));
......
...@@ -69,8 +69,8 @@ void GLWidget::setParamObject(float width, float* pos) ...@@ -69,8 +69,8 @@ void GLWidget::setParamObject(float width, float* pos)
void GLWidget::setFocal(float df) void GLWidget::setFocal(float df)
{ {