Commit 7dd5fd61 authored by Pierre Kraemer's avatar Pierre Kraemer

diverses petites modifs..

parent 4eff38ed
...@@ -117,12 +117,12 @@ void computeCurvatureVertex_QuadraticFitting( ...@@ -117,12 +117,12 @@ void computeCurvatureVertex_QuadraticFitting(
template <typename PFP> template <typename PFP>
void vertexQuadraticFitting( void vertexQuadraticFitting(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart dart, Dart dart,
typename PFP::MATRIX33& localFrame, typename PFP::MATRIX33& localFrame,
const typename PFP::TVEC3& position, const typename PFP::TVEC3& position,
const typename PFP::TVEC3& normal, const typename PFP::TVEC3& normal,
float& a, float& b, float& c, float& d, float& e) float& a, float& b, float& c, float& d, float& e)
{ {
typename PFP::VEC3 p = position[dart] ; typename PFP::VEC3 p = position[dart] ;
...@@ -352,7 +352,7 @@ void computeCurvatureVertex_NormalCycles( ...@@ -352,7 +352,7 @@ void computeCurvatureVertex_NormalCycles(
const std::vector<Dart>& vd1 = neigh.getInsideEdges() ; const std::vector<Dart>& vd1 = neigh.getInsideEdges() ;
for (std::vector<Dart>::const_iterator it = vd1.begin(); it != vd1.end(); ++it) for (std::vector<Dart>::const_iterator it = vd1.begin(); it != vd1.end(); ++it)
{ {
const VEC3 e = position[map.phi2(*it)] - position[*it] ; const VEC3 e = Algo::Geometry::vectorOutOfDart<PFP>(map, *it, position) ;
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ; tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ;
} }
// border // border
......
...@@ -38,7 +38,7 @@ template <typename PFP> ...@@ -38,7 +38,7 @@ template <typename PFP>
void featureEdgeDetection(typename PFP::MAP& map, const typename PFP::TVEC3& position, CellMarker& featureEdge) ; void featureEdgeDetection(typename PFP::MAP& map, const typename PFP::TVEC3& position, CellMarker& featureEdge) ;
template <typename PFP> template <typename PFP>
std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& viewDir, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) ; std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& cameraPosition, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) ;
} // namespace Geometry } // namespace Geometry
......
...@@ -62,7 +62,7 @@ void featureEdgeDetection(typename PFP::MAP& map, typename PFP::TVEC3& position, ...@@ -62,7 +62,7 @@ void featureEdgeDetection(typename PFP::MAP& map, typename PFP::TVEC3& position,
} }
template <typename PFP> template <typename PFP>
std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& viewDir, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& cameraPosition, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal)
{ {
typedef typename PFP::VEC3 VEC3 ; typedef typename PFP::VEC3 VEC3 ;
typedef typename PFP::REAL REAL ; typedef typename PFP::REAL REAL ;
...@@ -75,38 +75,44 @@ std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& ma ...@@ -75,38 +75,44 @@ std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& ma
if(!m.isMarked(d)) if(!m.isMarked(d))
{ {
m.mark(d) ; m.mark(d) ;
REAL dp1 = viewDir * normal[d] ;
REAL dp2 = viewDir * normal[map.phi1(d)] ; VEC3 p1 = position[d] ;
REAL dp3 = viewDir * normal[map.phi_1(d)] ; VEC3 p2 = position[map.phi1(d)] ;
VEC3 p3 = position[map.phi_1(d)] ;
REAL dp1 = (p1 - cameraPosition) * normal[d] ;
REAL dp2 = (p2 - cameraPosition) * normal[map.phi1(d)] ;
REAL dp3 = (p3 - cameraPosition) * normal[map.phi_1(d)] ;
if(dp1 < 0 && dp2 > 0) if(dp1 < 0 && dp2 > 0)
{ {
REAL alpha = -dp1 / (-dp1 + dp2) ; REAL alpha = -dp1 / (-dp1 + dp2) ;
occludingContours.push_back(alpha * position[d] + (1 - alpha) * position[map.phi1(d)]) ; occludingContours.push_back(alpha * p1 + (1 - alpha) * p2) ;
} }
if(dp2 < 0 && dp1 > 0) if(dp2 < 0 && dp1 > 0)
{ {
REAL alpha = dp1 / (dp1 - dp2) ; REAL alpha = dp1 / (dp1 - dp2) ;
occludingContours.push_back(alpha * position[d] + (1 - alpha) * position[map.phi1(d)]) ; occludingContours.push_back(alpha * p1 + (1 - alpha) * p2) ;
} }
if(dp1 < 0 && dp3 > 0) if(dp1 < 0 && dp3 > 0)
{ {
REAL alpha = -dp1 / (-dp1 + dp3) ; REAL alpha = -dp1 / (-dp1 + dp3) ;
occludingContours.push_back(alpha * position[d] + (1 - alpha) * position[map.phi_1(d)]) ; occludingContours.push_back(alpha * p1 + (1 - alpha) * p3) ;
} }
if(dp3 < 0 && dp1 > 0) if(dp3 < 0 && dp1 > 0)
{ {
REAL alpha = dp1 / (dp1 - dp3) ; REAL alpha = dp1 / (dp1 - dp3) ;
occludingContours.push_back(alpha * position[d] + (1 - alpha) * position[map.phi_1(d)]) ; occludingContours.push_back(alpha * p1 + (1 - alpha) * p3) ;
} }
if(dp2 < 0 && dp3 > 0) if(dp2 < 0 && dp3 > 0)
{ {
REAL alpha = -dp2 / (-dp2 + dp3) ; REAL alpha = -dp2 / (-dp2 + dp3) ;
occludingContours.push_back(alpha * position[map.phi1(d)] + (1 - alpha) * position[map.phi_1(d)]) ; occludingContours.push_back(alpha * p2 + (1 - alpha) * p3) ;
} }
if(dp3 < 0 && dp2 > 0) if(dp3 < 0 && dp2 > 0)
{ {
REAL alpha = dp2 / (dp2 - dp3) ; REAL alpha = dp2 / (dp2 - dp3) ;
occludingContours.push_back(alpha * position[map.phi1(d)] + (1 - alpha) * position[map.phi_1(d)]) ; occludingContours.push_back(alpha * p2 + (1 - alpha) * p3) ;
} }
} }
} }
......
...@@ -84,7 +84,7 @@ typename PFP::VEC3 faceNormal(typename PFP::MAP& map, Dart d, const typename PFP ...@@ -84,7 +84,7 @@ typename PFP::VEC3 faceNormal(typename PFP::MAP& map, Dart d, const typename PFP
{ {
VEC3 n = triangleNormal<PFP>(map, it, position) ; VEC3 n = triangleNormal<PFP>(map, it, position) ;
//if(!std::isnan(n[0]) && !std::isnan(n[1]) && !std::isnan(n[2])) //if(!std::isnan(n[0]) && !std::isnan(n[1]) && !std::isnan(n[2]))
if (n[0] == n[0] && n[1] == n[1] && n[2] == n[2]) if(!n.hasNan())
N += n ; N += n ;
it = map.phi1(it) ; it = map.phi1(it) ;
} while (it != d) ; } while (it != d) ;
...@@ -130,24 +130,6 @@ void computeNormalFaces(typename PFP::MAP& map, const typename PFP::TVEC3& posit ...@@ -130,24 +130,6 @@ void computeNormalFaces(typename PFP::MAP& map, const typename PFP::TVEC3& posit
} }
} }
template <typename PFP>
class computeNormalVerticesFunctor : public FunctorMap<typename PFP::MAP>
{
protected:
typename PFP::MAP& m_map;
const typename PFP::TVEC3& m_position;
typename PFP::TVEC3& m_normal;
public:
computeNormalVerticesFunctor(typename PFP::MAP& map, const typename PFP::TVEC3& position, typename PFP::TVEC3& normal):
m_map(map), m_position(position), m_normal(normal)
{}
bool operator()(Dart d)
{
m_normal[d] = vertexNormal<PFP>(m_map, d, m_position) ;
return false;
}
};
template <typename PFP> template <typename PFP>
void computeNormalVertices(typename PFP::MAP& map, const typename PFP::TVEC3& position, typename PFP::TVEC3& normal, const FunctorSelect& select, unsigned int thread) void computeNormalVertices(typename PFP::MAP& map, const typename PFP::TVEC3& position, typename PFP::TVEC3& normal, const FunctorSelect& select, unsigned int thread)
{ {
...@@ -186,7 +168,8 @@ typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart ...@@ -186,7 +168,8 @@ typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart
if (s >= 0) a = acos(c) ; if (s >= 0) a = acos(c) ;
else a = -acos(c) ; else a = -acos(c) ;
} }
if (isnan(a)) // if (isnan(a))
if(a != a)
std::cerr<< "Warning : computeAngleBetweenNormalsOnEdge returns NaN on edge " << d << "-" << dd << std::endl ; std::cerr<< "Warning : computeAngleBetweenNormalsOnEdge returns NaN on edge " << d << "-" << dd << std::endl ;
return a ; return a ;
} }
......
...@@ -106,9 +106,9 @@ void addRowsRHS_Equality( ...@@ -106,9 +106,9 @@ void addRowsRHS_Equality(
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int> index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE>& attr,
float amount) const AttributeHandler<typename PFP::REAL>& weight)
{ {
FunctorEquality_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, amount) ; FunctorEquality_PerVertexWeight_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight) ;
m.foreach_orbit(VERTEX, ec) ; m.foreach_orbit(VERTEX, ec) ;
} }
...@@ -118,10 +118,35 @@ void addRowsRHS_Equality( ...@@ -118,10 +118,35 @@ void addRowsRHS_Equality(
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int> index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE>& attr,
float amount, float weight)
{
FunctorEquality_UniformWeight_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight) ;
m.foreach_orbit(VERTEX, ec) ;
}
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void addRowsRHS_Equality(
typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index,
const AttributeHandler<ATTR_TYPE>& attr,
const AttributeHandler<typename PFP::REAL>& weight,
unsigned int coord)
{
FunctorEquality_PerVertexWeight_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight, coord) ;
m.foreach_orbit(VERTEX, ec) ;
}
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void addRowsRHS_Equality(
typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index,
const AttributeHandler<ATTR_TYPE>& attr,
float weight,
unsigned int coord) unsigned int coord)
{ {
FunctorEquality_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, amount, coord) ; FunctorEquality_UniformWeight_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight, coord) ;
m.foreach_orbit(VERTEX, ec) ; m.foreach_orbit(VERTEX, ec) ;
} }
......
...@@ -36,7 +36,36 @@ namespace LinearSolving ...@@ -36,7 +36,36 @@ namespace LinearSolving
*******************************************************************************/ *******************************************************************************/
template<typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template<typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
class FunctorEquality_Scalar : public FunctorType class FunctorEquality_PerVertexWeight_Scalar : public FunctorType
{
protected:
LinearSolver<SOLVER_TRAITS>* solver ;
const AttributeHandler<unsigned int>& indexTable ;
const AttributeHandler<ATTR_TYPE>& attrTable ;
const AttributeHandler<typename PFP::REAL>& weightTable ;
public:
FunctorEquality_PerVertexWeight_Scalar(
LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int>& index,
const AttributeHandler<ATTR_TYPE>& attr,
const AttributeHandler<typename PFP::REAL>& weight
) : solver(s), indexTable(index), attrTable(attr), weightTable(weight)
{}
bool operator()(Dart d)
{
solver->begin_row() ;
solver->add_coefficient(indexTable[d], 1) ;
solver->set_right_hand_side(attrTable[d]) ;
solver->normalize_row(weightTable[d]) ;
solver->end_row() ;
return false ;
}
} ;
template<typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
class FunctorEquality_UniformWeight_Scalar : public FunctorType
{ {
protected: protected:
LinearSolver<SOLVER_TRAITS>* solver ; LinearSolver<SOLVER_TRAITS>* solver ;
...@@ -45,7 +74,7 @@ protected: ...@@ -45,7 +74,7 @@ protected:
float weight ; float weight ;
public: public:
FunctorEquality_Scalar( FunctorEquality_UniformWeight_Scalar(
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int>& index, const AttributeHandler<unsigned int>& index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE>& attr,
...@@ -69,7 +98,38 @@ public: ...@@ -69,7 +98,38 @@ public:
*******************************************************************************/ *******************************************************************************/
template<typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template<typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
class FunctorEquality_Vector : public FunctorType class FunctorEquality_PerVertexWeight_Vector : public FunctorType
{
protected:
LinearSolver<SOLVER_TRAITS>* solver ;
const AttributeHandler<unsigned int>& indexTable ;
const AttributeHandler<ATTR_TYPE>& attrTable ;
const AttributeHandler<typename PFP::REAL>& weightTable ;
unsigned int coord ;
public:
FunctorEquality_PerVertexWeight_Vector(
LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int>& index,
const AttributeHandler<ATTR_TYPE>& attr,
const AttributeHandler<typename PFP::REAL>& weight,
unsigned int c
) : solver(s), indexTable(index), attrTable(attr), weightTable(weight), coord(c)
{}
bool operator()(Dart d)
{
solver->begin_row() ;
solver->add_coefficient(indexTable[d], 1) ;
solver->set_right_hand_side((attrTable[d])[coord]) ;
solver->normalize_row(weightTable[d]) ;
solver->end_row() ;
return false ;
}
} ;
template<typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
class FunctorEquality_UniformWeight_Vector : public FunctorType
{ {
protected: protected:
LinearSolver<SOLVER_TRAITS>* solver ; LinearSolver<SOLVER_TRAITS>* solver ;
...@@ -79,7 +139,7 @@ protected: ...@@ -79,7 +139,7 @@ protected:
unsigned int coord ; unsigned int coord ;
public: public:
FunctorEquality_Vector( FunctorEquality_UniformWeight_Vector(
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int>& index, const AttributeHandler<unsigned int>& index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE>& attr,
......
...@@ -60,6 +60,7 @@ protected: ...@@ -60,6 +60,7 @@ protected:
GLuint m_uniform_size; GLuint m_uniform_size;
GLuint m_uniform_color; GLuint m_uniform_color;
public: public:
/** /**
* init shaders, texture and variables * init shaders, texture and variables
......
...@@ -80,7 +80,7 @@ public: ...@@ -80,7 +80,7 @@ public:
* @param signal use macro SIGNAL(qt_signal) * @param signal use macro SIGNAL(qt_signal)
* @param method use macro SLOT(name_of_method(params)) * @param method use macro SLOT(name_of_method(params))
*/ */
void setCallBack( const QObject* sender, const char* signal, const char* method); void setCallBack(const QObject* sender, const char* signal, const char* method);
/** /**
* set window Title * set window Title
...@@ -147,11 +147,11 @@ public: ...@@ -147,11 +147,11 @@ public:
void setGLWidgetMouseTracking(bool b); void setGLWidgetMouseTracking(bool b);
protected: protected:
GLWidget *m_glWidget; GLWidget* m_glWidget;
QDockWidget *m_dock; QDockWidget* m_dock;
QDockWidget *m_dockConsole; QDockWidget* m_dockConsole;
QTextEdit* m_textConsole; QTextEdit* m_textConsole;
...@@ -219,7 +219,7 @@ public: ...@@ -219,7 +219,7 @@ public:
* @param pixel_width width on pixel on screen * @param pixel_width width on pixel on screen
* @param center reference point on world to use (defaut 0,0,0) * @param center reference point on world to use (defaut 0,0,0)
*/ */
float getWidthInWorld(unsigned int pixel_width, const Geom::Vec3f& center=Geom::Vec3f(0.0f,0.0f,0.0f)); float getWidthInWorld(unsigned int pixel_width, const Geom::Vec3f& center = Geom::Vec3f(0.0f,0.0f,0.0f));
const glm::mat4& transfoMatrix() const { return m_transfo_matrix; } const glm::mat4& transfoMatrix() const { return m_transfo_matrix; }
glm::mat4& transfoMatrix() { return m_transfo_matrix; } glm::mat4& transfoMatrix() { return m_transfo_matrix; }
......
...@@ -88,6 +88,8 @@ protected: ...@@ -88,6 +88,8 @@ protected:
int m_state_modifier; int m_state_modifier;
bool allow_rotation;
/** /**
* met a jour la matrice modelview * met a jour la matrice modelview
*/ */
...@@ -102,6 +104,8 @@ protected: ...@@ -102,6 +104,8 @@ protected:
public: public:
void setParamObject(float width, float* pos); void setParamObject(float width, float* pos);
void setRotation(bool b);
void initializeGL(); void initializeGL();
void paintGL(); void paintGL();
......
...@@ -41,10 +41,10 @@ namespace QT ...@@ -41,10 +41,10 @@ namespace QT
{ {
SimpleQT::SimpleQT() : SimpleQT::SimpleQT() :
m_dock(NULL), m_dock(NULL),
m_projection_matrix(m_mat.m_matrices[0]), m_projection_matrix(m_mat.m_matrices[0]),
m_modelView_matrix(m_mat.m_matrices[1]), m_modelView_matrix(m_mat.m_matrices[1]),
m_transfo_matrix(m_mat.m_matrices[2]) m_transfo_matrix(m_mat.m_matrices[2])
{ {
m_glWidget = new GLWidget(this); m_glWidget = new GLWidget(this);
setCentralWidget(m_glWidget); setCentralWidget(m_glWidget);
...@@ -56,17 +56,17 @@ SimpleQT::SimpleQT() : ...@@ -56,17 +56,17 @@ SimpleQT::SimpleQT() :
connect(action, SIGNAL(triggered()), this, SLOT(cb_New())); connect(action, SIGNAL(triggered()), this, SLOT(cb_New()));
m_fileMenu->addAction(action); m_fileMenu->addAction(action);
action= new QAction(tr("Open"), this); action = new QAction(tr("Open"), this);
connect(action, SIGNAL(triggered()), this, SLOT(cb_Open())); connect(action, SIGNAL(triggered()), this, SLOT(cb_Open()));
m_fileMenu->addAction(action); m_fileMenu->addAction(action);
action= new QAction(tr("Save"), this); action = new QAction(tr("Save"), this);
connect(action, SIGNAL(triggered()), this, SLOT(cb_Save())); connect(action, SIGNAL(triggered()), this, SLOT(cb_Save()));
m_fileMenu->addAction(action); m_fileMenu->addAction(action);
m_fileMenu->addSeparator(); m_fileMenu->addSeparator();
action= new QAction(tr("Quit"), this); action = new QAction(tr("Quit"), this);
connect(action, SIGNAL(triggered()), this, SLOT(cb_Quit())); connect(action, SIGNAL(triggered()), this, SLOT(cb_Quit()));
m_fileMenu->addAction(action); m_fileMenu->addAction(action);
...@@ -74,25 +74,25 @@ SimpleQT::SimpleQT() : ...@@ -74,25 +74,25 @@ SimpleQT::SimpleQT() :
QMenu* m_helpMenu = menuBar()->addMenu(tr("&Help")); QMenu* m_helpMenu = menuBar()->addMenu(tr("&Help"));
action= new QAction(tr("console on/off"), this); action = new QAction(tr("console on/off"), this);
connect(action, SIGNAL(triggered()), this, SLOT(cb_consoleOnOff())); connect(action, SIGNAL(triggered()), this, SLOT(cb_consoleOnOff()));
m_helpMenu->addAction(action); m_helpMenu->addAction(action);
action= new QAction(tr("console clear"), this); action = new QAction(tr("console clear"), this);
connect(action, SIGNAL(triggered()), this, SLOT(cb_consoleClear())); connect(action, SIGNAL(triggered()), this, SLOT(cb_consoleClear()));
m_helpMenu->addAction(action); m_helpMenu->addAction(action);
action= new QAction(tr("About"), this); action = new QAction(tr("About"), this);
connect(action, SIGNAL(triggered()), this, SLOT(cb_about())); connect(action, SIGNAL(triggered()), this, SLOT(cb_about()));
m_helpMenu->addAction(action); m_helpMenu->addAction(action);
action= new QAction(tr("About CGoGN"), this); action = new QAction(tr("About CGoGN"), this);
connect(action, SIGNAL(triggered()), this, SLOT(cb_about_cgogn())); connect(action, SIGNAL(triggered()), this, SLOT(cb_about_cgogn()));
m_helpMenu->addAction(action); m_helpMenu->addAction(action);
m_dockConsole = new QDockWidget(tr("Console"), this); m_dockConsole = new QDockWidget(tr("Console"), this);
m_dockConsole->setAllowedAreas(Qt::BottomDockWidgetArea); m_dockConsole->setAllowedAreas(Qt::BottomDockWidgetArea);
m_dockConsole->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetClosable); m_dockConsole->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetClosable);
addDockWidget(Qt::BottomDockWidgetArea, m_dockConsole); addDockWidget(Qt::BottomDockWidgetArea, m_dockConsole);
m_textConsole = new QTextEdit(); m_textConsole = new QTextEdit();
...@@ -108,11 +108,11 @@ SimpleQT::SimpleQT() : ...@@ -108,11 +108,11 @@ SimpleQT::SimpleQT() :
} }
SimpleQT::SimpleQT(const SimpleQT& sqt): SimpleQT::SimpleQT(const SimpleQT& sqt):
m_dock(NULL), m_dock(NULL),
m_mat(m_mat), m_mat(m_mat),
m_projection_matrix(m_mat.m_matrices[0]), m_projection_matrix(m_mat.m_matrices[0]),
m_modelView_matrix(m_mat.m_matrices[1]), m_modelView_matrix(m_mat.m_matrices[1]),
m_transfo_matrix(m_mat.m_matrices[2]) m_transfo_matrix(m_mat.m_matrices[2])
{ {
m_glWidget = new GLWidget(this); m_glWidget = new GLWidget(this);
setCentralWidget(m_glWidget); setCentralWidget(m_glWidget);
...@@ -383,11 +383,6 @@ float SimpleQT::getWidthInWorld(unsigned int pixel_width, const Geom::Vec3f& cen ...@@ -383,11 +383,6 @@ float SimpleQT::getWidthInWorld(unsigned int pixel_width, const Geom::Vec3f& cen
return glm::distance(P,Q); return glm::distance(P,Q);
} }
void SimpleQT::synchronize(SimpleQT* sqt) void SimpleQT::synchronize(SimpleQT* sqt)
{ {
m_glWidget->getObjPos() = sqt->m_glWidget->getObjPos() ; m_glWidget->getObjPos() = sqt->m_glWidget->getObjPos() ;
...@@ -454,7 +449,7 @@ void SimpleQT::updateGL() ...@@ -454,7 +449,7 @@ void SimpleQT::updateGL()
void SimpleQT::updateGLMatrices() void SimpleQT::updateGLMatrices()
{ {
m_glWidget->modelModified(); m_glWidget->modelModified();
m_glWidget->updateGL(); // m_glWidget->updateGL();
} }
void SimpleQT::transfoRotate(float angle, float x, float y, float z) void SimpleQT::transfoRotate(float angle, float x, float y, float z)
......