Commit 495d160a authored by Sylvain Thery's avatar Sylvain Thery

wrong manip ??

parent 6e1f65e5
......@@ -29,7 +29,8 @@ MCMesh::MCMesh() :
m_drawFaces(true),
m_render(NULL),
m_flatShader(NULL),
m_simpleColorShader(NULL)
m_simpleColorShader(NULL),
m_linesShader(NULL)
{}
void MCMesh::initGUI()
......@@ -61,28 +62,69 @@ void MCMesh::cb_initGL()
m_simpleColorShader = new Utils::ShaderSimpleColor();
m_simpleColorShader->setAttributePosition(m_positionVBO);
m_colorVBO = new Utils::VBO();
m_linesShader = new Utils::ShaderBoldLines();
m_linesShader->setAttributePosition(m_positionVBO);
// m_linesShader->setAttributeColor(m_colorVBO);
registerShader(m_flatShader);
registerShader(m_simpleColorShader);
registerShader(m_linesShader);
m_dr = new Utils::Drawer();
m_dr->newList();
m_dr->pointSize(4.0f);
m_dr->lineWidth(25.0f);
m_dr->begin(GL_LINES);
m_dr->color3f(1.0,0.0,0.0);
m_dr->vertex3f(15.0,15.0,65.0);
m_dr->vertex3f(110.0,110.0,65.0);
m_dr->color3f(0.0,1.0,0.0);
m_dr->vertex3f(110.0,15.0,75.0);
m_dr->vertex3f(15.0,110.0,75.0);
m_dr->end();
m_dr->endList();
}
void MCMesh::cb_redraw()
{
glEnable(GL_BLEND);
m_dr->callList(0.5f);
if (m_drawEdges)
// {
// glLineWidth(1.0f);
// if (m_drawFaces)
// {
// Geom::Vec4f c(0.0f, 0.0f, 0.0f, 0.0f);
// m_simpleColorShader->setColor(c);
// }
// else
// {
// Geom::Vec4f c(1.0f, 1.0f, 0.0f, 0.0f);
// m_simpleColorShader->setColor(c);
// }
// m_render->draw(m_simpleColorShader, Algo::Render::GL2::LINES);
// }
{
glLineWidth(1.0f);
// glLineWidth(1.0f);
// m_linesShader->setClippingPlane(Geom::Vec4f(0.03,0.03,-1.1,64));
m_linesShader->setLineWidth(12.0f);
if (m_drawFaces)
{
Geom::Vec4f c(0.0f, 0.0f, 0.0f, 0.0f);
m_simpleColorShader->setColor(c);
m_linesShader->setColor(c);
}
else
{
Geom::Vec4f c(1.0f, 1.0f, 0.0f, 0.0f);
m_simpleColorShader->setColor(c);
m_linesShader->setColor(c);
}
m_render->draw(m_simpleColorShader, Algo::Render::GL2::LINES);
m_render->draw(m_linesShader, Algo::Render::GL2::LINES);
}
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glEnable(GL_LIGHTING);
glEnable(GL_POLYGON_OFFSET_FILL);
......@@ -158,6 +200,11 @@ void MCMesh::updateRender()
m_render->initPrimitives<PFP>(myMap, Algo::Render::GL2::TRIANGLES);
m_positionVBO->updateData(position);
m_colorVBO->updateData(position);
Geom::Vec3f *ptr = reinterpret_cast<Geom::Vec3f*>(m_colorVBO->lockPtr());
for (unsigned int i=0; i<m_colorVBO->nbElts();++i)
*ptr++ /= 130.0f;
m_colorVBO->releasePtr();
bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position);
......
......@@ -39,9 +39,11 @@
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderFlat.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderBoldLines.h"
#include "Utils/vbo.h"
#include "Algo/Geometry/boundingbox.h"
#include "Utils/drawer.h"
using namespace CGoGN ;
......@@ -79,9 +81,14 @@ public:
Algo::Render::GL2::MapRender* m_render ;
Utils::VBO* m_positionVBO ;
Utils::VBO* m_colorVBO ;
Utils::ShaderFlat* m_flatShader ;
Utils::ShaderSimpleColor* m_simpleColorShader ;
Utils::ShaderBoldLines* m_linesShader ;
Utils::Drawer* m_dr;
DATATYPE valLabel;
SAlgo::MC::Image<DATATYPE>* myImg;
......
......@@ -13,6 +13,7 @@
#include <QKeyEvent>
#include <QMouseEvent>
#include <QWheelEvent>
#include <QMessageBox>
namespace CGoGN
{
......@@ -21,13 +22,15 @@ namespace SCHNApps
{
unsigned int View::viewCount = 0;
View::View(const QString& name, SCHNApps* s, QGLFormat& format) :
QGLViewer(format, NULL, NULL),
View::View(const QString& name, SCHNApps* s, const QGLWidget* shareWidget) :
QGLViewer( NULL, shareWidget),
b_updatingUI(false),
m_name(name),
m_schnapps(s),
m_currentCamera(NULL),
m_lastSelectedMap(NULL),
m_bbMin(0.0, 0.0, 0.0),
m_bbMax(0.0, 0.0, 0.0),
m_buttonArea(NULL),
m_closeButton(NULL),
m_VsplitButton(NULL),
......@@ -36,12 +39,19 @@ View::View(const QString& name, SCHNApps* s, QGLFormat& format) :
m_mapsButton(NULL),
m_pluginsButton(NULL),
m_camerasButton(NULL),
m_dialogMaps(NULL)
m_dialogMaps(NULL),
m_dialogPlugins(NULL),
m_dialogCameras(NULL),
m_frameDrawer(NULL),
m_textureWallpaper(NULL),
m_shaderWallpaper(NULL),
b_saveSnapshots(false)
{
++viewCount;
m_currentCamera = m_schnapps->addCamera();
m_currentCamera->linkView(this);
setSnapshotFormat("BMP");
setSnapshotFileName(m_name);
setSnapshotQuality(100);
connect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)));
......@@ -49,8 +59,6 @@ View::View(const QString& name, SCHNApps* s, QGLFormat& format) :
m_dialogPlugins = new ListPopUp("Enabled Plugins");
m_dialogCameras = new ListPopUp("Cameras");
// setCurrentCamera(m_schnapps->addCamera());
connect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
connect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
connect(m_dialogMaps->list(), SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(mapCheckStateChanged(QListWidgetItem*)));
......@@ -72,65 +80,11 @@ View::View(const QString& name, SCHNApps* s, QGLFormat& format) :
foreach(Camera* cam, m_schnapps->getCameraSet().values())
cameraAdded(cam);
m_dialogCameras->check(m_currentCamera->getName(),Qt::Checked);
}
View::View(const QString& name, SCHNApps* s, QGLFormat& format, const QGLWidget* shareWidget) :
QGLViewer(format, NULL, shareWidget),
b_updatingUI(false),
m_name(name),
m_schnapps(s),
m_currentCamera(NULL),
m_lastSelectedMap(NULL),
m_buttonArea(NULL),
m_closeButton(NULL),
m_VsplitButton(NULL),
m_HsplitButton(NULL),
m_buttonAreaLeft(NULL),
m_mapsButton(NULL),
m_pluginsButton(NULL),
m_camerasButton(NULL),
m_dialogMaps(NULL)
{
++viewCount;
m_currentCamera = m_schnapps->addCamera();
m_currentCamera->linkView(this);
connect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*,MapHandlerGen*)));
m_dialogMaps = new ListPopUp("Linked Maps");
m_dialogPlugins = new ListPopUp("Enabled Plugins");
m_dialogCameras = new ListPopUp("Cameras");
// setCurrentCamera(m_schnapps->addCamera());
connect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
connect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
connect(m_dialogMaps->list(), SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(mapCheckStateChanged(QListWidgetItem*)));
foreach(MapHandlerGen* map, m_schnapps->getMapSet().values())
mapAdded(map);
connect(m_schnapps, SIGNAL(pluginEnabled(Plugin*)), this, SLOT(pluginEnabled(Plugin*)));
connect(m_schnapps, SIGNAL(pluginDisabled(Plugin*)), this, SLOT(pluginDisabled(Plugin*)));
connect(m_dialogPlugins->list(), SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(pluginCheckStateChanged(QListWidgetItem*)));
foreach(Plugin* plug, m_schnapps->getPluginSet().values())
pluginEnabled(plug);
connect(m_schnapps, SIGNAL(cameraAdded(Camera*)), this, SLOT(cameraAdded(Camera*)));
connect(m_schnapps, SIGNAL(cameraRemoved(Camera*)), this, SLOT(cameraRemoved(Camera*)));
connect(m_dialogCameras->list(), SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(cameraCheckStateChanged(QListWidgetItem*)));
foreach(Camera* cam, m_schnapps->getCameraSet().values())
cameraAdded(cam);
m_dialogCameras->check(m_currentCamera->getName(),Qt::Checked);
connect(m_schnapps, SIGNAL(schnappsClosing()), this, SLOT(closeDialogs()));
}
View::~View()
......@@ -139,14 +93,12 @@ View::~View()
this->setCamera(c);
m_currentCamera->unlinkView(this);
foreach(PluginInteraction* p, l_plugins)
unlinkPlugin(p);
foreach(MapHandlerGen* m, l_maps)
unlinkMap(m);
delete m_buttonArea;
delete m_buttonAreaLeft;
......@@ -155,18 +107,16 @@ View::~View()
delete m_dialogCameras;
}
void View::closeDialogs()
{
m_dialogMaps->close();
m_dialogPlugins->close();
m_dialogCameras->close();
}
void View::setCurrentCamera(Camera* c)
{
// DEBUG_SLOT();
if(c != m_currentCamera && c != NULL)
if(c != m_currentCamera && c)
{
// RECORDING
QTextStream* rec = m_schnapps->pythonStreamRecorder();
if (rec)
*rec << this->getName() << ".setCurrentCamera(\"" << c->getName() << "\");" << endl;
Camera* prev = m_currentCamera;
if(prev)
prev->unlinkView(this);
......@@ -175,10 +125,10 @@ void View::setCurrentCamera(Camera* c)
this->setCamera(m_currentCamera);
m_currentCamera->linkView(this);
// DEBUG_EMIT("currentCameraChanged");
// emit(currentCameraChanged(prev, c));
DEBUG_EMIT("currentCameraChanged");
emit(currentCameraChanged(prev, c));
if(prev)
if (prev)
{
QListWidgetItem* prevItem = m_dialogCameras->findItem(prev->getName());
if(prevItem)
......@@ -188,7 +138,8 @@ void View::setCurrentCamera(Camera* c)
b_updatingUI = false;
}
}
if(m_currentCamera)
if (m_currentCamera)
{
QListWidgetItem* curItem = m_dialogCameras->findItem(m_currentCamera->getName());
if(curItem)
......@@ -199,12 +150,7 @@ void View::setCurrentCamera(Camera* c)
}
}
// b_updatingUI = true;
// m_dialogCameras->check(c->getName(),Qt::Checked);
// b_updatingUI = false;
// updateCurrentCameraBB();
m_currentCamera->updateParams();
m_currentCamera->fitToViewsBoundingBox();
updateGL();
}
}
......@@ -216,23 +162,32 @@ void View::setCurrentCamera(const QString& name)
setCurrentCamera(c);
}
bool View::usesCamera(const QString& cameraName) const
bool View::usesCamera(const QString& name) const
{
return m_currentCamera->getName() == cameraName;
Camera* c = m_schnapps->getCamera(name);
return usesCamera(c);
}
void View::linkPlugin(PluginInteraction* plugin)
{
// RECORDING
QTextStream* rec = m_schnapps->pythonStreamRecorder();
if (rec)
*rec << this->getName() << ".linkPlugin(\"" << plugin->getName() << "\");" << endl;
DEBUG_SLOT();
if(plugin && !l_plugins.contains(plugin))
{
l_plugins.push_back(plugin);
plugin->linkView(this);
DEBUG_EMIT("pluginLinked");
emit(pluginLinked(plugin));
b_updatingUI = true;
m_dialogPlugins->check(plugin->getName(),Qt::Checked);
m_dialogPlugins->check(plugin->getName(), Qt::Checked);
b_updatingUI = false;
updateGL();
......@@ -251,12 +206,19 @@ void View::unlinkPlugin(PluginInteraction* plugin)
DEBUG_SLOT();
if(l_plugins.removeOne(plugin))
{
// RECORDING
QTextStream* rec = m_schnapps->pythonStreamRecorder();
if (rec)
*rec << this->getName() << ".unlinkPlugin(\"" << plugin->getName() << "\");" << endl;
plugin->unlinkView(this);
DEBUG_EMIT("pluginUnlinked");
emit(pluginUnlinked(plugin));
b_updatingUI = true;
m_dialogPlugins->check(plugin->getName(),Qt::Unchecked);
m_dialogPlugins->check(plugin->getName(), Qt::Unchecked);
b_updatingUI = false;
updateGL();
......@@ -278,27 +240,30 @@ bool View::isLinkedToPlugin(const QString& name) const
void View::linkMap(MapHandlerGen* map)
{
// RECORDING
QTextStream* rec = m_schnapps->pythonStreamRecorder();
if (rec)
*rec << this->getName() << ".linkMap(\"" << map->getName() << "\");" << endl;
DEBUG_SLOT();
if(map && !l_maps.contains(map))
{
l_maps.push_back(map);
map->linkView(this);
DEBUG_EMIT("mapLinked");
emit(mapLinked(map));
std::cout << "View::linkMap Maps:"<<map->getName().toStdString()<< std::endl;
m_currentCamera->updateParams();
updateGL();
// connect(map->getFrame(), SIGNAL(modified()), this, SLOT(updateGL()));
// connect(map->getFrame(), SIGNAL(modified()), m_currentCamera, SLOT(BBModified(map)));
connect(map, SIGNAL(selectedCellsChanged(CellSelectorGen*)), this, SLOT(updateGL()));
connect(map, SIGNAL(boundingBoxModified()), this, SLOT(updateBoundingBox()));
if(map->isSelectedMap())
setManipulatedFrame(map->getFrame());
updateBoundingBox();
b_updatingUI = true;
m_dialogMaps->check(map->getName(),Qt::Checked);
m_dialogMaps->check(map->getName(), Qt::Checked);
b_updatingUI = false;
}
}
......@@ -315,24 +280,27 @@ void View::unlinkMap(MapHandlerGen* map)
DEBUG_SLOT();
if(l_maps.removeOne(map))
{
QTextStream* rec = m_schnapps->pythonStreamRecorder();
if (rec)
*rec << this->getName() << ".unlinkMap(\"" << map->getName() << "\");" << endl;
map->unlinkView(this);
DEBUG_EMIT("mapUnlinked");
emit(mapUnlinked(map));
// updateCurrentCameraBB();
m_currentCamera->updateParams();
updateGL();
disconnect(map->getFrame(), SIGNAL(modified()), this, SLOT(updateGL()));
disconnect(map, SIGNAL(selectedCellsChanged(CellSelectorGen*)), this, SLOT(updateGL()));
disconnect(map, SIGNAL(boundingBoxModified()), this, SLOT(updateBoundingBox()));
if(map == m_schnapps->getSelectedMap())
setManipulatedFrame(NULL);
updateBoundingBox();
b_updatingUI = true;
m_dialogMaps->check(map->getName(),Qt::Unchecked);
m_dialogMaps->check(map->getName(), Qt::Unchecked);
b_updatingUI = false;
}
}
......@@ -349,21 +317,20 @@ bool View::isLinkedToMap(const QString& name) const
return l_maps.contains(m);
}
void View::init()
{
glewExperimental = GL_TRUE; // needed for GL Core Profile 3.3
glewInit();
// int major = 0;
// int minor = 0;
// glGetIntegerv(GL_MAJOR_VERSION, &major);
// glGetIntegerv(GL_MINOR_VERSION, &minor);
// std::cout << this->getName().toStdString() << "is using GL "<< major <<"."<< minor << std::endl;
std::cout << "using " << glGetString(GL_VERSION) << std::endl;
qglviewer::Camera* c = this->camera();
this->setCamera(m_currentCamera);
delete c;
// delete c;
this->setBackgroundColor(QColor(0,0,0));
glEnable(GL_DEPTH_TEST);
......@@ -387,7 +354,6 @@ void View::init()
m_buttonAreaLeft = new ViewButtonArea(this);
m_buttonAreaLeft->setTopLeftPosition(0, 0);
m_mapsButton = new ViewButton(":icons/icons/maps.png", this);
m_buttonAreaLeft->addButton(m_mapsButton);
connect(m_mapsButton, SIGNAL(clicked(int, int, int, int)), this, SLOT(ui_mapsListView(int, int, int, int)));
......@@ -400,17 +366,17 @@ void View::init()
m_buttonAreaLeft->addButton(m_camerasButton);
connect(m_camerasButton, SIGNAL(clicked(int, int, int, int)), this, SLOT(ui_camerasListView(int, int, int, int)));
// FRAME DRAWER
m_frameDrawer = new Utils::Drawer();
glm::mat4 mm(1.0);
glm::mat4 pm(1.0);
m_frameDrawer->getShader()->updateMatrices(mm, pm);
// m_frameDrawer->getShader()->updateMatrices(mm, pm);
m_frameDrawer->updateMatrices(mm, pm);
m_frameDrawer->newList(GL_COMPILE);
m_frameDrawer->color3f(0.0f,1.0f,0.0f);
m_frameDrawer->lineWidth(4.0f);
m_frameDrawer->lineWidth(6.0f);
m_frameDrawer->begin(GL_LINE_LOOP);
m_frameDrawer->vertex3f(-1.0f,-1.0f, 0.0f);
m_frameDrawer->vertex3f( 1.0f,-1.0f, 0.0f);
......@@ -419,18 +385,32 @@ void View::init()
m_frameDrawer->end();
m_frameDrawer->endList();
std::cout << "end INIT of "<< this->getName().toStdString()<< std::endl;
// WALLPAPER
// qglviewer::Camera* c = this->camera();
// this->setCamera(m_currentCamera);
// delete c;
m_textureWallpaper = new Utils::Texture<2, Geom::Vec3uc>(GL_UNSIGNED_BYTE);
m_textureWallpaper->create(Geom::Vec2ui(16, 16));
const float max = m_textureWallpaper->size()[0];
for (unsigned int ki = 0; ki < m_textureWallpaper->size()[0]; ++ki)
{
for (unsigned int kj = 0; kj < m_textureWallpaper->size()[1]; ++kj)
{
float col = 255 - (255 * ((kj/max)*0.6 + 0.2));
(*m_textureWallpaper)(ki, kj) = Geom::Vec3f(col, col, col);
}
}
m_textureWallpaper->update();
m_textureWallpaper->setWrapping(GL_CLAMP_TO_EDGE);
m_shaderWallpaper = new Utils::ShaderWallPaper();
m_shaderWallpaper->setTextureUnit(GL_TEXTURE0);
m_shaderWallpaper->setTexture(m_textureWallpaper);
this->setBackgroundColor(QColor(0,0,0));
}
void View::preDraw()
{
if (Utils::GLSLShader::CURRENT_OGL_VERSION>=3)
if (Utils::GLSLShader::CURRENT_OGL_VERSION >= 3)
makeCurrent();
m_currentCamera->setScreenWidthAndHeight(width(), height());
......@@ -439,27 +419,26 @@ void View::preDraw()
void View::draw()
{
if (Utils::GLSLShader::CURRENT_OGL_VERSION>=3)
if (Utils::GLSLShader::CURRENT_OGL_VERSION >= 3)
{
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);
}
m_shaderWallpaper->draw();
const CameraSet& cams = m_schnapps->getCameraSet();
QList<Camera*> lc = cams.values();
foreach(Camera* camera, lc)
foreach (Camera* camera, lc)
{
if(camera != m_currentCamera)
if (camera != m_currentCamera)
{
if(camera->getDraw()) camera->draw();
if(camera->getDrawPath()) camera->drawAllPaths();
if (camera->getDraw()) camera->draw();
if (camera->getDrawPath()) camera->drawAllPaths();
}
}
// for debugging
// m_currentCamera->drawBBCam();
glm::mat4 mm = getCurrentModelViewMatrix();
glm::mat4 pm = getCurrentProjectionMatrix();
......@@ -471,9 +450,9 @@ void View::draw()
if(map == selectedMap)
{
Utils::GLSLShader* bbShader = map->getBBDrawerShader();
if(bbShader)
bbShader->updateMatrices(pm, map_mm);
Utils::Drawer* bbDr = map->getBBDrawer();
if(bbDr)
bbDr->updateMatrices(pm, map_mm);
map->drawBB();
}
......@@ -500,8 +479,9 @@ void View::postDraw()
void View::resizeGL(int width, int height)
{
QGLViewer::resizeGL(width, height);
if(m_buttonArea)
m_buttonArea->setTopRightPosition(width, 0);
m_buttonArea->setTopRightPosition(width/ this->pixelRatio(), 0);
if(m_buttonAreaLeft)
m_buttonAreaLeft->setTopLeftPosition(0, 0);
......@@ -522,9 +502,51 @@ void View::drawFrame()
void View::keyPressEvent(QKeyEvent* event)
{
foreach(PluginInteraction* plugin, l_plugins)
plugin->keyPress(this, event);
QGLViewer::keyPressEvent(event);
if (event->key() == Qt::Key_S)
{
b_saveSnapshots = !b_saveSnapshots;
if (b_saveSnapshots)
{
QMessageBox msgBox;
msgBox.setText("Snapshot every frame?");
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Ok);
if (msgBox.exec() == QMessageBox::Ok)
{
m_schnapps->statusBarMessage("frame snapshot !!", 2000);
connect(this, SIGNAL(drawFinished(bool)), this, SLOT(saveSnapshot(bool)));
}
else
{
m_schnapps->statusBarMessage("cancel frame snapshot", 2000);
b_saveSnapshots = false;
}
}
else
{
disconnect(this, SIGNAL(drawFinished(bool)), this, SLOT(saveSnapshot(bool)));
m_schnapps->statusBarMessage("Stop frame snapshot", 2000);
}
}
else
{
foreach(PluginInteraction* plugin, l_plugins)
plugin->keyPress(this, event);
if (event->key() == Qt::Key_Escape)
{
QMessageBox msgBox;
msgBox.setText("Really quit SCHNApps ?");
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Ok);
if (msgBox.exec() == QMessageBox::Ok)
m_schnapps->close();
}
else
QGLViewer::keyPressEvent(event);
}
}
void View::keyReleaseEvent(QKeyEvent *event)
......@@ -536,17 +558,23 @@ void View::keyReleaseEvent(QKeyEvent *event)
void View::mousePressEvent(QMouseEvent* event)
{
if(m_buttonArea->isClicked(event->x(), event->y()))
m_buttonArea->clickButton(event->x(), event->y(), event->globalX(), event->globalY());
else if(m_buttonAreaLeft->isClicked(event->x(), event->y()))
if (!isSelectedView())
m_schnapps->setSelectedView(this);
if (m_buttonAreaLeft->isClicked(event->x(), event->y()))
m_buttonAreaLeft->clickButton(event->x(), event->y(), event->globalX(), event->globalY());
else
{
if(!isSelectedView())
m_schnapps->setSelectedView(this);
foreach(PluginInteraction* plugin, l_plugins)
plugin->mousePress(this, event);
QGLViewer::mousePressEvent(event);
hideDialogs();
if (m_buttonArea->isClicked(event->x(), event->y()))
m_buttonArea->clickButton(event->x(), event->y(), event->globalX(), event->globalY());
else
{
foreach(PluginInteraction* plugin, l_plugins)
plugin->mousePress(this, event);
QGLViewer::mousePressEvent(event);
}
}
}
......@@ -611,6 +639,27 @@ glm::mat4 View::getCurrentModelViewProjectionMatrix() const
}