Commit e9198c9b authored by Kenneth Vanhoey's avatar Kenneth Vanhoey

Ajout de la synchro du centre de rotation dans qtSimple

parent d93ec03b
......@@ -157,6 +157,8 @@ public:
static float getFarPlane() { return FAR_PLANE ; }
glm::vec3& getObjPos() ;
void modelModified() { newModel = 1; }
protected:
......
......@@ -346,6 +346,8 @@ void SimpleQT::cb_updateMatrix()
void SimpleQT::synchronize(SimpleQT* sqt)
{
m_glWidget->getObjPos() = sqt->m_glWidget->getObjPos() ;
m_projection_matrix = sqt->m_projection_matrix;
m_modelView_matrix = sqt->m_modelView_matrix;
for (unsigned int i = 0; i < 4; ++i)
......
......@@ -163,6 +163,10 @@ void GLWidget::changeCenterOfRotation(const glm::vec3& newCenter)
m_obj_pos = glm::vec3(-newCenter[0],-newCenter[1],-newCenter[2]);
}
glm::vec3& GLWidget::getObjPos()
{
return m_obj_pos ;
}
void GLWidget::initializeGL()
{
......
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