Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 5d77c85c authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

bug fix in map handler

parent 71054826
...@@ -136,6 +136,8 @@ void Surface_Deformation_Plugin::keyPress(View* view, QKeyEvent* event) ...@@ -136,6 +136,8 @@ void Surface_Deformation_Plugin::keyPress(View* view, QKeyEvent* event)
{ {
case Qt::Key_D : { case Qt::Key_D : {
MapHandlerGen* mh = m_schnapps->getSelectedMap(); MapHandlerGen* mh = m_schnapps->getSelectedMap();
if(mh)
{
const MapParameters& p = h_parameterSet[mh]; const MapParameters& p = h_parameterSet[mh];
if(!m_dragging) if(!m_dragging)
{ {
...@@ -152,18 +154,23 @@ void Surface_Deformation_Plugin::keyPress(View* view, QKeyEvent* event) ...@@ -152,18 +154,23 @@ void Surface_Deformation_Plugin::keyPress(View* view, QKeyEvent* event)
m_draginit = false; m_draginit = false;
view->setMouseTracking(false); view->setMouseTracking(false);
} }
}
break; break;
} }
case Qt::Key_R : { case Qt::Key_R : {
// ParameterSet* params = h_viewParams[view]; MapHandlerGen* mh = m_schnapps->getSelectedMap();
// MapHandlerGen* map = params->selectedMap; if(mh)
// if(map) {
// { const MapParameters& p = h_parameterSet[mh];
// asRigidAsPossible(view, map); if(p.initialized)
// PerMapParameterSet* perMap = params->perMap[map->getName()]; {
// params->selectedMap->notifyAttributeModification(perMap->positionAttribute); asRigidAsPossible(mh);
// view->updateGL(); mh->notifyAttributeModification(p.positionAttribute);
// } static_cast<MapHandler<PFP2>*>(mh)->updateBB(p.positionAttribute);
view->updateGL();
}
}
break; break;
} }
} }
...@@ -208,11 +215,12 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event) ...@@ -208,11 +215,12 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event)
// matchDiffCoord(map); // matchDiffCoord(map);
if(p.initialized) if(p.initialized)
{
asRigidAsPossible(mh); asRigidAsPossible(mh);
mh->notifyAttributeModification(p.positionAttribute); mh->notifyAttributeModification(p.positionAttribute);
static_cast<MapHandler<PFP2>*>(mh)->updateBB(p.positionAttribute); static_cast<MapHandler<PFP2>*>(mh)->updateBB(p.positionAttribute);
} }
}
view->updateGL(); view->updateGL();
} }
......
...@@ -110,10 +110,13 @@ public: ...@@ -110,10 +110,13 @@ public:
} }
void notifyConnectivityModification() void notifyConnectivityModification()
{
if (m_render)
{ {
m_render->setPrimitiveDirty(Algo::Render::GL2::POINTS); m_render->setPrimitiveDirty(Algo::Render::GL2::POINTS);
m_render->setPrimitiveDirty(Algo::Render::GL2::LINES); m_render->setPrimitiveDirty(Algo::Render::GL2::LINES);
m_render->setPrimitiveDirty(Algo::Render::GL2::TRIANGLES); m_render->setPrimitiveDirty(Algo::Render::GL2::TRIANGLES);
}
emit(connectivityModified()); emit(connectivityModified());
......
...@@ -113,6 +113,8 @@ public: ...@@ -113,6 +113,8 @@ public:
bool importPlySLFgeneric(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); bool importPlySLFgenericBin(const std::string& filename, std::vector<std::string>& attrNames);
bool importFromVoxelGrid(const VoxelGrid& grid);
#ifdef WITH_ASSIMP #ifdef WITH_ASSIMP
bool importASSIMP(const std::string& filename, std::vector<std::string>& attrNames); bool importASSIMP(const std::string& filename, std::vector<std::string>& attrNames);
#endif #endif
......
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