Commit 3cae3e11 authored by Sylvain Thery's avatar Sylvain Thery

schnapps interface modifs

parent c12a2401
...@@ -150,6 +150,7 @@ SET(SCHNApps_QOBJECT_FILES ...@@ -150,6 +150,7 @@ SET(SCHNApps_QOBJECT_FILES
${SCHNApps_ROOT_DIR}/include/controlDock_pluginTab.h ${SCHNApps_ROOT_DIR}/include/controlDock_pluginTab.h
${SCHNApps_ROOT_DIR}/include/controlDock_mapTab.h ${SCHNApps_ROOT_DIR}/include/controlDock_mapTab.h
${SCHNApps_ROOT_DIR}/include/colorComboBox.h ${SCHNApps_ROOT_DIR}/include/colorComboBox.h
${SCHNApps_ROOT_DIR}/include/dialogList.h
) )
......
...@@ -38,6 +38,8 @@ private slots: ...@@ -38,6 +38,8 @@ private slots:
void computeNormalFromDialog(); void computeNormalFromDialog();
void computeCurvatureFromDialog(); void computeCurvatureFromDialog();
void appsFinished();
public slots: public slots:
void computeNormal(const QString& mapName, void computeNormal(const QString& mapName,
const QString& positionAttributeName = "position", const QString& positionAttributeName = "position",
......
...@@ -37,6 +37,9 @@ bool Surface_DifferentialProperties_Plugin::enable() ...@@ -37,6 +37,9 @@ bool Surface_DifferentialProperties_Plugin::enable()
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(appsFinished()), this, SLOT(appsFinished()));
foreach(MapHandlerGen* map, m_schnapps->getMapSet().values()) foreach(MapHandlerGen* map, m_schnapps->getMapSet().values())
mapAdded(map); mapAdded(map);
...@@ -56,6 +59,8 @@ void Surface_DifferentialProperties_Plugin::disable() ...@@ -56,6 +59,8 @@ void Surface_DifferentialProperties_Plugin::disable()
disconnect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*))); disconnect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
disconnect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*))); disconnect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
disconnect(m_schnapps, SIGNAL(appsFinished()), this, SLOT(appsFinished()));
} }
void Surface_DifferentialProperties_Plugin::mapAdded(MapHandlerGen *map) void Surface_DifferentialProperties_Plugin::mapAdded(MapHandlerGen *map)
...@@ -213,6 +218,7 @@ void Surface_DifferentialProperties_Plugin::computeNormal( ...@@ -213,6 +218,7 @@ void Surface_DifferentialProperties_Plugin::computeNormal(
mh->notifyAttributeModification(normal); mh->notifyAttributeModification(normal);
} }
void Surface_DifferentialProperties_Plugin::computeCurvature( void Surface_DifferentialProperties_Plugin::computeCurvature(
const QString& mapName, const QString& mapName,
const QString& positionAttributeName, const QString& positionAttributeName,
...@@ -303,6 +309,13 @@ void Surface_DifferentialProperties_Plugin::computeCurvature( ...@@ -303,6 +309,13 @@ void Surface_DifferentialProperties_Plugin::computeCurvature(
} }
} }
void Surface_DifferentialProperties_Plugin::appsFinished()
{
m_computeNormalDialog->close();
m_computeCurvatureDialog->close();
}
Q_EXPORT_PLUGIN2(Surface_DifferentialProperties_Plugin, Surface_DifferentialProperties_Plugin) Q_EXPORT_PLUGIN2(Surface_DifferentialProperties_Plugin, Surface_DifferentialProperties_Plugin)
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -67,6 +67,8 @@ public: ...@@ -67,6 +67,8 @@ public:
~Surface_Render_Plugin() ~Surface_Render_Plugin()
{} {}
private: private:
virtual bool enable(); virtual bool enable();
virtual void disable(); virtual void disable();
...@@ -95,6 +97,8 @@ private slots: ...@@ -95,6 +97,8 @@ private slots:
void vboAdded(Utils::VBO* vbo); void vboAdded(Utils::VBO* vbo);
void vboRemoved(Utils::VBO* vbo); void vboRemoved(Utils::VBO* vbo);
void appsFinished();
public slots: public slots:
// slots for Python calls // slots for Python calls
......
...@@ -41,6 +41,7 @@ bool Surface_Render_Plugin::enable() ...@@ -41,6 +41,7 @@ bool Surface_Render_Plugin::enable()
connect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*, MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*, MapHandlerGen*))); connect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*, MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*, MapHandlerGen*)));
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(appsFinished()), this, SLOT(appsFinished()));
foreach(MapHandlerGen* map, m_schnapps->getMapSet().values()) foreach(MapHandlerGen* map, m_schnapps->getMapSet().values())
mapAdded(map); mapAdded(map);
...@@ -61,6 +62,7 @@ void Surface_Render_Plugin::disable() ...@@ -61,6 +62,7 @@ void Surface_Render_Plugin::disable()
disconnect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*, MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*, MapHandlerGen*))); disconnect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*, MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*, MapHandlerGen*)));
disconnect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*))); disconnect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
disconnect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*))); disconnect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
disconnect(m_schnapps, SIGNAL(appsFinished()), this, SLOT(appsFinished()));
foreach(MapHandlerGen* map, m_schnapps->getMapSet().values()) foreach(MapHandlerGen* map, m_schnapps->getMapSet().values())
mapRemoved(map); mapRemoved(map);
...@@ -397,6 +399,12 @@ void Surface_Render_Plugin::changeVertexColor(const QString& view, const QString ...@@ -397,6 +399,12 @@ void Surface_Render_Plugin::changeVertexColor(const QString& view, const QString
} }
void Surface_Render_Plugin::appsFinished()
{
m_dockTab->m_colorDial->close();
}
Q_EXPORT_PLUGIN2(Surface_Render_Plugin, Surface_Render_Plugin) Q_EXPORT_PLUGIN2(Surface_Render_Plugin, Surface_Render_Plugin)
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -29,6 +29,7 @@ public: ...@@ -29,6 +29,7 @@ public:
private slots: private slots:
void openSubdivisionDialog(); void openSubdivisionDialog();
void subdivideFromDialog(); void subdivideFromDialog();
void appsFinished();
public slots: public slots:
void loopSubdivision( void loopSubdivision(
......
...@@ -125,6 +125,12 @@ void Surface_Subdivision_Plugin::trianguleFaces( ...@@ -125,6 +125,12 @@ void Surface_Subdivision_Plugin::trianguleFaces(
view->updateGL(); view->updateGL();
} }
void Surface_Subdivision_Plugin::appsFinished()
{
m_subdivisionDialog->close();
}
Q_EXPORT_PLUGIN2(Surface_Subdivision_Plugin, Surface_Subdivision_Plugin) Q_EXPORT_PLUGIN2(Surface_Subdivision_Plugin, Surface_Subdivision_Plugin)
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -26,6 +26,12 @@ public: ...@@ -26,6 +26,12 @@ public:
~Camera(); ~Camera();
const QString& getName() const { return m_name; } const QString& getName() const { return m_name; }
void updateParams();
void drawBBCam();
bool m_drawBB;
public slots: public slots:
QString getName() { return m_name; } QString getName() { return m_name; }
SCHNApps* getSCHNApps() const { return m_schnapps; } SCHNApps* getSCHNApps() const { return m_schnapps; }
...@@ -40,24 +46,34 @@ public slots: ...@@ -40,24 +46,34 @@ public slots:
const QList<View*>& getLinkedViews() const { return l_views; } const QList<View*>& getLinkedViews() const { return l_views; }
bool isLinkedToView(View* view) const { return l_views.contains(view); } bool isLinkedToView(View* view) const { return l_views.contains(view); }
bool isLinkedToMap(MapHandlerGen* mhg) const;
private: private:
void linkView(View* view); void linkView(View* view);
void unlinkView(View* view); void unlinkView(View* view);
private slots: private slots:
void frameModified(); void frameModified();
void mapAdded(MapHandlerGen* mhg);
void mapRemoved(MapHandlerGen* mhg);
void BBModified();
public slots: public slots:
void setProjectionType(int t); void setProjectionType(int t);
void setDraw(bool b); void setDraw(bool b);
void setDrawPath(bool b); void setDrawPath(bool b);
signals: signals:
void projectionTypeChanged(int); void projectionTypeChanged(int);
void drawChanged(bool); void drawChanged(bool);
void drawPathChanged(bool); void drawPathChanged(bool);
protected: protected:
qglviewer::Vec m_bbMin;
qglviewer::Vec m_bbMax;
QString m_name; QString m_name;
SCHNApps* m_schnapps; SCHNApps* m_schnapps;
......
...@@ -28,22 +28,25 @@ private slots: ...@@ -28,22 +28,25 @@ private slots:
void cameraProjectionChanged(QAbstractButton* b); void cameraProjectionChanged(QAbstractButton* b);
void cameraDrawClicked(bool b); void cameraDrawClicked(bool b);
void cameraDrawPathClicked(bool b); void cameraDrawPathClicked(bool b);
void cameraSelectionChanged();
// slots called from SCHNApps signals // slots called from SCHNApps signals
void cameraAdded(Camera* c); void cameraAdded(Camera* c);
void cameraRemoved(Camera* c); void cameraRemoved(Camera* c);
void selectedViewChanged(View* prev, View* cur); // void selectedViewChanged(View* prev, View* cur);
// slots called from selected View signals // slots called from selected View signals
void selectedViewCurrentCameraChanged(Camera* prev, Camera* cur); // void selectedViewCurrentCameraChanged(Camera* prev, Camera* cur);
// slots called from current Camera signals // slots called from current Camera signals
void currentCameraProjectionTypeChanged(int t); // void currentCameraProjectionTypeChanged(int t);
void currentCameraDrawChanged(bool b); // void currentCameraDrawChanged(bool b);
void currentCameraDrawPathChanged(bool b); // void currentCameraDrawPathChanged(bool b);
private: private:
void updateCurrentCameraInfo(); void updateCurrentCameraInfo();
Camera* currentCam();
SCHNApps* m_schnapps; SCHNApps* m_schnapps;
bool b_updatingUI; bool b_updatingUI;
......
...@@ -36,7 +36,7 @@ public: ...@@ -36,7 +36,7 @@ public:
private slots: private slots:
// slots called from UI actions // slots called from UI actions
void selectedMapChanged(); void selectedMapChanged();
void mapCheckStateChanged(QListWidgetItem* item); // void mapCheckStateChanged(QListWidgetItem* item);
void vertexAttributeCheckStateChanged(QListWidgetItem* item); void vertexAttributeCheckStateChanged(QListWidgetItem* item);
void selectedSelectorChanged(); void selectedSelectorChanged();
...@@ -47,11 +47,11 @@ private slots: ...@@ -47,11 +47,11 @@ private slots:
// slots called from SCHNApps signals // slots called from SCHNApps signals
void mapAdded(MapHandlerGen* m); void mapAdded(MapHandlerGen* m);
void mapRemoved(MapHandlerGen* m); void mapRemoved(MapHandlerGen* m);
void selectedViewChanged(View* prev, View* cur); // void selectedViewChanged(View* prev, View* cur);
// slots called from selected View signals // slots called from selected View signals
void selectedViewMapLinked(MapHandlerGen* plugin); // void selectedViewMapLinked(MapHandlerGen* plugin);
void selectedViewMapUnlinked(MapHandlerGen* plugin); // void selectedViewMapUnlinked(MapHandlerGen* plugin);
// slots called from selected MapHandler signals // slots called from selected MapHandler signals
void selectedMapAttributeAdded(unsigned int orbit, const QString& name); void selectedMapAttributeAdded(unsigned int orbit, const QString& name);
......
...@@ -27,17 +27,17 @@ private slots: ...@@ -27,17 +27,17 @@ private slots:
void addPluginDirectoryClicked(); void addPluginDirectoryClicked();
void enableSelectedPluginsClicked(); void enableSelectedPluginsClicked();
void disableSelectedPluginsClicked(); void disableSelectedPluginsClicked();
void pluginCheckStateChanged(QListWidgetItem* item); // void pluginCheckStateChanged(QListWidgetItem* item);
// slots called from SCHNApps signals // slots called from SCHNApps signals
void pluginAvailableAdded(QString name); void pluginAvailableAdded(QString name);
void pluginEnabled(Plugin* plugin); void pluginEnabled(Plugin* plugin);
void pluginDisabled(Plugin* plugin); void pluginDisabled(Plugin* plugin);
void selectedViewChanged(View* prev, View* cur); // void selectedViewChanged(View* prev, View* cur);
// slots called from selected View signals // slots called from selected View signals
void selectedViewPluginLinked(PluginInteraction* plugin); // void selectedViewPluginLinked(PluginInteraction* plugin);
void selectedViewPluginUnlinked(PluginInteraction* plugin); // void selectedViewPluginUnlinked(PluginInteraction* plugin);
private: private:
SCHNApps* m_schnapps; SCHNApps* m_schnapps;
......
#ifndef _DIALOG_LIST_H_
#define _DIALOG_LIST_H_
#include <QDialog>
#include <QVBoxLayout>
#include <QListWidget>
#include <QListWidgetItem>
namespace CGoGN
{
namespace SCHNApps
{
class ListPopUp : public QDialog
{
Q_OBJECT
QVBoxLayout* m_layout;
QListWidget* m_list_items;
public:
ListPopUp(const QString& name, QWidget* parent = NULL);
virtual ~ListPopUp();
QListWidget* list();
QListWidgetItem* addItem(const QString& str, Qt::CheckState checked = Qt::Unchecked);
QListWidgetItem* getItem(unsigned int row);
unsigned int nbItems();
QListWidgetItem* findItem(const QString& str);
bool removeItem(const QString& str);
void check(const QString& str, Qt::CheckState ck);
bool isChecked(const QString& str);
};
} // namespace SCHNApps
} // namespace CGoGN
#endif
...@@ -51,8 +51,8 @@ public slots: ...@@ -51,8 +51,8 @@ public slots:
const QList<View*>& getLinkedViews() const { return l_views; } const QList<View*>& getLinkedViews() const { return l_views; }
bool isLinkedToView(View* view) const { return l_views.contains(view); } bool isLinkedToView(View* view) const { return l_views.contains(view); }
const qglviewer::Vec& getBBmin() const { return m_bbMin; } // const qglviewer::Vec& getBBmin() const { return m_bbMin; }
const qglviewer::Vec& getBBmax() const { return m_bbMax; } // const qglviewer::Vec& getBBmax() const { return m_bbMax; }
float getBBdiagSize() const { return m_bbDiagSize; } float getBBdiagSize() const { return m_bbDiagSize; }
Utils::GLSLShader* getBBDrawerShader() const Utils::GLSLShader* getBBDrawerShader() const
...@@ -77,9 +77,12 @@ public slots: ...@@ -77,9 +77,12 @@ public slots:
return matrix; return matrix;
} }
void frameModified() { DEBUG_EMIT("frameModified");emit(BBisModified());}
public: public:
virtual void draw(Utils::GLSLShader* shader, int primitive) = 0; virtual void draw(Utils::GLSLShader* shader, int primitive) = 0;
virtual void drawBB() = 0; virtual void drawBB() = 0;
virtual void transformedBB(qglviewer::Vec& bbMin, qglviewer::Vec& bbMax) = 0;
void setPrimitiveDirty(int primitive) { m_render->setPrimitiveDirty(primitive); } void setPrimitiveDirty(int primitive) { m_render->setPrimitiveDirty(primitive); }
...@@ -181,6 +184,8 @@ signals: ...@@ -181,6 +184,8 @@ signals:
void cellSelectorRemoved(unsigned int orbit, const QString& name); void cellSelectorRemoved(unsigned int orbit, const QString& name);
void selectedCellsChanged(CellSelectorGen* cs); void selectedCellsChanged(CellSelectorGen* cs);
void BBisModified();
protected: protected:
QString m_name; QString m_name;
SCHNApps* m_schnapps; SCHNApps* m_schnapps;
...@@ -253,6 +258,9 @@ public: ...@@ -253,6 +258,9 @@ public:
void updateBB(const VertexAttribute<VEC3, MAP>& position); void updateBB(const VertexAttribute<VEC3, MAP>& position);
void updateBBDrawer(); void updateBBDrawer();
void transformedBB(qglviewer::Vec& bbMin, qglviewer::Vec& bbMax);
/********************************************************* /*********************************************************
* MANAGE TOPO DRAWING * MANAGE TOPO DRAWING
*********************************************************/ *********************************************************/
......
#include "Utils/Shaders/shaderColorPerVertex.h" #include "Utils/Shaders/shaderColorPerVertex.h"
#include "Utils/Shaders/shaderSimpleColor.h" #include "Utils/Shaders/shaderSimpleColor.h"
#include "Geometry/bounding_box.h"
namespace CGoGN namespace CGoGN
{ {
...@@ -73,10 +75,8 @@ void MapHandler<PFP>::draw(Utils::GLSLShader* shader, int primitive) ...@@ -73,10 +75,8 @@ void MapHandler<PFP>::draw(Utils::GLSLShader* shader, int primitive)
if(!m_render->isPrimitiveUpToDate(primitive)) if(!m_render->isPrimitiveUpToDate(primitive))
m_render->initPrimitives<PFP>(*(static_cast<MAP*>(m_map)), primitive) ; m_render->initPrimitives<PFP>(*(static_cast<MAP*>(m_map)), primitive) ;
glPushMatrix();
glMultMatrixd(m_frame->matrix());
m_render->draw(shader, primitive); m_render->draw(shader, primitive);
glPopMatrix();
} }
template <typename PFP> template <typename PFP>
...@@ -88,32 +88,30 @@ void MapHandler<PFP>::drawBB() ...@@ -88,32 +88,30 @@ void MapHandler<PFP>::drawBB()
updateBBDrawer(); updateBBDrawer();
} }
glPushMatrix();
glMultMatrixd(m_frame->matrix());
// QGLViewer::drawAxis(); // QGLViewer::drawAxis();
m_bbDrawer->callList(); m_bbDrawer->callList();
glPopMatrix();
} }
template <typename PFP> template <typename PFP>
void MapHandler<PFP>::updateBB(const VertexAttribute<VEC3, MAP>& position) void MapHandler<PFP>::updateBB(const VertexAttribute<VEC3, MAP>& position)
{ {
m_bb = CGoGN::Algo::Geometry::computeBoundingBox<PFP>(*(static_cast<MAP*>(m_map)), position); m_bb = CGoGN::Algo::Geometry::computeBoundingBox<PFP>(*(static_cast<MAP*>(m_map)), position);
m_bbMin = qglviewer::Vec(m_bb.min()[0], m_bb.min()[1], m_bb.min()[2]); m_bbDiagSize = m_bb.diagSize();
m_bbMax = qglviewer::Vec(m_bb.max()[0], m_bb.max()[1], m_bb.max()[2]);
m_bbDiagSize = (m_bbMax - m_bbMin).norm();
updateBBDrawer(); updateBBDrawer();
} }
template <typename PFP> template <typename PFP>
void MapHandler<PFP>::updateBBDrawer() void MapHandler<PFP>::updateBBDrawer()
{ {
if(!m_bbDrawer) if(!m_bbDrawer)
m_bbDrawer = new Utils::Drawer(); m_bbDrawer = new Utils::Drawer();
const Geom::Vec3f& bbmin = m_bb.min(); Geom::Vec3f bbmin = m_bb.min();
const Geom::Vec3f& bbmax = m_bb.max(); Geom::Vec3f bbmax = m_bb.max();
float shift = 0.005f*(bbmax - bbmin).norm();
bbmin -= Geom::Vec3f(shift,shift,shift);
bbmax += Geom::Vec3f(shift,shift,shift);
m_bbDrawer->newList(GL_COMPILE); m_bbDrawer->newList(GL_COMPILE);
m_bbDrawer->color3f(0.0f,1.0f,0.0f); m_bbDrawer->color3f(0.0f,1.0f,0.0f);
...@@ -229,6 +227,52 @@ void MapHandler<PFP>::drawTopoRender(int code) ...@@ -229,6 +227,52 @@ void MapHandler<PFP>::drawTopoRender(int code)
template <typename PFP>
void MapHandler<PFP>::transformedBB(qglviewer::Vec& bbMin, qglviewer::Vec& bbMax)
{
const Geom::Vec3f& BBmin = m_bb.min();
const Geom::Vec3f& BBMax = m_bb.max();
CGoGN::Geom::BoundingBox<typename PFP::VEC3> bb;
qglviewer::Vec v = qglviewer::Vec(BBmin[0], BBmin[1], BBmin[2]);
qglviewer::Vec vt = m_frame->inverseCoordinatesOf(v);
bb.addPoint(Geom::Vec3f(vt[0], vt[1], vt[2]));
v = qglviewer::Vec(BBMax[0], BBmin[1], BBmin[2]);
vt = m_frame->inverseCoordinatesOf(v);
bb.addPoint(Geom::Vec3f(vt[0], vt[1], vt[2]));
v = qglviewer::Vec(BBmin[0], BBMax[1], BBmin[2]);
vt = m_frame->inverseCoordinatesOf(v);
bb.addPoint(Geom::Vec3f(vt[0], vt[1], vt[2]));
v = qglviewer::Vec(BBmin[0], BBmin[1], BBMax[2]);
vt = m_frame->inverseCoordinatesOf(v);
bb.addPoint(Geom::Vec3f(vt[0], vt[1], vt[2]));
v = qglviewer::Vec(BBMax[0], BBMax[1], BBmin[2]);
vt = m_frame->inverseCoordinatesOf(v);
bb.addPoint(Geom::Vec3f(vt[0], vt[1], vt[2]));
v = qglviewer::Vec(BBMax[0], BBmin[1], BBMax[2]);
vt = m_frame->inverseCoordinatesOf(v);
bb.addPoint(Geom::Vec3f(vt[0], vt[1], vt[2]));
v = qglviewer::Vec(BBmin[0], BBMax[1], BBMax[2]);
vt = m_frame->inverseCoordinatesOf(v);
bb.addPoint(Geom::Vec3f(vt[0], vt[1], vt[2]));
v = qglviewer::Vec(BBMax[0], BBMax[1], BBMax[2]);
vt = m_frame->inverseCoordinatesOf(v);
bb.addPoint(Geom::Vec3f(vt[0], vt[1], vt[2]));
bbMin = qglviewer::Vec(bb.min()[0], bb.min()[1], bb.min()[2]);
bbMax = qglviewer::Vec(bb.max()[0], bb.max()[1], bb.max()[2]);
}
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -47,6 +47,8 @@ public slots: ...@@ -47,6 +47,8 @@ public slots:
/********************************************************* /*********************************************************
* MANAGE VIEWS * MANAGE VIEWS
*********************************************************/ *********************************************************/
public:
void redrawAllViews();
public slots: public slots:
View* addView(const QString& name); View* addView(const QString& name);
...@@ -151,6 +153,8 @@ signals: ...@@ -151,6 +153,8 @@ signals:
void pluginEnabled(Plugin* plugin); void pluginEnabled(Plugin* plugin);
void pluginDisabled(Plugin* plugin); void pluginDisabled(Plugin* plugin);
void appsFinished();
protected: protected:
QString m_appPath; QString m_appPath;
PythonQtObjectPtr& m_pythonContext; PythonQtObjectPtr& m_pythonContext;
...@@ -186,6 +190,8 @@ protected: ...@@ -186,6 +190,8 @@ protected:
TextureSet m_textures; TextureSet m_textures;
StaticPointers m_sp; StaticPointers m_sp;
void closeEvent(QCloseEvent *event);
}; };
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#include <QGLViewer/qglviewer.h> #include <QGLViewer/qglviewer.h>
#include <QGLViewer/manipulatedFrame.h> #include <QGLViewer/manipulatedFrame.h>
#include "dialogList.h"
#include "schnapps.h" #include "schnapps.h"
#include "Utils/gl_matrices.h" #include "Utils/gl_matrices.h"
...@@ -19,6 +21,7 @@ class ViewButtonArea; ...@@ -19,6 +21,7 @@ class ViewButtonArea;
class ViewButton; class ViewButton;
class PluginInteraction; class PluginInteraction;
class View : public QGLViewer class View : public QGLViewer
{ {
Q_OBJECT Q_OBJECT
...@@ -34,7 +37,9 @@ public: ...@@ -34,7 +37,9 @@ public:
const QString& getName() const { return m_name; } const QString& getName() const { return m_name; }
MapHandlerGen* lastSelectedMap() { return m_lastSelectedMap;} MapHandlerGen* lastSelectedMap() { return m_lastSelectedMap;}
void setLastSelectedMap(MapHandlerGen* m) { m_lastSelectedMap=m; } // void setLastSelectedMap(MapHandlerGen* m) { m_lastSelectedMap=m; }
void closeDialogs();