int GLArea::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QGLWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: updateMainWindowMenus(); break; case 1: transmitViewDir((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< vcg::Point3f(*)>(_a[2]))); break; case 2: transmitViewPos((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< vcg::Point3f(*)>(_a[2]))); break; case 3: transmitSurfacePos((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< vcg::Point3f(*)>(_a[2]))); break; case 4: transmitCameraPos((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< vcg::Point3f(*)>(_a[2]))); break; case 5: updateTexture(); break; case 6: setDrawMode((*reinterpret_cast< vcg::GLW::DrawMode(*)>(_a[1]))); break; case 7: setColorMode((*reinterpret_cast< vcg::GLW::ColorMode(*)>(_a[1]))); break; case 8: setTextureMode((*reinterpret_cast< vcg::GLW::TextureMode(*)>(_a[1]))); break; case 9: endEdit(); break; case 10: setSelectionRendering((*reinterpret_cast< bool(*)>(_a[1]))); break; case 11: suspendEditToggle(); break; case 12: setCurrentlyActiveLayer((*reinterpret_cast< int(*)>(_a[1]))); break; case 13: sendViewPos((*reinterpret_cast< QString(*)>(_a[1]))); break; case 14: sendSurfacePos((*reinterpret_cast< QString(*)>(_a[1]))); break; case 15: sendViewDir((*reinterpret_cast< QString(*)>(_a[1]))); break; case 16: sendCameraPos((*reinterpret_cast< QString(*)>(_a[1]))); break; default: ; } _id -= 17; } return _id; }
void ProjectScene::display() { // Clear image and depth buffer everytime we update the scene glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); // Initialize Model-View matrix as identity (no transformation glMatrixMode(GL_MODELVIEW); glLoadIdentity(); if (activeCamera == NULL) CGFscene::activeCamera->applyView(); else activeCamera->getCamera()->applyView(); if (wireFrame) setWireFrameMode(); else setTextureMode(); for (unsigned int i = 0; i < 8; i++) if (lights[i] != NULL){ if (lights[i]->getMarker()) lights[i]->getLight()->draw(); lights[i]->getLight()->update(); } axis.draw(); //primitives drawAux(sceneGraph.getRoot()); /*glPopMatrix(); Plane p=Plane(10); p.draw(); glPopMatrix();*/ //printf("%d\n", this->appearancesStack.size()); // We have been drawing in a memory area that is not visible - the back buffer, // while the graphics card is showing the contents of another buffer - the front buffer // glutSwapBuffers() will swap pointers so that the back buffer becomes the front buffer and vice-versa glutSwapBuffers(); }
PhotoTexturingWidget::PhotoTexturingWidget(MeshEditInterface* plugin, PhotoTexturer* texturer,MeshModel &m,GLArea *gla): MeshlabEditDockWidget(gla) { lastDirectory = ""; connect(this,SIGNAL(updateGLAreaTextures()),gla,SLOT(updateTexture())); connect(this,SIGNAL(setGLAreaTextureMode(vcg::GLW::TextureMode)),gla,SLOT(setTextureMode(vcg::GLW::TextureMode))); connect(this,SIGNAL(updateMainWindowMenus()),gla,SIGNAL(updateMainWindowMenus())); ptPlugin = plugin; photoTexturer = texturer; PhotoTexturingWidget::ui.setupUi(this); this->setWidget(ui.main_frame); //this->setFeatures(QDockWidget::AllDockWidgetFeatures); this->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetClosable); this->setAllowedAreas(Qt::NoDockWidgetArea); this->setFloating(true); mesh = &m; glarea = gla; //setting up the headers for the tblewidget //QStringList headers; //headers << "Camera" << "Image"; //ui.cameraTableWidget->setHorizontalHeaderLabels(headers); connect(ui.configurationLoadPushButton, SIGNAL(clicked()),this,SLOT(loadConfigurationFile())); connect(ui.configurationSavePushButton, SIGNAL(clicked()),this,SLOT(saveConfigurationFile())); connect(ui.exportToMaxScriptPushButton, SIGNAL(clicked()),this,SLOT(exportCamerasToMaxScript())); connect(ui.convertToTsaiCameraPushButton, SIGNAL(clicked()),this,SLOT(convertToTsaiCamera())); connect(ui.addCameraPushButton, SIGNAL(clicked()),this,SLOT(addCamera())); connect(ui.removeCameraPushButton, SIGNAL(clicked()),this,SLOT(removeCamera())); connect(ui.assignImagePushButton, SIGNAL(clicked()),this,SLOT(assignImage())); connect(ui.calculateTexturesPushButton, SIGNAL(clicked()),this,SLOT(calculateTextures())); connect(ui.combineTexturesPushButton, SIGNAL(clicked()),this,SLOT(combineTextures())); connect(ui.unprojectTexturePushButton, SIGNAL(clicked()),this,SLOT(unprojectTextures())); connect(ui.bakeTexturePushButton, SIGNAL(clicked()),this,SLOT(bakeTextures())); connect(ui.textureListWidget, SIGNAL(itemClicked(QListWidgetItem* )),this,SLOT(selectCurrentTexture())); connect(ui.resetPushButton, SIGNAL(clicked()),this,SLOT(reset())); connect(ui.closePushButton, SIGNAL(clicked()),this,SLOT(close())); //connect(ui.cancelPushButton, SIGNAL(clicked()),this,SLOT(cancel())); photoTexturer->storeOriginalTextureCoordinates(mesh); loadDefaultSettings(); update(); }