Commit 05d029d7 authored by Pierre Kraemer's avatar Pierre Kraemer

SCHNApps: correct some scene bounding box updates

parent d11304b9
...@@ -141,6 +141,8 @@ template <typename VEC> ...@@ -141,6 +141,8 @@ template <typename VEC>
void BoundingBox<VEC>::reset() void BoundingBox<VEC>::reset()
{ {
m_initialized = false; m_initialized = false;
m_pMin = VEC(0);
m_pMax = VEC(0);
} }
template <typename VEC> template <typename VEC>
......
#ifndef _SCHNAPPS_H_ #ifndef _SCHNAPPS_H_
#define _SCHNAPPS_H_ #define _SCHNAPPS_H_
#include "dll.h" #include "dll.h"
#include "ui_schnapps.h" #include "ui_schnapps.h"
...@@ -15,9 +14,6 @@ ...@@ -15,9 +14,6 @@
class QVBoxLayout; class QVBoxLayout;
class QSplitter; class QSplitter;
namespace CGoGN namespace CGoGN
{ {
......
...@@ -13,10 +13,8 @@ ...@@ -13,10 +13,8 @@
#include "Utils/Shaders/shaderWallPaper.h" #include "Utils/Shaders/shaderWallPaper.h"
#include "Utils/drawer.h" #include "Utils/drawer.h"
#include "dll.h" #include "dll.h"
namespace CGoGN namespace CGoGN
{ {
...@@ -28,7 +26,6 @@ class ViewButtonArea; ...@@ -28,7 +26,6 @@ class ViewButtonArea;
class ViewButton; class ViewButton;
class PluginInteraction; class PluginInteraction;
class SCHNAPPS_API View : public QGLViewer class SCHNAPPS_API View : public QGLViewer
{ {
Q_OBJECT Q_OBJECT
......
...@@ -53,7 +53,6 @@ ControlDock_MapTab::ControlDock_MapTab(SCHNApps* s) : ...@@ -53,7 +53,6 @@ ControlDock_MapTab::ControlDock_MapTab(SCHNApps* s) :
connect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*))); connect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
connect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*))); connect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
// connect(m_schnapps, SIGNAL(selectedViewChanged(View*,View*)), this, SLOT(selectedViewChanged(View*,View*)));
} }
unsigned int ControlDock_MapTab::getCurrentOrbit() unsigned int ControlDock_MapTab::getCurrentOrbit()
......
...@@ -287,15 +287,14 @@ void View::linkMap(MapHandlerGen* map) ...@@ -287,15 +287,14 @@ void View::linkMap(MapHandlerGen* map)
DEBUG_EMIT("mapLinked"); DEBUG_EMIT("mapLinked");
emit(mapLinked(map)); emit(mapLinked(map));
m_currentCamera->updateParams();
updateGL();
connect(map, SIGNAL(selectedCellsChanged(CellSelectorGen*)), this, SLOT(updateGL())); connect(map, SIGNAL(selectedCellsChanged(CellSelectorGen*)), this, SLOT(updateGL()));
connect(map, SIGNAL(boundingBoxModified()), this, SLOT(updateBoundingBox())); connect(map, SIGNAL(boundingBoxModified()), this, SLOT(updateBoundingBox()));
if(map->isSelectedMap()) if(map->isSelectedMap())
setManipulatedFrame(map->getFrame()); setManipulatedFrame(map->getFrame());
updateBoundingBox();
b_updatingUI = true; b_updatingUI = true;
m_dialogMaps->check(map->getName(), Qt::Checked); m_dialogMaps->check(map->getName(), Qt::Checked);
b_updatingUI = false; b_updatingUI = false;
...@@ -319,19 +318,17 @@ void View::unlinkMap(MapHandlerGen* map) ...@@ -319,19 +318,17 @@ void View::unlinkMap(MapHandlerGen* map)
DEBUG_EMIT("mapUnlinked"); DEBUG_EMIT("mapUnlinked");
emit(mapUnlinked(map)); emit(mapUnlinked(map));
m_currentCamera->updateParams();
updateGL();
disconnect(map->getFrame(), SIGNAL(modified()), this, SLOT(updateGL()));
disconnect(map, SIGNAL(selectedCellsChanged(CellSelectorGen*)), this, SLOT(updateGL())); disconnect(map, SIGNAL(selectedCellsChanged(CellSelectorGen*)), this, SLOT(updateGL()));
disconnect(map, SIGNAL(boundingBoxModified()), this, SLOT(updateBoundingBox()));
if(map == m_schnapps->getSelectedMap()) if(map == m_schnapps->getSelectedMap())
setManipulatedFrame(NULL); setManipulatedFrame(NULL);
updateBoundingBox();
b_updatingUI = true; b_updatingUI = true;
m_dialogMaps->check(map->getName(), Qt::Unchecked); m_dialogMaps->check(map->getName(), Qt::Unchecked);
b_updatingUI = false; b_updatingUI = false;
} }
} }
...@@ -419,6 +416,8 @@ void View::init() ...@@ -419,6 +416,8 @@ void View::init()
m_frameDrawer->end(); m_frameDrawer->end();
m_frameDrawer->endList(); m_frameDrawer->endList();
// WALLPAPER
m_textureWallpaper = new Utils::Texture<2, Geom::Vec3uc>(GL_UNSIGNED_BYTE); m_textureWallpaper = new Utils::Texture<2, Geom::Vec3uc>(GL_UNSIGNED_BYTE);
m_textureWallpaper->create(Geom::Vec2ui(1024, 1024)); m_textureWallpaper->create(Geom::Vec2ui(1024, 1024));
const float max = m_textureWallpaper->size()[0]; const float max = m_textureWallpaper->size()[0];
......
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