deleted useless v1.3
@ -1,973 +0,0 @@
|
||||
/****************************************************************************
|
||||
* MeshLab o o *
|
||||
* An extendible mesh processor o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2005, 2006 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/interfaces.h"
|
||||
#include "glarea.h"
|
||||
//#include "layerDialog.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <wrap/gl/picking.h>
|
||||
#include <wrap/qt/trackball.h>
|
||||
#include <wrap/qt/col_qt_convert.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace vcg;
|
||||
|
||||
GLArea::GLArea(QWidget *parent, RichParameterSet *current)
|
||||
: QGLWidget(parent)
|
||||
{
|
||||
this->updateCustomSettingValues(*current);
|
||||
animMode=AnimNone;
|
||||
iRenderer=0; //Shader support
|
||||
iEdit=0;
|
||||
currentEditor=0;
|
||||
suspendedEditor=false;
|
||||
lastModelEdited = 0;
|
||||
cfps=0;
|
||||
lastTime=0;
|
||||
hasToPick=false;
|
||||
hasToGetPickPos=false;
|
||||
hasToUpdateTexture=false;
|
||||
helpVisible=false;
|
||||
takeSnapTile=false;
|
||||
activeDefaultTrackball=true;
|
||||
infoAreaVisible = true;
|
||||
trackBallVisible = true;
|
||||
currentShader = NULL;
|
||||
lastFilterRef = NULL;
|
||||
//lastEditRef = NULL;
|
||||
setAttribute(Qt::WA_DeleteOnClose,true);
|
||||
fov = 60;
|
||||
clipRatioFar = 1;
|
||||
clipRatioNear = 1;
|
||||
nearPlane = .2f;
|
||||
farPlane = 5.f;
|
||||
pointSize = 2.0f;
|
||||
//layerDialog = new LayerDialog(this);
|
||||
//layerDialog->setAllowedAreas ( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
||||
connect((const MeshDocument*)&meshDoc, SIGNAL(currentMeshChanged(int)), this, SLOT(updateLayer()));
|
||||
/*getting the meshlab MainWindow from parent, which is QWorkspace.
|
||||
*note as soon as the GLArea is added as Window to the QWorkspace the parent of GLArea is a QWidget,
|
||||
*which takes care about the window frame (its parent is the QWorkspace again).
|
||||
*/
|
||||
MainWindow* mainwindow = dynamic_cast<MainWindow*>(parent->parentWidget());
|
||||
//connecting the MainWindow Slots to GLArea signal (simple passthrough)
|
||||
if(mainwindow != NULL){
|
||||
connect(this,SIGNAL(updateMainWindowMenus()),mainwindow,SLOT(updateMenus()));
|
||||
connect(mainwindow,SIGNAL(dispatchCustomSettings(RichParameterSet&)),this,SLOT(updateCustomSettingValues(RichParameterSet&)));
|
||||
}else{
|
||||
qDebug("The parent of the GLArea parent is not a pointer to the meshlab MainWindow.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GLArea::~GLArea()
|
||||
{
|
||||
// warn any iRender plugin that we're deleting glarea
|
||||
if (iRenderer)
|
||||
iRenderer->Finalize(currentShader, meshDoc, this);
|
||||
//delete this->layerDialog;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
This member returns the information of the Mesh in terms of VC,VQ,FC,FQ,WT
|
||||
where:
|
||||
VC = VertColor,VQ = VertQuality,FC = FaceColor,FQ = FaceQuality,WT = WedgTexCoord
|
||||
*/
|
||||
QString GLArea::GetMeshInfoString()
|
||||
{
|
||||
QString info;
|
||||
if(mm()->hasDataMask(MeshModel::MM_VERTQUALITY) ) {info.append("VQ ");}
|
||||
if(mm()->hasDataMask(MeshModel::MM_VERTCOLOR) ) {info.append("VC ");}
|
||||
if(mm()->hasDataMask(MeshModel::MM_VERTRADIUS) ) {info.append("VR ");}
|
||||
if(mm()->hasDataMask(MeshModel::MM_VERTTEXCOORD)) {info.append("VT ");}
|
||||
if(mm()->hasDataMask(MeshModel::MM_VERTCURV) ) {info.append("VK ");}
|
||||
if(mm()->hasDataMask(MeshModel::MM_VERTCURVDIR) ) {info.append("VD ");}
|
||||
if(mm()->hasDataMask(MeshModel::MM_FACECOLOR) ) {info.append("FC ");}
|
||||
if(mm()->hasDataMask(MeshModel::MM_FACEQUALITY) ) {info.append("FQ ");}
|
||||
if(mm()->hasDataMask(MeshModel::MM_WEDGTEXCOORD)) {info.append("WT ");}
|
||||
if(mm()->hasDataMask(MeshModel::MM_CAMERA) ) {info.append("MC ");}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
QSize GLArea::minimumSizeHint() const {return QSize(400,300);}
|
||||
QSize GLArea::sizeHint() const {return QSize(400,300);}
|
||||
|
||||
|
||||
void GLArea::initializeGL()
|
||||
{
|
||||
glShadeModel(GL_SMOOTH);
|
||||
glPixelStorei(GL_PACK_ROW_LENGTH, 0);
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_NORMALIZE);
|
||||
static float diffuseColor[]={1.0,1.0,1.0,1.0};
|
||||
glEnable(GL_LIGHT0);
|
||||
glDisable(GL_LIGHT1);
|
||||
glLightfv(GL_LIGHT1,GL_DIFFUSE,diffuseColor);
|
||||
trackball.center=Point3f(0, 0, 0);
|
||||
trackball.radius= 1;
|
||||
|
||||
trackball_light.center=Point3f(0, 0, 0);
|
||||
trackball_light.radius= 1;
|
||||
GLenum err = glewInit();
|
||||
if (err != GLEW_OK ) {
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
void GLArea::pasteTile()
|
||||
{
|
||||
glPushAttrib(GL_ENABLE_BIT);
|
||||
QImage tileBuffer=grabFrameBuffer(true).mirrored(false,true);
|
||||
|
||||
if (snapBuffer.isNull())
|
||||
snapBuffer = QImage(tileBuffer.width() * ss.resolution, tileBuffer.height() * ss.resolution, tileBuffer.format());
|
||||
|
||||
uchar *snapPtr = snapBuffer.bits() + (tileBuffer.bytesPerLine() * tileCol) + ((totalCols * tileRow) * tileBuffer.numBytes());
|
||||
uchar *tilePtr = tileBuffer.bits();
|
||||
|
||||
for (int y=0; y < tileBuffer.height(); y++)
|
||||
{
|
||||
memcpy((void*) snapPtr, (void*) tilePtr, tileBuffer.bytesPerLine());
|
||||
snapPtr+=tileBuffer.bytesPerLine() * totalCols;
|
||||
tilePtr+=tileBuffer.bytesPerLine();
|
||||
}
|
||||
|
||||
tileCol++;
|
||||
|
||||
if (tileCol >= totalCols)
|
||||
{
|
||||
tileCol=0;
|
||||
tileRow++;
|
||||
|
||||
if (tileRow >= totalRows)
|
||||
{
|
||||
QString outfile=QString("%1/%2%3.png")
|
||||
.arg(ss.outdir)
|
||||
.arg(ss.basename)
|
||||
.arg(ss.counter++,2,10,QChar('0'));
|
||||
bool ret = (snapBuffer.mirrored(false,true)).save(outfile,"PNG");
|
||||
if (ret) log.Logf(GLLogStream::SYSTEM, "Snapshot saved to %s",outfile.toLocal8Bit().constData());
|
||||
else log.Logf(GLLogStream::WARNING,"Error saving %s",outfile.toLocal8Bit().constData());
|
||||
|
||||
takeSnapTile=false;
|
||||
snapBuffer=QImage();
|
||||
}
|
||||
}
|
||||
update();
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GLArea::drawGradient()
|
||||
{
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(-1,1,-1,1,-1,1);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glPushAttrib(GL_ENABLE_BIT);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_LIGHTING);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glColor(glas.backgroundTopColor); glVertex2f(-1, 1);
|
||||
glColor(glas.backgroundBotColor); glVertex2f(-1,-1);
|
||||
glColor(glas.backgroundTopColor); glVertex2f( 1, 1);
|
||||
glColor(glas.backgroundBotColor); glVertex2f( 1,-1);
|
||||
glEnd();
|
||||
|
||||
glPopAttrib();
|
||||
glPopMatrix(); // restore modelview
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPopMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
}
|
||||
|
||||
void GLArea::drawLight()
|
||||
{
|
||||
// ============== LIGHT TRACKBALL ==============
|
||||
// Apply the trackball for the light direction
|
||||
glPushMatrix();
|
||||
trackball_light.GetView();
|
||||
trackball_light.Apply(!(isDefaultTrackBall()));
|
||||
|
||||
static float lightPosF[]={0.0,0.0,1.0,0.0};
|
||||
glLightfv(GL_LIGHT0,GL_POSITION,lightPosF);
|
||||
static float lightPosB[]={0.0,0.0,-1.0,0.0};
|
||||
glLightfv(GL_LIGHT1,GL_POSITION,lightPosB);
|
||||
|
||||
if (!(isDefaultTrackBall()))
|
||||
{
|
||||
glPushAttrib(GL_ENABLE_BIT | GL_CURRENT_BIT);
|
||||
glColor3f(1,1,0);
|
||||
glDisable(GL_LIGHTING);
|
||||
const unsigned int lineNum=3;
|
||||
glBegin(GL_LINES);
|
||||
for(unsigned int i=0;i<=lineNum;++i)
|
||||
for(unsigned int j=0;j<=lineNum;++j) {
|
||||
glVertex3f(-1.0f+i*2.0/lineNum,-1.0f+j*2.0/lineNum,-2);
|
||||
glVertex3f(-1.0f+i*2.0/lineNum,-1.0f+j*2.0/lineNum, 2);
|
||||
}
|
||||
glEnd();
|
||||
glPopAttrib();
|
||||
}
|
||||
glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
void GLArea::paintGL()
|
||||
{
|
||||
QTime time;
|
||||
time.start();
|
||||
initTexture();
|
||||
glClearColor(1.0,1.0,1.0,0.0); //vannini: alpha was 1.0
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
|
||||
setView(); // Set Modelview and Projection matrix
|
||||
drawGradient(); // draws the background
|
||||
drawLight();
|
||||
|
||||
glPushMatrix();
|
||||
|
||||
// Finally apply the Trackball for the model
|
||||
trackball.GetView();
|
||||
trackball.Apply(false);
|
||||
glPushMatrix();
|
||||
|
||||
//glScale(d);
|
||||
// glTranslate(-FullBBox.Center());
|
||||
setLightModel();
|
||||
|
||||
// Set proper colorMode
|
||||
if(rm.colorMode != GLW::CMNone)
|
||||
{
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
glColorMaterial(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE);
|
||||
}
|
||||
else glColor(Color4b::LightGray);
|
||||
|
||||
if(rm.backFaceCull) glEnable(GL_CULL_FACE);
|
||||
else glDisable(GL_CULL_FACE);
|
||||
|
||||
if(!meshDoc.busy)
|
||||
{
|
||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||
|
||||
if (iRenderer) iRenderer->Render(currentShader, meshDoc, rm, this);
|
||||
else
|
||||
{
|
||||
|
||||
foreach(MeshModel * mp, meshDoc.meshList)
|
||||
{
|
||||
if(mp->visible) mp->Render(rm.drawMode,rm.colorMode,rm.textureMode);
|
||||
}
|
||||
}
|
||||
if(iEdit) iEdit->Decorate(*mm(),this);
|
||||
|
||||
// Draw the selection
|
||||
if(rm.selectedFace) mm()->RenderSelectedFace();
|
||||
if(rm.selectedVert) mm()->RenderSelectedVert();
|
||||
QAction * p;
|
||||
foreach(p , iDecoratorsList)
|
||||
{
|
||||
MeshDecorateInterface * decorInterface = qobject_cast<MeshDecorateInterface *>(p->parent());
|
||||
decorInterface->Decorate(p,*mm(),this,qFont);
|
||||
}
|
||||
|
||||
glPopAttrib();
|
||||
} ///end if busy
|
||||
|
||||
glPopMatrix(); // We restore the state to immediately after the trackball (and before the bbox scaling/translating)
|
||||
|
||||
if(trackBallVisible && !takeSnapTile && !(iEdit && !suspendedEditor))
|
||||
trackball.DrawPostApply();
|
||||
|
||||
// The picking of the surface position has to be done in object space,
|
||||
// so after trackball transformation (and before the matrix associated to each mesh);
|
||||
if(hasToPick && hasToGetPickPos)
|
||||
{
|
||||
Point3f pp;
|
||||
hasToPick=false;
|
||||
if(Pick<Point3f>(pointToPick[0],pointToPick[1],pp))
|
||||
{
|
||||
emit transmitSurfacePos(nameToGetPickPos, pp);
|
||||
hasToGetPickPos=false;
|
||||
}
|
||||
}
|
||||
glPopMatrix(); // We restore the state to immediately before the trackball
|
||||
|
||||
// Double click move picked point to center
|
||||
// It has to be done in the before trackball space (we MOVE the trackball itself...)
|
||||
if(hasToPick && !hasToGetPickPos)
|
||||
{
|
||||
Point3f pp;
|
||||
hasToPick=false;
|
||||
if(Pick<Point3f>(pointToPick[0],pointToPick[1],pp))
|
||||
{
|
||||
trackball.Translate(-pp);
|
||||
trackball.Scale(1.25f);
|
||||
QCursor::setPos(mapToGlobal(QPoint(width()/2+2,height()/2+2)));
|
||||
}
|
||||
}
|
||||
|
||||
// ...and take a snapshot
|
||||
if (takeSnapTile) pasteTile();
|
||||
|
||||
// Draw the log area background
|
||||
// on the bottom of the glArea
|
||||
if(infoAreaVisible)
|
||||
{
|
||||
displayInfo();
|
||||
updateFps(time.elapsed());
|
||||
}
|
||||
|
||||
// Finally display HELP if requested
|
||||
if (isHelpVisible()) displayHelp();
|
||||
|
||||
int error = glGetError();
|
||||
if(error) {
|
||||
log.Logf(GLLogStream::WARNING,"There are gl errors");
|
||||
}
|
||||
}
|
||||
|
||||
void GLArea::displayInfo()
|
||||
{
|
||||
// Enter in 2D screen Mode again
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(-1,1,-1,1,-1,1);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glPushAttrib(GL_ENABLE_BIT);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_LIGHTING);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glEnable(GL_BLEND);
|
||||
|
||||
qFont.setStyleStrategy(QFont::NoAntialias);
|
||||
qFont.setFamily("Helvetica");
|
||||
qFont.setPixelSize(12);
|
||||
|
||||
glBlendFunc(GL_ONE,GL_SRC_ALPHA);
|
||||
glas.logAreaColor[3]=128;
|
||||
glColor(glas.logAreaColor);
|
||||
int lineNum =4;
|
||||
float lineSpacing = qFont.pixelSize()*1.5f;
|
||||
float barHeight = -1 + 2.0*(lineSpacing*(lineNum+.25))/float(curSiz.height());
|
||||
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
glVertex2f(-1.f,barHeight); glVertex2f(-1.f,-1.f);
|
||||
glVertex2f( 1.f,-1.f); glVertex2f( 1.f,barHeight);
|
||||
glEnd();
|
||||
|
||||
// First the LOG
|
||||
glColor4f(1,1,1,1);
|
||||
|
||||
float middleCol=curSiz.width()*0.40;
|
||||
float rightCol=curSiz.width()*0.85;
|
||||
float startPos = curSiz.height()-(5+lineSpacing*(lineNum));
|
||||
|
||||
renderText(20,startPos+ 1*lineSpacing,tr("LOG MESSAGES"),qFont);
|
||||
log.glDraw(this,-1,3,lineSpacing,qFont);
|
||||
|
||||
if(meshDoc.size()==1)
|
||||
{
|
||||
renderText(middleCol,startPos+ 1*lineSpacing,tr("Vertices: %1").arg(mm()->cm.vn),qFont);
|
||||
renderText(middleCol,startPos+ 2*lineSpacing,tr("Faces: %1").arg(mm()->cm.fn),qFont);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderText(middleCol,startPos+ 1*lineSpacing,tr("<%1>").arg(mm()->shortName()),qFont);
|
||||
renderText(middleCol,startPos+ 2*lineSpacing,tr("Vertices: %1 (%2)").arg(mm()->cm.vn).arg(meshDoc.vn()),qFont);
|
||||
renderText(middleCol,startPos+ 3*lineSpacing,tr("Faces: %1 (%2)").arg(mm()->cm.fn).arg(meshDoc.fn()),qFont);
|
||||
}
|
||||
if(rm.selectedFace || rm.selectedVert || mm()->cm.sfn>0 || mm()->cm.svn>0 )
|
||||
renderText(middleCol,startPos+ 4*lineSpacing,tr("Selection: v:%1 f:%2").arg(mm()->cm.svn).arg(mm()->cm.sfn),qFont);
|
||||
|
||||
renderText(rightCol,startPos+ 4*lineSpacing,GetMeshInfoString(),qFont);
|
||||
|
||||
if(fov>5) renderText(rightCol,startPos+1*lineSpacing,QString("FOV: ")+QString::number((int)fov,10),qFont);
|
||||
else renderText(rightCol,startPos+1*lineSpacing,QString("FOV: Ortho"),qFont);
|
||||
if ((cfps>0) && (cfps<500))
|
||||
renderText(rightCol,startPos+2*lineSpacing,QString("FPS: %1").arg(cfps,7,'f',1),qFont);
|
||||
if ((clipRatioNear!=1) || (clipRatioFar!=1))
|
||||
renderText(rightCol,startPos+3*lineSpacing,QString("Clipping: N:%1 F:%2").arg(clipRatioNear,7,'f',1).arg(clipRatioFar,7,'f',1),qFont);
|
||||
|
||||
|
||||
// Closing 2D
|
||||
glPopAttrib();
|
||||
glPopMatrix(); // restore modelview
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPopMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void GLArea::displayHelp()
|
||||
{
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(-1,1,-1,1,-1,1);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glPushAttrib(GL_ENABLE_BIT);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_LIGHTING);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glEnable(GL_BLEND);
|
||||
|
||||
glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_CURRENT_BIT );
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glDisable(GL_LIGHTING);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glColor4f(.5f,.8f,1.f,.6f); glVertex2f(-1, 1);
|
||||
glColor4f(.0f,.0f,.0f,.0f); glVertex2f(-1,-1);
|
||||
glColor4f(.5f,.8f,1.f,.6f); glVertex2f(-.5f,1);
|
||||
glColor4f(.0f,.0f,.0f,.0f); glVertex2f(-.5f,-1);
|
||||
glEnd();
|
||||
|
||||
|
||||
float fontSpacingV = (curSiz.height()*.01f)+3;
|
||||
float hPosition = curSiz.width()*.1f;
|
||||
glColor(Color4b::White);
|
||||
//qFont.setBold(true);
|
||||
renderText(2+hPosition-(qFont.pointSize()*9),1.5*fontSpacingV,QString("MeshLab Quick Help"),qFont);qFont.setBold(false);
|
||||
renderText(2,3*fontSpacingV,QString("Drag:"),qFont); renderText(hPosition,3*fontSpacingV,QString("Rotate"),qFont);
|
||||
renderText(2,4.5*fontSpacingV,QString("Ctrl-Drag:"),qFont); renderText(hPosition,4.5*fontSpacingV,QString("Pan"),qFont);
|
||||
renderText(2,6*fontSpacingV,QString("Shift-Drag:"),qFont); renderText(hPosition,6*fontSpacingV,QString("Zoom"),qFont);
|
||||
renderText(2,7.5*fontSpacingV,QString("Alt-Drag:"),qFont); renderText(hPosition,7.5*fontSpacingV,QString("Z-Panning"),qFont);
|
||||
renderText(2,9*fontSpacingV,QString("Ctrl-Shift-Drag:"),qFont); renderText(hPosition,9*fontSpacingV,QString("Rotate light"),qFont);
|
||||
renderText(2,10.5*fontSpacingV,QString("Wheel:"),qFont); renderText(hPosition,10.5*fontSpacingV,QString("Zoom"),qFont);
|
||||
renderText(2,12*fontSpacingV,QString("Shift-Wheel:"),qFont); renderText(hPosition,12*fontSpacingV,QString("Change perspective"),qFont);
|
||||
renderText(2,13.5*fontSpacingV,QString("Ctrl-Wheel:"),qFont); renderText(hPosition,13.5*fontSpacingV,QString("Move far clipping plane"),qFont);
|
||||
renderText(2,15*fontSpacingV,QString("Ctrl-Shift-Wheel:"),qFont); renderText(hPosition,15*fontSpacingV,QString("Move near clipping plane"),qFont);
|
||||
renderText(2,16.5*fontSpacingV,QString("Double Click:"),qFont); renderText(hPosition,16.5*fontSpacingV,QString("Center on mouse"),qFont);
|
||||
renderText(2,18*fontSpacingV,QString("Alt+enter:"),qFont); renderText(hPosition,18*fontSpacingV,QString("Enter/Exit fullscreen mode"),qFont);
|
||||
glPopAttrib();
|
||||
// Closing 2D
|
||||
glPopAttrib();
|
||||
glPopMatrix(); // restore modelview
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPopMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
||||
}
|
||||
|
||||
void GLArea::saveSnapshot()
|
||||
{
|
||||
totalCols=totalRows=ss.resolution;
|
||||
tileRow=tileCol=0;
|
||||
|
||||
takeSnapTile=true;
|
||||
update();
|
||||
}
|
||||
|
||||
void GLArea::updateLayer()
|
||||
{
|
||||
//if we have an edit tool open, notify it that the current layer has changed
|
||||
if(iEdit)
|
||||
{
|
||||
assert(lastModelEdited); //if there is an editor last model edited should always be set when start edit is called
|
||||
iEdit->LayerChanged(meshDoc, *lastModelEdited, this);
|
||||
|
||||
//now update the last model edited
|
||||
//TODO this is not the best design.... iEdit should maybe keep track of the model on its own
|
||||
lastModelEdited = meshDoc.mm();
|
||||
}
|
||||
}
|
||||
|
||||
void GLArea::setCurrentEditAction(QAction *editAction)
|
||||
{
|
||||
assert(editAction);
|
||||
currentEditor = editAction;
|
||||
|
||||
iEdit = actionToMeshEditMap.value(currentEditor);
|
||||
assert(iEdit);
|
||||
lastModelEdited = meshDoc.mm();
|
||||
if (!iEdit->StartEdit(meshDoc, this))
|
||||
//iEdit->EndEdit(*(meshDoc.mm()), this);
|
||||
endEdit();
|
||||
else
|
||||
log.Logf(GLLogStream::SYSTEM,"Started Mode %s", qPrintable(currentEditor->text()));
|
||||
}
|
||||
|
||||
|
||||
void GLArea::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
bool close = true;
|
||||
if(isWindowModified())
|
||||
{
|
||||
QMessageBox::StandardButton ret=QMessageBox::question(
|
||||
this, tr("MeshLab"), tr("File '%1' modified.\n\nClose without saving?").arg(getFileName()),
|
||||
QMessageBox::Yes|QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
if(ret==QMessageBox::No)
|
||||
{
|
||||
close = false; // don't close please!
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(getCurrentEditAction()) endEdit();
|
||||
emit glareaClosed();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void GLArea::keyReleaseEvent ( QKeyEvent * e )
|
||||
{
|
||||
e->ignore();
|
||||
if(iEdit && !suspendedEditor) iEdit->keyReleaseEvent(e,*mm(),this);
|
||||
else{
|
||||
if(e->key()==Qt::Key_Control) trackball.ButtonUp(QT2VCG(Qt::NoButton, Qt::ControlModifier ) );
|
||||
if(e->key()==Qt::Key_Shift) trackball.ButtonUp(QT2VCG(Qt::NoButton, Qt::ShiftModifier ) );
|
||||
if(e->key()==Qt::Key_Alt) trackball.ButtonUp(QT2VCG(Qt::NoButton, Qt::AltModifier ) );
|
||||
}
|
||||
}
|
||||
|
||||
void GLArea::keyPressEvent ( QKeyEvent * e )
|
||||
{
|
||||
e->ignore();
|
||||
if(iEdit && !suspendedEditor) iEdit->keyPressEvent(e,*mm(),this);
|
||||
else{
|
||||
if(e->key()==Qt::Key_Control) trackball.ButtonDown(QT2VCG(Qt::NoButton, Qt::ControlModifier ) );
|
||||
if(e->key()==Qt::Key_Shift) trackball.ButtonDown(QT2VCG(Qt::NoButton, Qt::ShiftModifier ) );
|
||||
if(e->key()==Qt::Key_Alt) trackball.ButtonDown(QT2VCG(Qt::NoButton, Qt::AltModifier ) );
|
||||
}
|
||||
}
|
||||
|
||||
void GLArea::mousePressEvent(QMouseEvent*e)
|
||||
{
|
||||
e->accept();
|
||||
setFocus();
|
||||
|
||||
if( (iEdit && !suspendedEditor) && !(e->buttons() & Qt::MidButton) )
|
||||
iEdit->mousePressEvent(e,*mm(),this);
|
||||
else {
|
||||
if ((e->modifiers() & Qt::ShiftModifier) && (e->modifiers() & Qt::ControlModifier) &&
|
||||
(e->button()==Qt::LeftButton) )
|
||||
activeDefaultTrackball=false;
|
||||
else activeDefaultTrackball=true;
|
||||
|
||||
if (isDefaultTrackBall())
|
||||
{
|
||||
if(QApplication::keyboardModifiers () & Qt::Key_Control) trackball.ButtonDown(QT2VCG(Qt::NoButton, Qt::ControlModifier ) );
|
||||
else trackball.ButtonUp (QT2VCG(Qt::NoButton, Qt::ControlModifier ) );
|
||||
if(QApplication::keyboardModifiers () & Qt::Key_Shift) trackball.ButtonDown(QT2VCG(Qt::NoButton, Qt::ShiftModifier ) );
|
||||
else trackball.ButtonUp (QT2VCG(Qt::NoButton, Qt::ShiftModifier ) );
|
||||
if(QApplication::keyboardModifiers () & Qt::Key_Alt) trackball.ButtonDown(QT2VCG(Qt::NoButton, Qt::AltModifier ) );
|
||||
else trackball.ButtonUp (QT2VCG(Qt::NoButton, Qt::AltModifier ) );
|
||||
|
||||
trackball.MouseDown(e->x(),height()-e->y(), QT2VCG(e->button(), e->modifiers() ) );
|
||||
}
|
||||
else trackball_light.MouseDown(e->x(),height()-e->y(), QT2VCG(e->button(), Qt::NoModifier ) );
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
void GLArea::mouseMoveEvent(QMouseEvent*e)
|
||||
{
|
||||
if( (iEdit && !suspendedEditor) && !(e->buttons() & Qt::MidButton) )
|
||||
iEdit->mouseMoveEvent(e,*mm(),this);
|
||||
else {
|
||||
if (isDefaultTrackBall())
|
||||
{
|
||||
trackball.MouseMove(e->x(),height()-e->y());
|
||||
setCursorTrack(trackball.current_mode);
|
||||
}
|
||||
else trackball_light.MouseMove(e->x(),height()-e->y());
|
||||
update();
|
||||
}
|
||||
}
|
||||
// When mouse is released we set the correct mouse cursor
|
||||
void GLArea::mouseReleaseEvent(QMouseEvent*e)
|
||||
{
|
||||
//clearFocus();
|
||||
activeDefaultTrackball=true;
|
||||
if( (iEdit && !suspendedEditor) && (e->button() != Qt::MidButton) )
|
||||
iEdit->mouseReleaseEvent(e,*mm(),this);
|
||||
else {
|
||||
if (isDefaultTrackBall()) trackball.MouseUp(e->x(),height()-e->y(), QT2VCG(e->button(), e->modifiers() ) );
|
||||
else trackball_light.MouseUp(e->x(),height()-e->y(), QT2VCG(e->button(),e->modifiers()) );
|
||||
setCursorTrack(trackball.current_mode);
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
//Processing of tablet events, interesting only for painting plugins
|
||||
void GLArea::tabletEvent(QTabletEvent*e)
|
||||
{
|
||||
if(iEdit && !suspendedEditor) iEdit->tabletEvent(e,*mm(),this);
|
||||
else e->ignore();
|
||||
}
|
||||
|
||||
void GLArea::wheelEvent(QWheelEvent*e)
|
||||
{
|
||||
const int WHEEL_STEP = 120;
|
||||
float notch = e->delta()/ float(WHEEL_STEP);
|
||||
switch(e->modifiers())
|
||||
{
|
||||
case Qt::ShiftModifier + Qt::ControlModifier : clipRatioFar *= powf(1.2f, notch); break;
|
||||
case Qt::ControlModifier : clipRatioNear *= powf(1.2f, notch); break;
|
||||
case Qt::AltModifier : pointSize = math::Clamp(pointSize*powf(1.2f, notch),0.01f,150.0f);
|
||||
foreach(MeshModel * mp, meshDoc.meshList)
|
||||
mp->glw.SetHintParamf(GLW::HNPPointSize,pointSize);
|
||||
break;
|
||||
case Qt::ShiftModifier : fov = math::Clamp(fov*powf(1.2f,notch),5.0f,90.0f); break;
|
||||
default:
|
||||
trackball.MouseWheel( e->delta()/ float(WHEEL_STEP));
|
||||
break;
|
||||
}
|
||||
updateGL();
|
||||
}
|
||||
|
||||
|
||||
void GLArea::mouseDoubleClickEvent ( QMouseEvent * e )
|
||||
{
|
||||
hasToPick=true;
|
||||
pointToPick=Point2i(e->x(),height()-e->y());
|
||||
updateGL();
|
||||
}
|
||||
|
||||
void GLArea::setCursorTrack(vcg::TrackMode *tm)
|
||||
{
|
||||
//static QMap<QString,QCursor> curMap;
|
||||
if(curMap.isEmpty())
|
||||
{
|
||||
curMap[QString("")]=QCursor(Qt::ArrowCursor);
|
||||
curMap["SphereMode"]=QCursor(QPixmap(":/images/cursors/plain_trackball.png"),1,1);
|
||||
curMap["PanMode"]=QCursor(QPixmap(":/images/cursors/plain_pan.png"),1,1);
|
||||
curMap["ScaleMode"]=QCursor(QPixmap(":/images/cursors/plain_zoom.png"),1,1);
|
||||
}
|
||||
if(tm) setCursor(curMap[tm->Name()]);
|
||||
else setCursor(curMap[""]);
|
||||
|
||||
}
|
||||
|
||||
void GLArea::setDrawMode(vcg::GLW::DrawMode mode)
|
||||
{
|
||||
rm.drawMode = mode;
|
||||
updateGL();
|
||||
}
|
||||
|
||||
|
||||
void GLArea::setColorMode(vcg::GLW::ColorMode mode)
|
||||
{
|
||||
rm.colorMode = mode;
|
||||
updateGL();
|
||||
}
|
||||
void GLArea::updateTexture()
|
||||
{
|
||||
hasToUpdateTexture = true;
|
||||
}
|
||||
|
||||
// Texture loading done during the first paint.
|
||||
void GLArea::initTexture()
|
||||
{
|
||||
if(hasToUpdateTexture)
|
||||
{
|
||||
foreach (MeshModel *mp,meshDoc.meshList)
|
||||
mp->glw.TMId.clear();
|
||||
|
||||
qDebug("Beware: deleting the texutres could lead to problems for shared textures.");
|
||||
hasToUpdateTexture = false;
|
||||
}
|
||||
|
||||
foreach (MeshModel *mp, meshDoc.meshList)
|
||||
{
|
||||
if(!mp->cm.textures.empty() && mp->glw.TMId.empty()){
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
GLint MaxTextureSize;
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE,&MaxTextureSize);
|
||||
|
||||
for(unsigned int i =0; i< mp->cm.textures.size();++i){
|
||||
QImage img, imgScaled, imgGL;
|
||||
|
||||
bool res = img.load(mp->cm.textures[i].c_str());
|
||||
if(!res)
|
||||
{
|
||||
// Note that sometimes (in collada) the texture names could have been encoded with a url-like style (e.g. replacing spaces with '%20') so making some other attempt could be harmless
|
||||
QString ConvertedName = QString(mp->cm.textures[i].c_str()).replace(QString("%20"), QString(" "));
|
||||
res = img.load(ConvertedName);
|
||||
if(!res) qDebug("Failure of loading texture %s",mp->cm.textures[i].c_str());
|
||||
else qDebug("Warning, texture loading was successful only after replacing %%20 with spaces;\n Loaded texture %s instead of %s",qPrintable(ConvertedName),mp->cm.textures[i].c_str());
|
||||
}
|
||||
// image has to be scaled to a 2^n size. We choose the first 2^N <= picture size.
|
||||
int bestW=pow(2.0,floor(::log(double(img.width() ))/::log(2.0)));
|
||||
int bestH=pow(2.0,floor(::log(double(img.height()))/::log(2.0)));
|
||||
while(bestW>MaxTextureSize) bestW /=2;
|
||||
while(bestH>MaxTextureSize) bestH /=2;
|
||||
|
||||
log.Log(GLLogStream::SYSTEM,"Loading textures");
|
||||
log.Logf(GLLogStream::SYSTEM," Texture[ %3i ] = '%s' ( %6i x %6i ) -> ( %6i x %6i )", i,mp->cm.textures[i].c_str(), img.width(), img.height(),bestW,bestH);
|
||||
imgScaled=img.scaled(bestW,bestH,Qt::IgnoreAspectRatio,Qt::SmoothTransformation);
|
||||
imgGL=convertToGLFormat(imgScaled);
|
||||
mp->glw.TMId.push_back(0);
|
||||
glGenTextures( 1, (GLuint*)&(mp->glw.TMId.back()) );
|
||||
glBindTexture( GL_TEXTURE_2D, mp->glw.TMId.back() );
|
||||
glTexImage2D( GL_TEXTURE_2D, 0, 3, imgGL.width(), imgGL.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, imgGL.bits() );
|
||||
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
|
||||
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, imgGL.width(), imgGL.height(), GL_RGBA, GL_UNSIGNED_BYTE, imgGL.bits() );
|
||||
|
||||
if(glas.textureMagFilter == 0 ) glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
|
||||
else glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
if(glas.textureMinFilter == 0 ) glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
|
||||
else glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
|
||||
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
qDebug(" will be loaded as GL texture id %i ( %i x %i )",mp->glw.TMId.back() ,imgGL.width(), imgGL.height());
|
||||
}
|
||||
}
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
}
|
||||
|
||||
void GLArea::setTextureMode(vcg::GLW::TextureMode mode)
|
||||
{
|
||||
rm.textureMode = mode;
|
||||
updateGL();
|
||||
}
|
||||
|
||||
void GLArea::setLight(bool state)
|
||||
{
|
||||
rm.lighting = state;
|
||||
updateGL();
|
||||
}
|
||||
|
||||
void GLArea::setLightMode(bool state,LightingModel lmode)
|
||||
{
|
||||
switch(lmode)
|
||||
{
|
||||
case LDOUBLE: rm.doubleSideLighting = state; break;
|
||||
case LFANCY: rm.fancyLighting = state; break;
|
||||
}
|
||||
updateGL();
|
||||
}
|
||||
|
||||
void GLArea::setBackFaceCulling(bool enabled)
|
||||
{
|
||||
rm.backFaceCull = enabled;
|
||||
updateGL();
|
||||
}
|
||||
|
||||
void GLArea::setSelectFaceRendering(bool enabled)
|
||||
{
|
||||
rm.selectedFace = enabled;
|
||||
updateGL();
|
||||
}
|
||||
void GLArea::setSelectVertRendering(bool enabled)
|
||||
{
|
||||
rm.selectedVert = enabled;
|
||||
updateGL();
|
||||
}
|
||||
|
||||
void GLArea::setLightModel()
|
||||
{
|
||||
if (rm.lighting)
|
||||
{
|
||||
glEnable(GL_LIGHTING);
|
||||
|
||||
if (rm.doubleSideLighting)
|
||||
glEnable(GL_LIGHT1);
|
||||
else
|
||||
glDisable(GL_LIGHT1);
|
||||
|
||||
glLightfv(GL_LIGHT0, GL_AMBIENT, Color4f::Construct(glas.baseLightAmbientColor).V());
|
||||
glLightfv(GL_LIGHT0, GL_DIFFUSE, Color4f::Construct(glas.baseLightDiffuseColor).V());
|
||||
glLightfv(GL_LIGHT0, GL_SPECULAR,Color4f::Construct(glas.baseLightSpecularColor).V());
|
||||
|
||||
glLightfv(GL_LIGHT1, GL_AMBIENT, Color4f::Construct(glas.baseLightAmbientColor).V());
|
||||
glLightfv(GL_LIGHT1, GL_DIFFUSE, Color4f::Construct(glas.baseLightDiffuseColor).V());
|
||||
glLightfv(GL_LIGHT1, GL_SPECULAR,Color4f::Construct(glas.baseLightSpecularColor).V());
|
||||
if(rm.fancyLighting)
|
||||
{
|
||||
glLightfv(GL_LIGHT0, GL_DIFFUSE, Color4f::Construct(glas.fancyFLightDiffuseColor).V());
|
||||
glLightfv(GL_LIGHT1, GL_DIFFUSE, Color4f::Construct(glas.fancyBLightDiffuseColor).V());
|
||||
}
|
||||
}
|
||||
else glDisable(GL_LIGHTING);
|
||||
}
|
||||
|
||||
void GLArea::setSnapshotSetting(const SnapshotSetting & s)
|
||||
{
|
||||
ss=s;
|
||||
}
|
||||
|
||||
void GLArea::setView()
|
||||
{
|
||||
glViewport(0,0, this->width(),this->height());
|
||||
curSiz.setWidth(this->width());
|
||||
curSiz.setHeight(this->height());
|
||||
|
||||
GLfloat fAspect = (GLfloat)curSiz.width()/ curSiz.height();
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
|
||||
// This parameter is the one that controls:
|
||||
// HOW LARGE IS THE TRACKBALL ICON ON THE SCREEN.
|
||||
float viewRatio = 1.75f;
|
||||
float cameraDist = viewRatio / tanf(vcg::math::ToRad(fov*.5f));
|
||||
|
||||
nearPlane = cameraDist - 2.f*clipRatioNear;
|
||||
farPlane = cameraDist + 10.f*clipRatioFar;
|
||||
if(nearPlane<=cameraDist*.1f) nearPlane=cameraDist*.1f;
|
||||
|
||||
if (!takeSnapTile)
|
||||
{
|
||||
if(fov==5) glOrtho( -viewRatio*fAspect, viewRatio*fAspect, -viewRatio, viewRatio, cameraDist - 2.f*clipRatioNear, cameraDist+2.f*clipRatioFar);
|
||||
else gluPerspective(fov, fAspect, nearPlane, farPlane);
|
||||
}
|
||||
else setTiledView(fov, viewRatio, fAspect, nearPlane, farPlane, cameraDist);
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
gluLookAt(0, 0, cameraDist,0, 0, 0, 0, 1, 0);
|
||||
}
|
||||
|
||||
void GLArea::setTiledView(GLdouble fovY, float viewRatio, float fAspect, GLdouble zNear, GLdouble zFar, float cameraDist)
|
||||
{
|
||||
if(fovY<=5)
|
||||
{
|
||||
GLdouble fLeft = -viewRatio*fAspect;
|
||||
GLdouble fRight = viewRatio*fAspect;
|
||||
GLdouble fBottom = -viewRatio;
|
||||
GLdouble fTop = viewRatio;
|
||||
|
||||
GLdouble tDimX = fabs(fRight-fLeft) / totalCols;
|
||||
GLdouble tDimY = fabs(fTop-fBottom) / totalRows;
|
||||
|
||||
|
||||
glOrtho(fLeft + tDimX * tileCol, fLeft + tDimX * (tileCol+1), /* left, right */
|
||||
fBottom + tDimY * tileRow, fBottom + tDimY * (tileRow+1), /* bottom, top */
|
||||
cameraDist - 2.f*clipRatioNear, cameraDist+2.f*clipRatioFar);
|
||||
}
|
||||
else
|
||||
{
|
||||
GLdouble fTop = zNear * tan(math::ToRad(fovY/2.0));
|
||||
GLdouble fRight = fTop * fAspect;
|
||||
GLdouble fBottom = -fTop;
|
||||
GLdouble fLeft = -fRight;
|
||||
|
||||
// tile Dimension
|
||||
GLdouble tDimX = fabs(fRight-fLeft) / totalCols;
|
||||
GLdouble tDimY = fabs(fTop-fBottom) / totalRows;
|
||||
|
||||
glFrustum(fLeft + tDimX * tileCol, fLeft + tDimX * (tileCol+1),
|
||||
fBottom + tDimY * tileRow, fBottom + tDimY * (tileRow+1), zNear, zFar);
|
||||
}
|
||||
}
|
||||
|
||||
void GLArea::updateFps(float deltaTime)
|
||||
{
|
||||
static float fpsVector[10];
|
||||
static int j=0;
|
||||
float averageFps=0;
|
||||
if (deltaTime>0) {
|
||||
fpsVector[j]=deltaTime;
|
||||
j=(j+1) % 10;
|
||||
}
|
||||
for (int i=0;i<10;i++) averageFps+=fpsVector[i];
|
||||
cfps=1000.0f/(averageFps/10);
|
||||
lastTime=deltaTime;
|
||||
}
|
||||
|
||||
void GLArea::resetTrackBall()
|
||||
{
|
||||
trackball.Reset();
|
||||
float newScale= 3.0f/meshDoc.bbox().Diag();
|
||||
trackball.track.sca = newScale;
|
||||
trackball.track.tra = -meshDoc.bbox().Center();
|
||||
updateGL();
|
||||
}
|
||||
|
||||
void GLArea::hideEvent(QHideEvent * /*event*/)
|
||||
{
|
||||
trackball.current_button=0;
|
||||
}
|
||||
|
||||
void GLArea::sendViewPos(QString name)
|
||||
{
|
||||
#ifndef VCG_USE_EIGEN
|
||||
Point3f pos= trackball.track.InverseMatrix() *Inverse(trackball.camera.model) *Point3f(0,0,0);
|
||||
#else
|
||||
Point3f pos= Eigen::Transform3f(trackball.track.InverseMatrix()) * Eigen::Transform3f(Inverse(trackball.camera.model)).translation();
|
||||
#endif
|
||||
emit transmitViewPos(name, pos);
|
||||
}
|
||||
|
||||
void GLArea::sendSurfacePos(QString name)
|
||||
{
|
||||
nameToGetPickPos = name;
|
||||
hasToGetPickPos=true;
|
||||
}
|
||||
|
||||
void GLArea::sendViewDir(QString name)
|
||||
{
|
||||
Point3f dir= getViewDir();
|
||||
emit transmitViewDir(name,dir);
|
||||
}
|
||||
|
||||
void GLArea::sendCameraPos(QString name)
|
||||
{
|
||||
Point3f pos=meshDoc.mm()->cm.shot.GetViewPoint();
|
||||
emit transmitViewDir(name, pos);
|
||||
}
|
||||
|
||||
|
||||
Point3f GLArea::getViewDir()
|
||||
{
|
||||
vcg::Matrix44f rotM;
|
||||
trackball.track.rot.ToMatrix(rotM);
|
||||
vcg::Invert(rotM);
|
||||
return rotM*vcg::Point3f(0,0,1);
|
||||
}
|
||||
|
||||
void GLArea::updateCustomSettingValues( RichParameterSet& rps )
|
||||
{
|
||||
glas.updateGlobalParameterSet(rps);
|
||||
this->update();
|
||||
}
|
||||
|
||||
void GLArea::initGlobalParameterSet( RichParameterSet * defaultGlobalParamSet)
|
||||
{
|
||||
GLAreaSetting::initGlobalParameterSet(defaultGlobalParamSet);
|
||||
}
|
||||
@ -1,303 +0,0 @@
|
||||
/****************************************************************************
|
||||
* MeshLab o o *
|
||||
* An extendible mesh processor o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2005, 2006 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef GLAREA_H
|
||||
#define GLAREA_H
|
||||
#include <GL/glew.h>
|
||||
#include <QTimer>
|
||||
#include <QGLWidget>
|
||||
#include <QTime>
|
||||
#include <QtGui>
|
||||
#include <vcg/space/plane3.h>
|
||||
#include <vcg/space/line3.h>
|
||||
#include <vcg/math/matrix44.h>
|
||||
#include <wrap/gl/math.h>
|
||||
#include <wrap/gl/trimesh.h>
|
||||
#include <wrap/gui/trackball.h>
|
||||
|
||||
#include "../common/interfaces.h"
|
||||
#include "../common/filterscript.h"
|
||||
//#include "layerDialog.h"
|
||||
#include "glarea_setting.h"
|
||||
|
||||
#define SSHOT_BYTES_PER_PIXEL 4
|
||||
|
||||
enum LightingModel{LDOUBLE,LFANCY};
|
||||
|
||||
|
||||
class SnapshotSetting
|
||||
{
|
||||
public:
|
||||
QString outdir;
|
||||
QString basename;
|
||||
int counter;
|
||||
int resolution;
|
||||
|
||||
SnapshotSetting()
|
||||
{
|
||||
outdir=".";
|
||||
basename="snapshot";
|
||||
counter=0;
|
||||
resolution=1;
|
||||
};
|
||||
};
|
||||
|
||||
class MeshModel;
|
||||
class GLArea : public QGLWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GLArea(QWidget *parent, RichParameterSet *current);
|
||||
~GLArea();
|
||||
static void initGlobalParameterSet( RichParameterSet * /*globalparam*/);
|
||||
private:
|
||||
|
||||
|
||||
public:
|
||||
//LayerDialog *layerDialog;
|
||||
// Layer Management stuff.
|
||||
MeshDocument meshDoc;
|
||||
MeshModel *mm(){return meshDoc.mm();}
|
||||
|
||||
vcg::Trackball trackball;
|
||||
vcg::Trackball trackball_light;
|
||||
GLLogStream log;
|
||||
FilterScript filterHistory;
|
||||
GLAreaSetting glas;
|
||||
QSize curSiz;
|
||||
QSize minimumSizeHint() const;
|
||||
QSize sizeHint() const;
|
||||
|
||||
QAction *getLastAppliedFilter() {return lastFilterRef;}
|
||||
void setLastAppliedFilter(QAction *qa) {lastFilterRef = qa;}
|
||||
|
||||
QString getFileName() {return QString(mm()->shortName());}
|
||||
void setFileName(QString name)
|
||||
{
|
||||
mm()->setFileName(name);
|
||||
setWindowTitle(QFileInfo(name).fileName()+tr("[*]"));
|
||||
//layerDialog->setWindowTitle("Layer Dialog for "+QFileInfo(name).fileName());
|
||||
|
||||
ss.basename=QFileInfo(getFileName()).baseName().append("Snap");
|
||||
}
|
||||
|
||||
RenderMode & getCurrentRenderMode() {return rm;}
|
||||
|
||||
const SnapshotSetting& getSnapshotSetting() {/*ss.dx=vpWidth; ss.dy=vpHeight;*/ return ss;}
|
||||
void updateFps(float deltaTime);
|
||||
|
||||
void showTrackBall(bool b) {trackBallVisible = b; updateGL();}
|
||||
bool isHelpVisible() {return helpVisible;}
|
||||
bool isTrackBallVisible() {return trackBallVisible;}
|
||||
bool isDefaultTrackBall() {return activeDefaultTrackball;}
|
||||
|
||||
void toggleHelpVisible() {helpVisible = !helpVisible; update();}
|
||||
void setBackFaceCulling(bool enabled);
|
||||
void setSnapshotSetting(const SnapshotSetting & s);
|
||||
void setLight(bool state);
|
||||
void setLightMode(bool state,LightingModel lmode);
|
||||
void saveSnapshot();
|
||||
void setLightModel();
|
||||
void setView();
|
||||
void resetTrackBall();
|
||||
std::list<QAction *> iDecoratorsList;
|
||||
|
||||
void setRenderer(MeshRenderInterface *rend, QAction *shader){ iRenderer = rend; currentShader = shader;}
|
||||
MeshRenderInterface * getRenderer() { return iRenderer; }
|
||||
|
||||
// Edit Mode management
|
||||
// In the glArea we can have a active Editor that can toggled into a ''suspendeed'' state
|
||||
// in which the mouse event are redirected back to the GLArea to drive the camera trackball
|
||||
// The decorate function of the current active editor is still called.
|
||||
// EndEdit is called only when you press again the same button or when you change editor.
|
||||
|
||||
public slots:
|
||||
void updateTexture(); // slot for forcing the texture reload.
|
||||
|
||||
//slots for changing the draw rendering and texturing mode
|
||||
void setDrawMode(vcg::GLW::DrawMode mode);
|
||||
void setColorMode(vcg::GLW::ColorMode mode);
|
||||
void setTextureMode(vcg::GLW::TextureMode mode);
|
||||
void updateCustomSettingValues(RichParameterSet& rps);
|
||||
|
||||
void endEdit(){
|
||||
if(iEdit && currentEditor)
|
||||
{
|
||||
iEdit->EndEdit(*mm(),this);
|
||||
}
|
||||
iEdit= 0;
|
||||
currentEditor=0;
|
||||
setCursorTrack(0);
|
||||
update();
|
||||
emit updateMainWindowMenus();
|
||||
}
|
||||
|
||||
void setSelectFaceRendering(bool enabled);
|
||||
void setSelectVertRendering(bool enabled);
|
||||
|
||||
void suspendEditToggle()
|
||||
{
|
||||
if(currentEditor==0) return;
|
||||
static QCursor qc;
|
||||
if(suspendedEditor) {
|
||||
suspendedEditor=false;
|
||||
setCursor(qc);
|
||||
} else {
|
||||
suspendedEditor=true;
|
||||
qc=cursor();
|
||||
setCursorTrack(0);
|
||||
}
|
||||
}
|
||||
|
||||
signals:
|
||||
void updateMainWindowMenus(); //updates the menus of the meshlab MainWindow
|
||||
void glareaClosed(); //someone has closed the glarea
|
||||
|
||||
public slots:
|
||||
|
||||
// Called when we change layer, notifies the edit tool if one is open
|
||||
void updateLayer();
|
||||
|
||||
public:
|
||||
|
||||
//call when the editor changes
|
||||
void setCurrentEditAction(QAction *editAction);
|
||||
|
||||
//get the currently active edit action
|
||||
QAction * getCurrentEditAction() { return currentEditor; }
|
||||
|
||||
//get the currently active mesh editor
|
||||
MeshEditInterface * getCurrentMeshEditor() { return iEdit; }
|
||||
|
||||
//see if this glAarea has a MESHEditInterface for this action
|
||||
bool editorExistsForAction(QAction *editAction){ return actionToMeshEditMap.contains(editAction); }
|
||||
|
||||
//add a MeshEditInterface for the given action
|
||||
void addMeshEditor(QAction *editAction, MeshEditInterface *editor){ actionToMeshEditMap.insert(editAction, editor); }
|
||||
|
||||
void closeEvent(QCloseEvent *event);
|
||||
float lastRenderingTime() { return lastTime;}
|
||||
void drawGradient();
|
||||
void drawLight();
|
||||
float getFov() { return fov; }
|
||||
|
||||
// the following pairs of slot/signal implements a very simple message passing mechanism.
|
||||
// a widget that has a pointer to the glarea call the sendViewDir() slot and
|
||||
// setup a connect to recive the transmitViewDir signal that actually contains the point3f.
|
||||
// This mechanism is used to get the view direction/position and picking point on surface in the filter parameter dialog.
|
||||
// See the Point3fWidget code.
|
||||
signals :
|
||||
void transmitViewDir(QString name, vcg::Point3f dir);
|
||||
void transmitViewPos(QString name, vcg::Point3f dir);
|
||||
void transmitSurfacePos(QString name,vcg::Point3f dir);
|
||||
void transmitCameraPos(QString name,vcg::Point3f dir);
|
||||
public slots:
|
||||
void sendViewPos(QString name);
|
||||
void sendSurfacePos(QString name);
|
||||
void sendViewDir(QString name);
|
||||
void sendCameraPos(QString name);
|
||||
|
||||
|
||||
public:
|
||||
vcg::Point3f getViewDir();
|
||||
bool infoAreaVisible; // Draws the lower info area ?
|
||||
bool suspendedEditor;
|
||||
protected:
|
||||
|
||||
void initializeGL();
|
||||
void initTexture();
|
||||
void displayInfo();
|
||||
void displayHelp();
|
||||
|
||||
QString GetMeshInfoString();
|
||||
void paintGL();
|
||||
void keyReleaseEvent ( QKeyEvent * e );
|
||||
void keyPressEvent ( QKeyEvent * e );
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void mouseDoubleClickEvent ( QMouseEvent * event ) ;
|
||||
void wheelEvent(QWheelEvent*e);
|
||||
void tabletEvent(QTabletEvent *e);
|
||||
bool drawSelection;
|
||||
|
||||
void hideEvent(QHideEvent * event);
|
||||
|
||||
private:
|
||||
QMap<QString,QCursor> curMap;
|
||||
void pasteTile();
|
||||
void setTiledView(GLdouble fovY, float viewRatio, float fAspect, GLdouble zNear, GLdouble zFar, float cameraDist);
|
||||
|
||||
bool helpVisible; // Help on screen
|
||||
bool trackBallVisible; // Draws the trackball ?
|
||||
bool activeDefaultTrackball; // keep track on active trackball
|
||||
bool hasToUpdateTexture; // has to reload textures at the next redraw
|
||||
bool hasToPick; // has to pick during the next redraw.
|
||||
bool hasToGetPickPos; // if we are waiting for a double click for getting a surface position that has to be sent back using signal/slots (for parameters)
|
||||
QString nameToGetPickPos; // the name of the parameter that has asked for the point on the surface
|
||||
|
||||
vcg::Point2i pointToPick;
|
||||
|
||||
//shader support
|
||||
MeshRenderInterface *iRenderer;
|
||||
QAction *currentShader;
|
||||
QAction *lastFilterRef; // reference to last filter applied
|
||||
QFont qFont; //font settings
|
||||
|
||||
// Editing support
|
||||
MeshEditInterface *iEdit;
|
||||
QAction *currentEditor;
|
||||
QAction *suspendedEditRef; // reference to last Editing Mode Used
|
||||
QMap<QAction*, MeshEditInterface*> actionToMeshEditMap;
|
||||
|
||||
//the last model that start edit was called with
|
||||
MeshModel *lastModelEdited;
|
||||
|
||||
public:
|
||||
RenderMode rm;
|
||||
// view setting variables
|
||||
float fov;
|
||||
float clipRatioFar;
|
||||
float clipRatioNear;
|
||||
float nearPlane;
|
||||
float farPlane;
|
||||
float pointSize;
|
||||
private:
|
||||
float cfps;
|
||||
float lastTime;
|
||||
|
||||
SnapshotSetting ss;
|
||||
QImage snapBuffer;
|
||||
bool takeSnapTile;
|
||||
|
||||
enum AnimMode { AnimNone, AnimSpin, AnimInterp};
|
||||
AnimMode animMode;
|
||||
int tileCol, tileRow, totalCols, totalRows;
|
||||
void setCursorTrack(vcg::TrackMode *tm);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@ -1,41 +0,0 @@
|
||||
#include "glarea.h"
|
||||
#include "glarea_setting.h"
|
||||
|
||||
void GLAreaSetting::initGlobalParameterSet( RichParameterSet * defaultGlobalParamSet)
|
||||
{
|
||||
defaultGlobalParamSet->addParam(new RichColor(backgroundBotColorParam(),QColor(128,128,255),"MeshLab Bottom BackGround Color ","MeshLab GLarea's BackGround Color(bottom corner)"));
|
||||
defaultGlobalParamSet->addParam(new RichColor(backgroundTopColorParam(),QColor( 0, 0, 0),"MeshLab Top BackGround Color","MeshLab GLarea's BackGround Color(top corner)"));
|
||||
defaultGlobalParamSet->addParam(new RichColor(logAreaColorParam(), QColor(128,16,16),"MeshLab GLarea's Log Area Color","MeshLab GLarea's BackGround Color(bottom corner)"));
|
||||
|
||||
|
||||
defaultGlobalParamSet->addParam(new RichColor(baseLightAmbientColorParam() ,QColor( 32, 32, 32),"MeshLab Base Light Ambient Color","MeshLab GLarea's BackGround Color(bottom corner)"));
|
||||
defaultGlobalParamSet->addParam(new RichColor(baseLightDiffuseColorParam() ,QColor(204,204,204),"MeshLab Base Light Diffuse Color","MeshLab GLarea's BackGround Color(top corner)"));
|
||||
defaultGlobalParamSet->addParam(new RichColor(baseLightSpecularColorParam() ,QColor(255,255,255),"MeshLab Base Light Specular Color","MeshLab GLarea's BackGround Color(bottom corner)"));
|
||||
|
||||
defaultGlobalParamSet->addParam(new RichColor(fancyBLightDiffuseColorParam() ,QColor(255,204,204),"MeshLab Base Light Diffuse Color","MeshLab GLarea's BackGround Color(top corner)"));
|
||||
defaultGlobalParamSet->addParam(new RichColor(fancyFLightDiffuseColorParam() ,QColor(204,204,255),"MeshLab Base Light Diffuse Color","MeshLab GLarea's BackGround Color(top corner)"));
|
||||
|
||||
QStringList textureMinFilterModes = (QStringList() << "Nearest" << "MipMap");
|
||||
QStringList textureMagFilterModes = (QStringList() << "Nearest" << "Linear");
|
||||
defaultGlobalParamSet->addParam(new RichEnum(textureMinFilterParam() , 1,textureMinFilterModes,"MeshLab Texture Minification Filtering","MeshLab GLarea's BackGround Color(top corner)"));
|
||||
defaultGlobalParamSet->addParam(new RichEnum(textureMagFilterParam() , 1,textureMagFilterModes,"MeshLab Texture Magnification Filtering","MeshLab GLarea's BackGround Color(top corner)"));
|
||||
}
|
||||
|
||||
|
||||
void GLAreaSetting::updateGlobalParameterSet( RichParameterSet& rps )
|
||||
{
|
||||
logAreaColor = rps.getColor4b(logAreaColorParam());
|
||||
backgroundBotColor = rps.getColor4b(backgroundBotColorParam());
|
||||
backgroundTopColor = rps.getColor4b(backgroundTopColorParam());
|
||||
|
||||
baseLightAmbientColor = rps.getColor4b(baseLightAmbientColorParam() );
|
||||
baseLightDiffuseColor = rps.getColor4b(baseLightDiffuseColorParam() );
|
||||
baseLightSpecularColor = rps.getColor4b(baseLightSpecularColorParam() );
|
||||
|
||||
fancyBLightDiffuseColor = rps.getColor4b(fancyBLightDiffuseColorParam());
|
||||
fancyFLightDiffuseColor = rps.getColor4b(fancyFLightDiffuseColorParam());
|
||||
|
||||
textureMinFilter = rps.getEnum(this->textureMinFilterParam());
|
||||
textureMagFilter = rps.getEnum(this->textureMagFilterParam());
|
||||
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
#ifndef GLAREA_SETTING_H
|
||||
#define GLAREA_SETTING_H
|
||||
|
||||
class GLAreaSetting
|
||||
{
|
||||
public:
|
||||
|
||||
vcg::Color4b baseLightAmbientColor;
|
||||
vcg::Color4b baseLightDiffuseColor;
|
||||
vcg::Color4b baseLightSpecularColor;
|
||||
inline static QString baseLightAmbientColorParam() {return "MeshLab::Appearance::baseLightAmbientColor";}
|
||||
inline static QString baseLightDiffuseColorParam() {return "MeshLab::Appearance::baseLightDiffuseColor";}
|
||||
inline static QString baseLightSpecularColorParam() {return "MeshLab::Appearance::baseLightSpecularColor";}
|
||||
|
||||
vcg::Color4b fancyBLightDiffuseColor;
|
||||
inline static QString fancyBLightDiffuseColorParam() {return "MeshLab::Appearance::fancyBLightDiffuseColor";}
|
||||
|
||||
vcg::Color4b fancyFLightDiffuseColor;
|
||||
inline static QString fancyFLightDiffuseColorParam() {return "MeshLab::Appearance::fancyFLightDiffuseColor";}
|
||||
|
||||
|
||||
vcg::Color4b backgroundBotColor;
|
||||
vcg::Color4b backgroundTopColor;
|
||||
vcg::Color4b logAreaColor;
|
||||
inline static QString backgroundBotColorParam() {return "MeshLab::Appearance::backgroundBotColor";}
|
||||
inline static QString backgroundTopColorParam() {return "MeshLab::Appearance::backgroundTopColor";}
|
||||
inline static QString logAreaColorParam() {return "MeshLab::Appearance::logAreaColor";}
|
||||
|
||||
int textureMagFilter;
|
||||
int textureMinFilter;
|
||||
inline static QString textureMinFilterParam() {return "MeshLab::Appearance::textureMinFilter";}
|
||||
inline static QString textureMagFilterParam() {return "MeshLab::Appearance::textureMagFilter";}
|
||||
|
||||
void updateGlobalParameterSet( RichParameterSet& rps );
|
||||
static void initGlobalParameterSet( RichParameterSet * defaultGlobalParamSet);
|
||||
};
|
||||
|
||||
|
||||
#endif // GLAREA_SETTING_H
|
||||
@ -1,25 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<div style="text-align: center;">
|
||||
<span style="font-family: Lucida Sans; font-size: 18pt;">
|
||||
Congratulations!
|
||||
</span><br />
|
||||
<span style="font-family: Lucida Sans;"><br />
|
||||
You have successfully used MeshLab to open and process more than <em> one hundred meshes</em>!<br />
|
||||
We hope that this means that you have found MeshLab useful.<br/><br/>
|
||||
Please consider to send a short email to the developers of MeshLab, describing how MeshLab fitted your needs,
|
||||
attach to the email some screenshots of your processed meshes and tell us your impression about MeshLab. <br />
|
||||
<br/>
|
||||
MeshLab is developed on public funding and assessment of its impact on the whole community is necessary, so, <em>please</em>, spend a couple of minutes writing down a mail to us.<br />
|
||||
Thanks for using MeshLab<br />
|
||||
<br />
|
||||
Paolo Cignoni<br />
|
||||
<br />
|
||||
</span>
|
||||
</div>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 271 B |
|
Before Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 274 B |
|
Before Width: | Height: | Size: 293 B |
|
Before Width: | Height: | Size: 273 B |
|
Before Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 231 B |
|
Before Width: | Height: | Size: 245 B |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 907 B |
|
Before Width: | Height: | Size: 979 B |
|
Before Width: | Height: | Size: 907 B |
|
Before Width: | Height: | Size: 1.5 KiB |
@ -1,540 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="744.09448819"
|
||||
height="1052.3622047"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.44.1"
|
||||
sodipodi:docbase="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images"
|
||||
sodipodi:docname="layer_icons.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
id="linearGradient2999">
|
||||
<stop
|
||||
style="stop-color:black;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3001" />
|
||||
<stop
|
||||
id="stop3019"
|
||||
offset="0.42857143"
|
||||
style="stop-color:#7f7f7f;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3009"
|
||||
offset="0.5"
|
||||
style="stop-color:white;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#7f7f7f;stop-opacity:1;"
|
||||
offset="0.58571428"
|
||||
id="stop3017" />
|
||||
<stop
|
||||
style="stop-color:black;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3003" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2984">
|
||||
<stop
|
||||
style="stop-color:olive;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2986" />
|
||||
<stop
|
||||
id="stop3021"
|
||||
offset="0.74285716"
|
||||
style="stop-color:#fafa47;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#898900;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2988" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2984"
|
||||
id="linearGradient2990"
|
||||
x1="307.83224"
|
||||
y1="437.82755"
|
||||
x2="357.65425"
|
||||
y2="437.82755"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.001485,0,0,0.859002,0.488951,61.24134)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2999"
|
||||
id="radialGradient3007"
|
||||
cx="331.62613"
|
||||
cy="418.47134"
|
||||
fx="331.62613"
|
||||
fy="418.47134"
|
||||
r="23.276581"
|
||||
gradientTransform="matrix(1.641657,-0.13482,0.185211,2.255264,-289.0416,-482.2163)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2999"
|
||||
id="radialGradient3029"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.102811,-1.223528,1.680849,1.515013,-838.548,177.7291)"
|
||||
cx="331.62613"
|
||||
cy="418.47134"
|
||||
fx="331.62613"
|
||||
fy="418.47134"
|
||||
r="23.276581" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2984"
|
||||
id="linearGradient3031"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.001485,0,0,0.859002,-95.84439,61.24134)"
|
||||
x1="307.83224"
|
||||
y1="437.82755"
|
||||
x2="357.65425"
|
||||
y2="437.82755" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
gridtolerance="10000"
|
||||
guidetolerance="10"
|
||||
objecttolerance="10"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="3.0519028"
|
||||
inkscape:cx="267.11002"
|
||||
inkscape:cy="706.37106"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:window-width="1162"
|
||||
inkscape:window-height="751"
|
||||
inkscape:window-x="43"
|
||||
inkscape:window-y="22" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
style="opacity:1;display:inline">
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:lime;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path1872"
|
||||
sodipodi:cx="234.28572"
|
||||
sodipodi:cy="316.64789"
|
||||
sodipodi:rx="22.857143"
|
||||
sodipodi:ry="24.285715"
|
||||
d="M 257.14286 316.64789 A 22.857143 24.285715 0 1 1 211.42858,316.64789 A 22.857143 24.285715 0 1 1 257.14286 316.64789 z"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:black"
|
||||
id="path1880"
|
||||
sodipodi:cx="209.86906"
|
||||
sodipodi:cy="357.87741"
|
||||
sodipodi:rx="7.0447855"
|
||||
sodipodi:ry="7.0447855"
|
||||
d="M 216.91385 357.87741 A 7.0447855 7.0447855 0 1 1 202.82428,357.87741 A 7.0447855 7.0447855 0 1 1 216.91385 357.87741 z"
|
||||
transform="matrix(1.395349,0,0,1.418605,-58.56049,-191.7502)"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:white;display:inline"
|
||||
id="path1882"
|
||||
sodipodi:cx="209.86906"
|
||||
sodipodi:cy="357.87741"
|
||||
sodipodi:rx="7.0447855"
|
||||
sodipodi:ry="7.0447855"
|
||||
d="M 216.91385 357.87741 A 7.0447855 7.0447855 0 1 1 202.82428,357.87741 A 7.0447855 7.0447855 0 1 1 216.91385 357.87741 z"
|
||||
transform="matrix(0.744186,0,0,1.046512,85.96235,-63.66546)"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:#e6e6e6;stroke:black;stroke-opacity:1"
|
||||
d="M 191.34375,274.5 L 191.34375,365.25 L 282.125,365.25 L 282.125,274.5 L 191.34375,274.5 z M 275.0749,309.35984 C 267.86477,330.84348 248.35439,342.66424 206.0749,330.20359 C 205.61133,306.92643 251.387,291.60271 275.0749,309.35984 z "
|
||||
id="rect1891"
|
||||
sodipodi:nodetypes="cccccccc"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2846"
|
||||
d="M 208.65499,317.02386 C 207.31484,313.40442 203.67788,311.27594 200.84329,308.83582 C 198.03529,306.29508 195.57929,303.41119 193.20134,300.47516 L 193.23591,300.43574 C 195.61361,303.37157 198.0694,306.25525 200.87715,308.79579 C 203.68754,311.21509 206.43445,314.34487 210.11091,315.25633 L 208.65499,317.02386 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2848"
|
||||
d="M 217.74156,309.1047 C 218.74808,306.61364 217.80264,304.27458 217.04706,301.84915 L 217.09303,301.82395 C 217.77953,304.02754 218.21553,306.35607 220.01812,307.94474 L 217.74156,309.1047 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2850"
|
||||
d="M 226.61803,305.11849 C 227.2671,301.57443 225.03202,298.26651 223.63271,295.11508 L 223.67839,295.08934 C 225.05482,298.18925 225.99635,301.92487 228.83554,303.98861 L 226.61803,305.11849 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2852"
|
||||
d="M 236.41844,302.55141 C 237.39535,300.47751 237.7123,298.20998 238.02495,295.96294 L 238.07199,295.93979 C 237.79509,297.92873 237.45968,299.69528 238.69499,301.39144 L 236.41844,302.55141 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2854"
|
||||
d="M 246.6684,301.08728 C 250.05228,298.82209 251.42765,295.22986 252.79679,291.56703 L 252.84432,291.54492 C 251.72977,294.52752 250.23711,297.30181 248.917,300.15588 L 246.6684,301.08728 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2856"
|
||||
d="M 259.59997,300.93205 C 261.87167,300.49768 263.61358,298.17884 265.12431,296.45131 L 265.17261,296.43092 C 263.04888,298.86058 260.66518,301.36013 257.5329,302.43387 L 259.59997,300.93205 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2860"
|
||||
d="M 213.54748,314.55745 C 213.30815,311.96106 211.59626,310.2931 209.96182,308.40189 C 208.17973,306.29629 206.42183,304.17167 204.73559,301.98851 L 204.78064,301.96169 C 206.46684,304.14476 208.22468,306.2693 210.00672,308.37483 C 211.6294,310.25243 213.15919,312.35157 215.61455,313.05564 L 213.54748,314.55745 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-width:1;stroke-opacity:1"
|
||||
id="path2862"
|
||||
d="M 205.74382,322.64579 C 203.74475,319.6719 199.62023,318.95632 196.42827,317.71666 C 193.48125,316.46892 194.90454,317.10272 192.15486,315.82333 L 192.18878,315.78336 C 194.93828,317.06259 193.51508,316.42887 196.46193,317.67647 C 199.97203,319.0397 203.52377,321.08473 207.38631,320.72459 L 205.74382,322.64579 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2864"
|
||||
d="M 265.17027,301.58738 C 266.53112,301.74928 267.65942,301.14043 268.90237,300.59199 C 272.4342,298.8895 275.76978,296.83201 278.87104,294.43888 L 278.91973,294.41943 C 275.79153,296.83416 272.42225,298.90407 268.8613,300.62457 C 266.96773,301.48823 265.10274,302.4983 263.10319,303.0892 L 265.17027,301.58738 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2866"
|
||||
d="M 271.72356,304.53636 C 272.89336,305.02988 274.01377,304.63887 275.21322,304.33534 C 277.06517,303.81634 278.85581,303.12205 280.6359,302.40174 L 280.5947,302.43416 C 278.81447,303.15428 277.02371,303.84839 275.1717,304.36735 C 273.34356,304.95636 271.55674,305.71166 269.65648,306.03818 L 271.72356,304.53636 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2868"
|
||||
d="M 208.2393,333.35187 C 207.21802,333.01524 206.01265,333.37338 204.94083,333.66448 C 202.59003,334.48006 203.73551,334.05542 201.5025,334.93333 L 201.54373,334.90095 C 203.77692,334.02326 202.63135,334.4478 204.98232,333.63244 C 206.69115,333.06818 208.7903,331.93698 210.51585,332.1919 L 208.2393,333.35187 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2870"
|
||||
d="M 218.04226,333.34963 C 215.75481,334.68724 213.6217,336.20665 211.59356,337.91257 C 211.12978,338.33352 210.666,338.75448 210.20223,339.17543 L 210.1537,339.19526 C 210.61745,338.77424 211.0812,338.35323 211.54495,337.93222 C 212.93912,336.75929 214.49722,335.66536 215.70707,334.3169 L 218.04226,333.34963 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2872"
|
||||
d="M 223.59291,334.61818 C 222.99621,336.16855 222.23731,337.64759 221.57717,339.17156 L 221.17115,339.35962 C 221.61443,338.10023 222.06871,336.97161 221.3754,335.74806 L 223.59291,334.61818 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2874"
|
||||
d="M 232.02305,336.06495 C 230.45046,338.20475 229.57998,340.69762 228.67431,343.16287 L 228.62679,343.18501 C 229.34511,341.22962 230.54274,339.17886 229.90542,337.07938 L 232.02305,336.06495 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2876"
|
||||
d="M 241.61947,335.55426 C 241.62264,337.0072 242.04668,338.37198 242.54276,339.72116 C 242.75361,340.2446 242.98536,340.75912 243.20666,341.2781 L 242.09565,341.88575 C 241.96759,341.31816 241.93115,340.73012 241.71147,340.18299 C 241.21299,338.87862 240.61572,337.63049 239.47031,336.77796 L 241.61947,335.55426 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2878"
|
||||
d="M 249.15073,334.61818 C 248.76941,336.44161 249.49313,338.2283 250.09454,339.93339 L 249.95981,340.00853 C 249.24733,338.37608 248.44424,336.78213 246.93322,335.74806 L 249.15073,334.61818 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2880"
|
||||
d="M 254.72903,331.86228 C 255.21643,333.46345 256.69983,334.37877 258.05241,335.23287 L 257.98352,335.27758 C 256.27507,334.36638 254.49252,333.53174 252.57391,333.18294 L 254.72903,331.86228 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2882"
|
||||
d="M 261.93689,328.64931 C 262.52533,329.86964 263.74008,330.48701 264.8938,331.11927 L 264.56301,331.33839 C 263.02627,330.74381 261.46305,330.2995 259.86167,329.92101 L 261.93689,328.64931 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2884"
|
||||
d="M 267.83561,323.99833 C 268.42756,324.50324 269.19031,324.62569 269.91855,324.85892 L 269.36082,325.25838 C 268.15487,325.32443 266.85915,325.60497 265.68048,325.319 L 267.83561,323.99833 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2886"
|
||||
d="M 272.70655,318.95359 C 273.6325,319.72751 274.74399,319.98791 275.90377,320.20925 L 275.11189,320.76091 C 273.63615,320.50264 272.13669,320.11747 270.63948,320.45541 L 272.70655,318.95359 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_open"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:#e6e6e6;stroke:black;stroke-opacity:1;display:inline"
|
||||
d="M 285.87812,274.32951 L 285.87812,365.07951 L 376.65937,365.07951 L 376.65937,274.32951 L 285.87812,274.32951 z M 369.60927,309.18935 C 362.39914,330.67299 342.88876,342.49375 300.60927,330.0331 C 311.50048,336.40452 365.53999,342.65861 369.60927,309.18935 z "
|
||||
id="path2894"
|
||||
sodipodi:nodetypes="cccccccc"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:black;stroke:black;stroke-opacity:1;display:inline"
|
||||
id="path2916"
|
||||
d="M 302.77367,333.18138 C 301.75239,332.84475 300.54702,333.20289 299.4752,333.49399 C 297.1244,334.30957 298.26988,333.88493 296.03687,334.76284 L 296.0781,334.73046 C 298.31129,333.85277 297.16572,334.27731 299.51669,333.46195 C 301.22552,332.89769 303.32467,331.76649 305.05022,332.02141 L 302.77367,333.18138 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:black;stroke:black;stroke-opacity:1;display:inline"
|
||||
id="path2918"
|
||||
d="M 312.57663,333.17914 C 310.28918,334.51675 308.15607,336.03616 306.12793,337.74208 C 305.66415,338.16303 305.20037,338.58399 304.7366,339.00494 L 304.68807,339.02477 C 305.15182,338.60375 305.61557,338.18274 306.07932,337.76173 C 307.47349,336.5888 309.03159,335.49487 310.24144,334.14641 L 312.57663,333.17914 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:black;stroke:black;stroke-opacity:1;display:inline"
|
||||
id="path2920"
|
||||
d="M 318.12728,334.44769 C 317.53058,335.99806 316.77168,337.4771 316.11154,339.00107 L 315.70552,339.18913 C 316.1488,337.92974 316.60308,336.80112 315.90977,335.57757 L 318.12728,334.44769 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:black;stroke:black;stroke-opacity:1;display:inline"
|
||||
id="path2922"
|
||||
d="M 326.55742,335.89446 C 324.98483,338.03426 324.11435,340.52713 323.20868,342.99238 L 323.16116,343.01452 C 323.87948,341.05913 325.07711,339.00837 324.43979,336.90889 L 326.55742,335.89446 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:black;stroke:black;stroke-opacity:1;display:inline"
|
||||
id="path2924"
|
||||
d="M 336.15384,335.38377 C 336.15701,336.83671 336.58105,338.20149 337.07713,339.55067 C 337.28798,340.07411 337.51973,340.58863 337.74103,341.10761 L 336.63002,341.71526 C 336.50196,341.14767 336.46552,340.55963 336.24584,340.0125 C 335.74736,338.70813 335.15009,337.46 334.00468,336.60747 L 336.15384,335.38377 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:black;stroke:black;stroke-opacity:1;display:inline"
|
||||
id="path2926"
|
||||
d="M 343.6851,334.44769 C 343.30378,336.27112 344.0275,338.05781 344.62891,339.7629 L 344.49418,339.83804 C 343.7817,338.20559 342.97861,336.61164 341.46759,335.57757 L 343.6851,334.44769 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:black;stroke:black;stroke-opacity:1;display:inline"
|
||||
id="path2928"
|
||||
d="M 349.2634,331.69179 C 349.7508,333.29296 351.2342,334.20828 352.58678,335.06238 L 352.51789,335.10709 C 350.80944,334.19589 349.02689,333.36125 347.10828,333.01245 L 349.2634,331.69179 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:black;stroke:black;stroke-opacity:1;display:inline"
|
||||
id="path2930"
|
||||
d="M 356.47126,328.47882 C 357.0597,329.69915 358.27445,330.31652 359.42817,330.94878 L 359.09738,331.1679 C 357.56064,330.57332 355.99742,330.12901 354.39604,329.75052 L 356.47126,328.47882 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:black;stroke:black;stroke-opacity:1;display:inline"
|
||||
id="path2932"
|
||||
d="M 362.36998,323.82784 C 362.96193,324.33275 363.72468,324.4552 364.45292,324.68843 L 363.89519,325.08789 C 362.68924,325.15394 361.39352,325.43448 360.21485,325.14851 L 362.36998,323.82784 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:black;stroke:black;stroke-opacity:1;display:inline"
|
||||
id="path2934"
|
||||
d="M 367.24092,318.7831 C 368.16687,319.55702 369.27836,319.81742 370.43814,320.03876 L 369.64626,320.59042 C 368.17052,320.33215 366.67106,319.94698 365.17385,320.28492 L 367.24092,318.7831 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2936"
|
||||
d="M 308.16585,331.93957 C 306.86993,333.43774 305.13885,334.68072 303.58279,335.93883 C 301.33497,337.72125 302.47954,336.83947 300.14797,338.58274 L 300.09925,338.60211 C 302.35643,336.91485 301.30704,337.76576 303.26308,336.06877 C 304.20718,335.15463 305.21798,334.25696 305.8773,333.10565 L 308.16585,331.93957 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2938"
|
||||
d="M 313.40849,333.90556 C 312.61592,335.75793 311.39957,337.39245 310.2146,339.00873 C 308.80355,340.85227 307.17236,342.49884 305.53654,344.13817 L 305.4881,344.15824 C 307.05685,342.58643 308.70513,341.0562 309.88618,339.15335 C 310.54844,337.87475 311.34432,336.52804 311.11993,335.07164 L 313.40849,333.90556 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2940"
|
||||
d="M 320.551,334.34987 C 320.22437,336.85732 318.78383,339.49761 317.87069,341.9396 C 316.21239,345.87746 313.72369,349.34159 311.15613,352.72121 L 311.10797,352.74193 C 313.67562,349.36274 316.16445,345.89907 317.82316,341.96172 C 318.58357,339.9289 319.51662,337.77035 318.47304,335.8596 L 320.551,334.34987 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2942"
|
||||
d="M 331.73417,333.95674 C 330.69351,336.62977 329.56619,339.25519 328.644,341.97444 C 327.52896,344.94786 328.09139,343.49684 326.96043,346.32893 L 326.91285,346.35094 C 328.04387,343.51899 327.4814,344.96993 328.59654,341.9967 C 329.34953,339.77678 330.18124,337.42198 329.49266,335.09884 L 331.73417,333.95674 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2944"
|
||||
d="M 339.60224,335.78928 C 340.1279,338.80553 342.36364,340.92853 344.31846,343.11205 L 344.27361,343.1392 C 342.23642,340.86365 340.29066,338.39895 337.43088,337.11989 L 339.60224,335.78928 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2948"
|
||||
d="M 347.81325,332.92256 C 348.30964,335.43094 349.95327,337.36816 351.678,339.18604 C 352.31901,339.813 352.96003,340.43997 353.60104,341.06693 L 353.55637,341.09437 C 352.91532,340.46735 352.27427,339.84033 351.63323,339.21331 C 349.78517,337.26538 347.83375,335.48106 345.5247,334.08864 L 347.81325,332.92256 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2950"
|
||||
d="M 354.30044,330.74556 C 355.13368,333.41734 357.35326,335.08006 359.44661,336.77965 C 360.07697,337.28232 360.70733,337.78498 361.33769,338.28765 L 361.29329,338.31554 C 360.66293,337.81286 360.03256,337.31018 359.40219,336.8075 C 357.19768,335.01764 354.91701,333.20619 352.22247,332.25529 L 354.30044,330.74556 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2952"
|
||||
d="M 308.56472,334.54894 C 314.11223,331.49639 305.65265,336.21181 304.68471,336.74761 C 300.46559,339.06042 296.14839,341.1848 291.78728,343.21447 L 291.82832,343.18184 C 296.18934,341.15206 300.5065,339.02764 304.72547,336.71463 C 306.73462,335.52102 308.5449,334.07924 310.64268,333.03921 L 308.56472,334.54894 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2954"
|
||||
d="M 361.18139,325.83059 C 361.57432,326.21801 362.10828,326.49589 362.56934,326.81333 C 364.46939,327.91522 366.62516,328.3265 368.76471,328.6832 C 371.57916,329.20857 368.06245,328.54974 370.72449,329.05564 L 369.58218,329.8443 C 367.10054,329.18549 370.54548,330.00856 367.7827,329.36659 C 365.59257,328.81986 363.40006,328.28465 361.21494,327.72088 C 360.54768,327.58887 359.73728,327.40043 359.10343,327.34032 L 361.18139,325.83059 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2956"
|
||||
d="M 366.75169,322.55395 C 367.98976,323.97992 369.62045,324.43328 371.39691,324.92778 L 371.35379,324.9576 C 369.15421,324.52134 366.91574,324.11867 364.67372,324.06368 L 366.75169,322.55395 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2958"
|
||||
d="M 356.31222,327.90268 C 357.60521,330.24901 359.97231,331.44872 362.29473,332.60608 C 362.93022,332.89574 363.5657,333.18539 364.20119,333.47504 L 364.15749,333.50401 C 363.52198,333.21431 362.88646,332.92461 362.25094,332.63491 C 359.65175,331.33948 357.01478,330.09614 354.22105,329.2786 L 356.31222,327.90268 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="fill:black;stroke:black;stroke-opacity:1"
|
||||
id="path2960"
|
||||
d="M 370.40269,314.81875 C 371.18526,315.44609 372.20617,315.55979 373.16706,315.75196 L 372.7258,316.06908 C 371.24975,316.14995 369.68954,316.38712 368.23133,316.14937 L 370.40269,314.81875 z "
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_eye_close.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:#e6e6e6;stroke:black;stroke-opacity:1;display:inline"
|
||||
d="M 287.51644,374.59482 L 287.51644,465.34482 L 378.29769,465.34482 L 378.29769,374.59482 L 287.51644,374.59482 z "
|
||||
id="path2980"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_edit_locked.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="font-size:36.2588501px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:url(#radialGradient3007);fill-opacity:1;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
|
||||
d="M 309.60341,424.09073 L 317.87139,424.09073 L 317.87139,419.25628 C 317.87138,410.77259 319.05252,404.65727 321.41479,400.91032 C 323.77708,397.19871 327.60558,395.34294 332.90037,395.34294 C 338.16795,395.34294 341.98288,397.19871 344.34519,400.91032 C 346.70742,404.65727 347.88856,410.77259 347.88862,419.25628 L 347.88862,424.09073 L 356.15657,424.09073 L 356.15657,417.9307 C 356.15653,407.60888 354.18798,399.81453 350.25087,394.54758 C 346.34086,389.28064 340.55737,386.64719 332.90037,386.64719 C 325.21615,386.64719 319.40549,389.28064 315.46839,394.54758 C 311.55841,399.81453 309.60341,407.60888 309.60341,417.9307 L 309.60341,424.09073"
|
||||
id="text2994"
|
||||
sodipodi:nodetypes="ccccsccccccsccc"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_edit_locked.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<rect
|
||||
style="fill:url(#linearGradient2990);fill-opacity:1;stroke:black;stroke-width:0.92751133;stroke-opacity:1"
|
||||
id="rect2982"
|
||||
width="50.860489"
|
||||
height="33.494232"
|
||||
x="307.31302"
|
||||
y="420.58893"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_edit_locked.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="opacity:1;fill:#e6e6e6;stroke:black;stroke-opacity:1;display:inline"
|
||||
d="M 191.1831,374.59482 L 191.1831,465.34482 L 281.96435,465.34482 L 281.96435,374.59482 L 191.1831,374.59482 z "
|
||||
id="path3023"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_edit_unlocked.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<path
|
||||
style="font-size:36.2588501px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:url(#radialGradient3029);fill-opacity:1;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline;font-family:Bitstream Vera Sans"
|
||||
d="M 218.58562,427.20205 L 224.60524,421.53428 L 221.29118,418.01449 C 215.47553,411.83782 212.14337,406.5758 211.29469,402.22842 C 210.47024,397.90676 211.98549,393.93117 215.84043,390.30154 C 219.67557,386.69057 223.72523,385.42652 227.98949,386.50942 C 232.27791,387.61811 237.32996,391.26077 243.14565,397.4374 L 246.45971,400.95719 L 252.47931,395.28944 L 248.25655,390.80454 C 241.18082,383.28962 234.40449,378.96429 227.92748,377.82854 C 221.47021,376.67422 215.4542,378.72153 209.87942,383.97048 C 204.28481,389.23808 201.85953,395.13866 202.60361,401.67225 C 203.36743,408.18725 207.28717,415.20221 214.36287,422.71715 L 218.58562,427.20205"
|
||||
id="path3025"
|
||||
sodipodi:nodetypes="ccccsccccccsccc"
|
||||
inkscape:transform-center-x="-8.2955127"
|
||||
inkscape:transform-center-y="-19.720621"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_edit_unlocked.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
<rect
|
||||
style="opacity:1;fill:url(#linearGradient3031);fill-opacity:1;stroke:black;stroke-width:0.92751133;stroke-opacity:1;display:inline"
|
||||
id="rect3027"
|
||||
width="50.860489"
|
||||
height="33.494232"
|
||||
x="210.97969"
|
||||
y="420.58893"
|
||||
inkscape:export-filename="/Users/cignoni/Documents/devel/meshlab/src/meshlab/images/layer_edit_unlocked.png"
|
||||
inkscape:export-xdpi="31.379999"
|
||||
inkscape:export-ydpi="31.379999" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 55 KiB |
@ -1,148 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="744.09448819"
|
||||
height="1052.3622047"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.44.1"
|
||||
sodipodi:docbase="/Users/cignoni/devel/meshlab/src/meshlab/images"
|
||||
sodipodi:docname="meshlab_obj.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
id="linearGradient2925">
|
||||
<stop
|
||||
style="stop-color:white;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2927" />
|
||||
<stop
|
||||
style="stop-color:#c9c9c9;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2929" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2925"
|
||||
id="linearGradient2931"
|
||||
x1="382.35712"
|
||||
y1="530.93359"
|
||||
x2="457.64282"
|
||||
y2="409.00504"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2925"
|
||||
id="linearGradient2952"
|
||||
x1="436.44101"
|
||||
y1="428.99527"
|
||||
x2="439.56409"
|
||||
y2="424.93524"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2925"
|
||||
id="linearGradient3334"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="382.35712"
|
||||
y1="530.93359"
|
||||
x2="457.64282"
|
||||
y2="409.00504" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2925"
|
||||
id="linearGradient3336"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="436.44101"
|
||||
y1="428.99527"
|
||||
x2="439.56409"
|
||||
y2="424.93524" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
gridtolerance="10000"
|
||||
guidetolerance="10"
|
||||
objecttolerance="10"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.52548449"
|
||||
inkscape:cx="372.04724"
|
||||
inkscape:cy="526.18109"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:window-width="862"
|
||||
inkscape:window-height="751"
|
||||
inkscape:window-x="454"
|
||||
inkscape:window-y="50" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<g
|
||||
id="g3330"
|
||||
transform="matrix(1.327159,0,0,1.242616,-143.7218,-125.8299)"
|
||||
inkscape:export-filename="/Users/cignoni/devel/meshlab/src/meshlab/images/eyedoc_256.png"
|
||||
inkscape:export-xdpi="126.72"
|
||||
inkscape:export-ydpi="126.72">
|
||||
<path
|
||||
inkscape:export-ydpi="126.72"
|
||||
inkscape:export-xdpi="126.72"
|
||||
inkscape:export-filename="/Users/cignoni/devel/meshlab/src/meshlab/images/eyedoc_256.png"
|
||||
sodipodi:nodetypes="cccccc"
|
||||
id="rect2038"
|
||||
d="M 351.42856,409.50504 L 422.24377,409.50504 L 457.14283,440.20974 L 457.14283,549.50504 L 351.42856,549.50504 L 351.42856,409.50504 z "
|
||||
style="fill:url(#linearGradient3334);fill-opacity:1;stroke:black;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:79.84031677;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:export-ydpi="126.72"
|
||||
inkscape:export-xdpi="126.72"
|
||||
inkscape:export-filename="/Users/cignoni/devel/meshlab/src/meshlab/images/eyedoc_256.png"
|
||||
sodipodi:nodetypes="cccc"
|
||||
id="path2934"
|
||||
d="M 422.18729,409.55866 C 425.02961,419.4444 428.19433,429.33013 428.68052,439.21586 C 441.30286,437.03973 448.85669,438.79963 456.94088,440.31184 L 422.18729,409.55866 z "
|
||||
style="fill:url(#linearGradient3336);fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
|
||||
</g>
|
||||
<rect
|
||||
style="fill:none;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:79.84031677;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect2936"
|
||||
width="181.81726"
|
||||
height="181.81726"
|
||||
x="290.13501"
|
||||
y="376.41788"
|
||||
inkscape:export-filename="/Users/cignoni/devel/meshlab/src/meshlab/images/eyedoc_256.png"
|
||||
inkscape:export-xdpi="126.72"
|
||||
inkscape:export-ydpi="126.72" />
|
||||
<image
|
||||
y="386.8873"
|
||||
x="292.1749"
|
||||
id="image3327"
|
||||
height="138.93758"
|
||||
width="138.93758"
|
||||
sodipodi:absref="/Users/cignoni/devel/meshlab/src/meshlab/images/eye_cropped.png"
|
||||
xlink:href="eye_cropped.png"
|
||||
inkscape:export-filename="/Users/cignoni/devel/meshlab/src/meshlab/images/eyedoc_256.png"
|
||||
inkscape:export-xdpi="126.72"
|
||||
inkscape:export-ydpi="126.72" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
@ -1,109 +0,0 @@
|
||||
/****************************************************************************
|
||||
* MeshLab o o *
|
||||
* A versatile mesh processing toolbox o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2005 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
History
|
||||
$Log$
|
||||
Revision 1.8 2008/03/08 17:22:57 cignoni
|
||||
added plugins path settings for macs
|
||||
|
||||
Revision 1.7 2008/02/24 18:08:50 cignoni
|
||||
added -h and --help standard options
|
||||
|
||||
Revision 1.6 2007/03/27 12:20:09 cignoni
|
||||
Revamped logging iterface, changed function names in automatic parameters, better selection handling
|
||||
|
||||
Revision 1.5 2006/11/08 01:04:48 cignoni
|
||||
First version with http communications
|
||||
|
||||
Revision 1.4 2006/02/01 12:45:29 glvertex
|
||||
- Solved openig bug when running by command line
|
||||
|
||||
Revision 1.3 2005/12/01 02:24:50 davide_portelli
|
||||
Mainwindow Splitted----->[ mainwindow_Init.cpp ]&&[ mainwindow_RunTime.cpp ]
|
||||
|
||||
Revision 1.2 2005/11/21 12:12:54 cignoni
|
||||
Added copyright info
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include <QApplication>
|
||||
#include <QMessageBox>
|
||||
#include "mainwindow.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
QDir dir(QApplication::applicationDirPath());
|
||||
dir.cdUp();
|
||||
dir.cd("plugins");
|
||||
QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
|
||||
#endif
|
||||
QCoreApplication::setOrganizationName("VCG");
|
||||
QCoreApplication::setApplicationName("MeshLab");
|
||||
|
||||
if(argc>1)
|
||||
{
|
||||
QString helpOpt1="-h";
|
||||
QString helpOpt2="--help";
|
||||
if( (helpOpt1==argv[1]) || (helpOpt2==argv[1]) )
|
||||
{
|
||||
printf("\n\n"
|
||||
" MeshLab: an open source mesh processing system\n"
|
||||
" Paolo Cignoni (and many many others) \n"
|
||||
" Visual Computing Lab\n"
|
||||
" ISTI - CNR \n\n"
|
||||
"usage:\n\n"
|
||||
" meshlab [meshfile] \n\n"
|
||||
"Look at --- http://meshlab.sourceforge.net/wiki --- for a longer documentation\n\n"
|
||||
);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow window;
|
||||
window.showMaximized();
|
||||
|
||||
// This filter is installed to intercept the open events sent directly by the Operative System.
|
||||
FileOpenEater *filterObj=new FileOpenEater();
|
||||
filterObj->mainWindow=&window;
|
||||
app.installEventFilter(filterObj);
|
||||
app.processEvents();
|
||||
if(argc>1)
|
||||
{
|
||||
QString helpOpt1="-h";
|
||||
QString helpOpt2="--help";
|
||||
if( (helpOpt1==argv[1]) || (helpOpt2==argv[1]) )
|
||||
printf(
|
||||
"usage:\n"
|
||||
"meshlab <meshfile>\n"
|
||||
"Look at http://meshlab.sourceforge.net/wiki\n"
|
||||
"for a longer documentation\n"
|
||||
);
|
||||
window.open(argv[1]);
|
||||
}
|
||||
else if(filterObj->noEvent) window.open();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
@ -1,345 +0,0 @@
|
||||
/****************************************************************************
|
||||
* MeshLab o o *
|
||||
* A versatile mesh processing toolbox o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2005 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
//None of this should happen if we are compiling c, not c++
|
||||
#ifdef __cplusplus
|
||||
#include <GL/glew.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QMainWindow>
|
||||
#include <QMdiArea>
|
||||
#include <QStringList>
|
||||
#include <QColorDialog>
|
||||
#include "../common/pluginmanager.h"
|
||||
#include "glarea.h"
|
||||
#include "stdpardialog.h"
|
||||
|
||||
#define MAXRECENTFILES 4
|
||||
|
||||
class QAction;
|
||||
class QActionGroup;
|
||||
class QMenu;
|
||||
class QScrollArea;
|
||||
class QSignalMapper;
|
||||
class QProgressDialog;
|
||||
class QHttp;
|
||||
|
||||
|
||||
class MainWindow : public QMainWindow, MainWindowInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
// callback function to execute a filter
|
||||
//void executeFilter(QAction *action, RichParameterSet &srcpar, bool isPreview);
|
||||
|
||||
MainWindow();
|
||||
static bool QCallBack(const int pos, const char * str);
|
||||
const QString appName() const {return tr("MeshLab v")+appVer(); }
|
||||
const QString appVer() const {return tr("1.2.3b"); }
|
||||
|
||||
signals:
|
||||
void dispatchCustomSettings(RichParameterSet& rps);
|
||||
|
||||
public slots:
|
||||
|
||||
bool open(QString fileName=QString(), GLArea *gla=0);
|
||||
bool openIn(QString fileName=QString());
|
||||
bool openProject(QString fileName=QString());
|
||||
void saveProject();
|
||||
void delCurrentMesh();
|
||||
void updateGL();
|
||||
void endEdit();
|
||||
void updateCustomSettings();
|
||||
|
||||
private slots:
|
||||
|
||||
//////////// Slot Menu File //////////////////////
|
||||
void reload();
|
||||
void openRecentFile();
|
||||
bool saveAs(QString fileName = QString());
|
||||
bool save();
|
||||
//bool saveSnapshot();
|
||||
/////////////Slot Menu Edit ////////////////////////
|
||||
//void applyEditMode();
|
||||
//void suspendEditMode();
|
||||
///////////Slot Menu Filter ////////////////////////
|
||||
//void startFilter();
|
||||
//void applyLastFilter();
|
||||
//void runFilterScript();
|
||||
//void showFilterScript();
|
||||
/////////// Slot Menu Render /////////////////////
|
||||
void renderBbox();
|
||||
void renderPoint();
|
||||
void renderWire();
|
||||
void renderFlat();
|
||||
void renderFlatLine();
|
||||
void renderHiddenLines();
|
||||
void renderSmooth();
|
||||
void renderTexture();
|
||||
void setLight();
|
||||
void setDoubleLighting();
|
||||
void setFancyLighting();
|
||||
void setColorMode(QAction *qa);
|
||||
void applyRenderMode();
|
||||
//void applyColorMode();
|
||||
void toggleBackFaceCulling();
|
||||
void toggleSelectFaceRendering();
|
||||
void toggleSelectVertRendering();
|
||||
//void applyDecorateMode();
|
||||
///////////Slot Menu View ////////////////////////
|
||||
void fullScreen();
|
||||
void showToolbarFile();
|
||||
void showToolbarRender();
|
||||
void showInfoPane();
|
||||
void showTrackBall();
|
||||
void resetTrackBall();
|
||||
//void showLayerDlg();
|
||||
///////////Slot Menu Windows /////////////////////
|
||||
void updateWindowMenu();
|
||||
void updateMenus();
|
||||
void updateStdDialog();
|
||||
|
||||
///////////Slot Menu Preferences /////////////////
|
||||
//void setCustomize();
|
||||
///////////Slot Menu Help ////////////////////////
|
||||
/*void about();
|
||||
void aboutPlugins();*/
|
||||
void helpOnline();
|
||||
void helpOnscreen();
|
||||
void submitBug();
|
||||
void checkForUpdates(bool verboseFlag=true);
|
||||
|
||||
///////////Slot General Purpose ////////////////////////
|
||||
|
||||
void dropEvent ( QDropEvent * event );
|
||||
void dragEnterEvent(QDragEnterEvent *);
|
||||
void connectionDone(bool status);
|
||||
|
||||
///////////Solt Wrapper for QMdiArea //////////////////
|
||||
void wrapSetActiveSubWindow(QWidget* window);
|
||||
private:
|
||||
void createStdPluginWnd(); // this one is
|
||||
void initGlobalParameters();
|
||||
void createActions();
|
||||
void createMenus();
|
||||
/*void fillFilterMenu();
|
||||
void fillDecorateMenu();*/
|
||||
void fillRenderMenu();
|
||||
//void fillEditMenu();
|
||||
void createToolBars();
|
||||
void loadMeshLabSettings();
|
||||
void loadPlugins();
|
||||
void keyPressEvent(QKeyEvent *);
|
||||
void updateRecentFileActions();
|
||||
void setCurrentFile(const QString &fileName);
|
||||
void addToMenu(QList<QAction *>, QMenu *menu, const char *slot);
|
||||
|
||||
|
||||
QHttp *httpReq;
|
||||
QBuffer myLocalBuf;
|
||||
int idHost;
|
||||
int idGet;
|
||||
bool VerboseCheckingFlag;
|
||||
|
||||
MeshlabStdDialog *stddialog;
|
||||
static QProgressBar *qb;
|
||||
QMdiArea *mdiarea;
|
||||
QSignalMapper *windowMapper;
|
||||
QDir pluginsDir;
|
||||
QStringList pluginFileNames;
|
||||
|
||||
PluginManager PM;
|
||||
|
||||
/*
|
||||
Note this part should be detached from MainWindow just like the loading plugin part.
|
||||
|
||||
For each running instance of meshlab, for the global params we have default (hardwired) values and current(saved,modified) values.
|
||||
At the start up the initGlobalParameterSet function (of decorations and of glarea and of ... ) is called with the empty RichParameterSet defaultGlobalParams (to collect the default values)
|
||||
At the start up the currentGlobalParams is filled with the values saved in the registry.
|
||||
*/
|
||||
|
||||
RichParameterSet currentGlobalParams;
|
||||
RichParameterSet defaultGlobalParams;
|
||||
|
||||
QByteArray toolbarState; //stato delle toolbar e dockwidgets
|
||||
|
||||
QDir lastUsedDirectory; //This will hold the last directory that was used to load/save a file/project in
|
||||
|
||||
public:
|
||||
GLArea *GLA() const {
|
||||
if(mdiarea->currentSubWindow()==0) return 0;
|
||||
GLArea *glw = qobject_cast<GLArea *>(mdiarea->currentSubWindow());
|
||||
if(glw) return glw;
|
||||
glw = qobject_cast<GLArea *>(mdiarea->currentSubWindow()->widget());
|
||||
assert(glw);
|
||||
return glw;
|
||||
}
|
||||
|
||||
const PluginManager& pluginManager() const { return PM; }
|
||||
|
||||
//QMap<QString, QAction *> filterMap; // a map to retrieve an action from a name. Used for playing filter scripts.
|
||||
static QStatusBar *&globalStatusBar()
|
||||
{
|
||||
static QStatusBar *_qsb=0;
|
||||
return _qsb;
|
||||
}
|
||||
//QMenu* layerMenu() { return filterMenuLayer; }
|
||||
|
||||
private:
|
||||
//////// ToolBars ///////////////
|
||||
QToolBar *mainToolBar;
|
||||
QToolBar *renderToolBar;
|
||||
/*QToolBar *editToolBar;
|
||||
QToolBar *filterToolBar;*/
|
||||
|
||||
///////// Menus ///////////////
|
||||
QMenu *fileMenu;
|
||||
QMenu *fileMenuNew;
|
||||
/*QMenu *filterMenu;
|
||||
QMenu *filterMenuSelect;
|
||||
QMenu *filterMenuClean;
|
||||
QMenu *filterMenuRemeshing;
|
||||
QMenu *filterMenuColorize;
|
||||
QMenu *filterMenuSmoothing;
|
||||
QMenu *filterMenuQuality;
|
||||
QMenu *filterMenuNormal;
|
||||
QMenu *filterMenuLayer;
|
||||
QMenu *filterMenuRangeMap;
|
||||
QMenu *filterMenuPointSet;
|
||||
QMenu *filterMenuSampling;
|
||||
QMenu *filterMenuTexture;
|
||||
|
||||
QMenu *editMenu;*/
|
||||
|
||||
//Render Menu and SubMenu ////
|
||||
QMenu *shadersMenu;
|
||||
QMenu *renderMenu;
|
||||
QMenu *renderModeMenu;
|
||||
QMenu *lightingModeMenu;
|
||||
QMenu *colorModeMenu;
|
||||
|
||||
//View Menu and SubMenu //////
|
||||
QMenu *viewMenu;
|
||||
QMenu *trackBallMenu;
|
||||
QMenu *logMenu;
|
||||
QMenu *toolBarMenu;
|
||||
//////////////////////////////
|
||||
QMenu *windowsMenu;
|
||||
QMenu *preferencesMenu;
|
||||
QMenu *helpMenu;
|
||||
|
||||
|
||||
//////////// Actions Menu File ///////////////////////
|
||||
QAction *openAct;
|
||||
QAction *openInAct,*openProjectAct;
|
||||
QAction *closeAct;
|
||||
QAction *reloadAct;
|
||||
QAction *saveAct,*saveAsAct,*saveProjectAct;
|
||||
QAction *saveSnapshotAct;
|
||||
QAction *lastFilterAct;
|
||||
QAction *runFilterScriptAct;
|
||||
QAction *showFilterScriptAct;
|
||||
QAction *recentFileActs[MAXRECENTFILES];
|
||||
QAction *separatorAct;
|
||||
QAction *exitAct;
|
||||
/////////// Actions Menu Edit /////////////////////
|
||||
QAction *suspendEditModeAct;
|
||||
/////////// Actions Menu Render /////////////////////
|
||||
QActionGroup *renderModeGroupAct;
|
||||
QAction *renderBboxAct;
|
||||
QAction *renderModePointsAct;
|
||||
QAction *renderModeWireAct;
|
||||
QAction *renderModeHiddenLinesAct;
|
||||
QAction *renderModeFlatLinesAct;
|
||||
QAction *renderModeFlatAct;
|
||||
QAction *renderModeSmoothAct;
|
||||
QAction *renderModeTextureAct;
|
||||
QAction *setDoubleLightingAct;
|
||||
QAction *setFancyLightingAct;
|
||||
QAction *setLightAct;
|
||||
QAction *backFaceCullAct;
|
||||
QAction *setSelectFaceRenderingAct;
|
||||
QAction *setSelectVertRenderingAct;
|
||||
|
||||
QActionGroup *colorModeGroupAct;
|
||||
QAction *colorModeNoneAct;
|
||||
QAction *colorModePerMeshAct;
|
||||
QAction *colorModePerVertexAct;
|
||||
QAction *colorModePerFaceAct;
|
||||
///////////Actions Menu View ////////////////////////
|
||||
QAction *fullScreenAct;
|
||||
QAction *showToolbarStandardAct;
|
||||
QAction *showToolbarRenderAct;
|
||||
QAction *showInfoPaneAct;
|
||||
QAction *showTrackBallAct;
|
||||
QAction *resetTrackBallAct;
|
||||
QAction *showLayerDlgAct;
|
||||
///////////Actions Menu Windows /////////////////////
|
||||
QAction *windowsTileAct;
|
||||
QAction *windowsCascadeAct;
|
||||
QAction *windowsNextAct;
|
||||
QAction *closeAllAct;
|
||||
///////////Actions Menu Preferences /////////////////
|
||||
QAction *setCustomizeAct;
|
||||
///////////Actions Menu Help ////////////////////////
|
||||
QAction *aboutAct;
|
||||
QAction *aboutPluginsAct;
|
||||
QAction *submitBugAct;
|
||||
QAction *onlineHelpAct;
|
||||
QAction *onscreenHelpAct;
|
||||
QAction *checkUpdatesAct;
|
||||
////////////////////////////////////////////////////
|
||||
};
|
||||
|
||||
class FileOpenEater : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FileOpenEater() {noEvent=true;}
|
||||
MainWindow *mainWindow;
|
||||
bool noEvent;
|
||||
|
||||
protected:
|
||||
|
||||
bool eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::FileOpen) {
|
||||
noEvent=false;
|
||||
QFileOpenEvent *fileEvent = static_cast<QFileOpenEvent*>(event);
|
||||
mainWindow->open(fileEvent->file());
|
||||
// QMessageBox::information(0,"Meshlab",fileEvent->file());
|
||||
return true;
|
||||
} else {
|
||||
// standard event processing
|
||||
return QObject::eventFilter(obj, event);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -1,882 +0,0 @@
|
||||
/****************************************************************************
|
||||
* MeshLab o o *
|
||||
* An extendible mesh processor o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2005, 2006 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include "../common/interfaces.h"
|
||||
|
||||
#include <QtGui>
|
||||
#include <QToolBar>
|
||||
#include <QProgressBar>
|
||||
#include <QHttp>
|
||||
#include <QFileOpenEvent>
|
||||
#include <QFile>
|
||||
#include <QtXml>
|
||||
#include "mainwindow.h"
|
||||
#include "glarea.h"
|
||||
//#include "plugindialog.h"
|
||||
//#include "customDialog.h"
|
||||
//#include "saveSnapshotDialog.h"
|
||||
//#include "ui_congratsDialog.h"
|
||||
|
||||
QProgressBar *MainWindow::qb;
|
||||
|
||||
MainWindow::MainWindow()
|
||||
{
|
||||
//workspace = new QWorkspace(this);
|
||||
mdiarea = new QMdiArea(this);
|
||||
//setCentralWidget(workspace);
|
||||
setCentralWidget(mdiarea);
|
||||
windowMapper = new QSignalMapper(this);
|
||||
// Permette di passare da una finestra all'altra e tenere aggiornato il workspace
|
||||
connect(windowMapper, SIGNAL(mapped(QWidget*)),this, SLOT(wrapSetActiveSubWindow(QWidget *)));
|
||||
// Quando si passa da una finestra all'altra aggiorna lo stato delle toolbar e dei menu
|
||||
connect(mdiarea, SIGNAL(subWindowActivated(QMdiSubWindow *)),this, SLOT(updateMenus()));
|
||||
connect(mdiarea, SIGNAL(subWindowActivated(QMdiSubWindow *)),this, SLOT(updateWindowMenu()));
|
||||
connect(mdiarea, SIGNAL(subWindowActivated(QMdiSubWindow *)),this, SLOT(updateStdDialog()));
|
||||
|
||||
httpReq=new QHttp(this);
|
||||
//connect(httpReq, SIGNAL(requestFinished(int,bool)), this, SLOT(connectionFinished(int,bool)));
|
||||
connect(httpReq, SIGNAL(done(bool)), this, SLOT(connectionDone(bool)));
|
||||
|
||||
QIcon icon;
|
||||
icon.addPixmap(QPixmap(":images/eye48.png"));
|
||||
setWindowIcon(icon);
|
||||
|
||||
PM.loadPlugins(defaultGlobalParams);
|
||||
// Now load from the registry the settings and merge the hardwired values got from the PM.loadPlugins with the ones found in the registry.
|
||||
loadMeshLabSettings();
|
||||
createActions();
|
||||
createToolBars();
|
||||
createMenus();
|
||||
stddialog = 0;
|
||||
setAcceptDrops(true);
|
||||
mdiarea->setAcceptDrops(true);
|
||||
setWindowTitle(appName());
|
||||
setStatusBar(new QStatusBar(this));
|
||||
globalStatusBar()=statusBar();
|
||||
qb=new QProgressBar(this);
|
||||
qb->setMaximum(100);
|
||||
qb->setMinimum(0);
|
||||
//qb->reset();
|
||||
statusBar()->addPermanentWidget(qb,0);
|
||||
updateMenus();
|
||||
|
||||
//qb->setAutoClose(true);
|
||||
//qb->setMinimumDuration(0);
|
||||
//qb->reset();
|
||||
}
|
||||
|
||||
void MainWindow::createActions()
|
||||
{
|
||||
//////////////Action Menu File ////////////////////////////////////////////////////////////////////////////
|
||||
openAct = new QAction(QIcon(":/images/open.png"),tr("&Open..."), this);
|
||||
openAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
openAct->setShortcut(Qt::CTRL+Qt::Key_O);
|
||||
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
|
||||
|
||||
openInAct = new QAction(QIcon(":/images/open.png"),tr("&Open as new layer..."), this);
|
||||
connect(openInAct, SIGNAL(triggered()), this, SLOT(openIn()));
|
||||
|
||||
openProjectAct = new QAction(QIcon(":/images/openPrj.png"),tr("&Open project..."), this);
|
||||
connect(openProjectAct, SIGNAL(triggered()), this, SLOT(openProject()));
|
||||
|
||||
closeAct = new QAction(tr("&Close"), this);
|
||||
closeAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
//closeAct->setShortcut(Qt::CTRL+Qt::Key_C);
|
||||
connect(closeAct, SIGNAL(triggered()),mdiarea, SLOT(closeActiveSubWindow()));
|
||||
|
||||
reloadAct = new QAction(QIcon(":/images/reload.png"),tr("&Reload"), this);
|
||||
reloadAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
reloadAct->setShortcut(Qt::CTRL+Qt::Key_R);
|
||||
connect(reloadAct, SIGNAL(triggered()), this, SLOT(reload()));
|
||||
|
||||
saveAct = new QAction(QIcon(":/images/save.png"),tr("&Save"), this);
|
||||
saveAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
saveAct->setShortcut(Qt::CTRL+Qt::Key_S);
|
||||
connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
|
||||
|
||||
|
||||
saveAsAct = new QAction(QIcon(":/images/save.png"),tr("Save As..."), this);
|
||||
saveAsAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
//saveAsAct->setShortcut(Qt::CTRL+Qt::Key_S);
|
||||
connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
|
||||
|
||||
saveProjectAct = new QAction(QIcon(":/images/savePrj.png"),tr("&Save Project..."), this);
|
||||
connect(saveProjectAct, SIGNAL(triggered()), this, SLOT(saveProject()));
|
||||
|
||||
saveSnapshotAct = new QAction(QIcon(":/images/snapshot.png"),tr("Save snapsho&t"), this);
|
||||
connect(saveSnapshotAct, SIGNAL(triggered()), this, SLOT(saveSnapshot()));
|
||||
|
||||
for (int i = 0; i < MAXRECENTFILES; ++i) {
|
||||
recentFileActs[i] = new QAction(this);
|
||||
recentFileActs[i]->setVisible(false);
|
||||
connect(recentFileActs[i], SIGNAL(triggered()),this, SLOT(openRecentFile()));
|
||||
}
|
||||
|
||||
exitAct = new QAction(tr("E&xit"), this);
|
||||
exitAct->setShortcut(Qt::CTRL+Qt::Key_Q);
|
||||
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
|
||||
|
||||
//////////////Render Actions for Toolbar and Menu /////////////////////////////////////////////////////////
|
||||
renderModeGroupAct = new QActionGroup(this);
|
||||
|
||||
renderBboxAct = new QAction(QIcon(":/images/bbox.png"),tr("&Bounding box"), renderModeGroupAct);
|
||||
renderBboxAct->setCheckable(true);
|
||||
connect(renderBboxAct, SIGNAL(triggered()), this, SLOT(renderBbox()));
|
||||
|
||||
|
||||
renderModePointsAct = new QAction(QIcon(":/images/points.png"),tr("&Points"), renderModeGroupAct);
|
||||
renderModePointsAct->setCheckable(true);
|
||||
connect(renderModePointsAct, SIGNAL(triggered()), this, SLOT(renderPoint()));
|
||||
|
||||
renderModeWireAct = new QAction(QIcon(":/images/wire.png"),tr("&Wireframe"), renderModeGroupAct);
|
||||
renderModeWireAct->setCheckable(true);
|
||||
connect(renderModeWireAct, SIGNAL(triggered()), this, SLOT(renderWire()));
|
||||
|
||||
renderModeHiddenLinesAct = new QAction(QIcon(":/images/backlines.png"),tr("&Hidden Lines"),renderModeGroupAct);
|
||||
renderModeHiddenLinesAct->setCheckable(true);
|
||||
connect(renderModeHiddenLinesAct, SIGNAL(triggered()), this, SLOT(renderHiddenLines()));
|
||||
|
||||
renderModeFlatLinesAct = new QAction(QIcon(":/images/flatlines.png"),tr("Flat &Lines"), renderModeGroupAct);
|
||||
renderModeFlatLinesAct->setCheckable(true);
|
||||
connect(renderModeFlatLinesAct, SIGNAL(triggered()), this, SLOT(renderFlatLine()));
|
||||
|
||||
renderModeFlatAct = new QAction(QIcon(":/images/flat.png"),tr("&Flat"), renderModeGroupAct);
|
||||
renderModeFlatAct->setCheckable(true);
|
||||
connect(renderModeFlatAct, SIGNAL(triggered()), this, SLOT(renderFlat()));
|
||||
|
||||
renderModeSmoothAct = new QAction(QIcon(":/images/smooth.png"),tr("&Smooth"), renderModeGroupAct);
|
||||
renderModeSmoothAct->setCheckable(true);
|
||||
connect(renderModeSmoothAct, SIGNAL(triggered()), this, SLOT(renderSmooth()));
|
||||
|
||||
renderModeTextureAct = new QAction(QIcon(":/images/textures.png"),tr("&Texture"),this);
|
||||
renderModeTextureAct->setCheckable(true);
|
||||
connect(renderModeTextureAct, SIGNAL(triggered()), this, SLOT(renderTexture()));
|
||||
|
||||
setLightAct = new QAction(QIcon(":/images/lighton.png"),tr("&Light on/off"),this);
|
||||
setLightAct->setCheckable(true);
|
||||
connect(setLightAct, SIGNAL(triggered()), this, SLOT(setLight()));
|
||||
|
||||
setDoubleLightingAct= new QAction(tr("&Double side lighting"),this);
|
||||
setDoubleLightingAct->setCheckable(true);
|
||||
setDoubleLightingAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
setDoubleLightingAct->setShortcut(Qt::CTRL+Qt::Key_D);
|
||||
connect(setDoubleLightingAct, SIGNAL(triggered()), this, SLOT(setDoubleLighting()));
|
||||
|
||||
setFancyLightingAct = new QAction(tr("&Fancy Lighting"),this);
|
||||
setFancyLightingAct->setCheckable(true);
|
||||
setFancyLightingAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
setFancyLightingAct->setShortcut(Qt::CTRL+Qt::Key_F);
|
||||
connect(setFancyLightingAct, SIGNAL(triggered()), this, SLOT(setFancyLighting()));
|
||||
|
||||
backFaceCullAct = new QAction(tr("BackFace &Culling"),this);
|
||||
backFaceCullAct->setCheckable(true);
|
||||
backFaceCullAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
backFaceCullAct->setShortcut(Qt::CTRL+Qt::Key_K);
|
||||
connect(backFaceCullAct, SIGNAL(triggered()), this, SLOT(toggleBackFaceCulling()));
|
||||
|
||||
setSelectFaceRenderingAct = new QAction(QIcon(":/images/selected_face.png"),tr("Selected Face Rendering"),this);
|
||||
setSelectFaceRenderingAct->setCheckable(true);
|
||||
setSelectFaceRenderingAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
connect(setSelectFaceRenderingAct, SIGNAL(triggered()), this, SLOT(toggleSelectFaceRendering()));
|
||||
|
||||
setSelectVertRenderingAct = new QAction(QIcon(":/images/selected_vert.png"),tr("Selected Vertex Rendering"),this);
|
||||
setSelectVertRenderingAct->setCheckable(true);
|
||||
setSelectVertRenderingAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
connect(setSelectVertRenderingAct, SIGNAL(triggered()), this, SLOT(toggleSelectVertRendering()));
|
||||
|
||||
//////////////Action Menu View ////////////////////////////////////////////////////////////////////////////
|
||||
fullScreenAct = new QAction (tr("&FullScreen"), this);
|
||||
fullScreenAct->setCheckable(true);
|
||||
fullScreenAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
fullScreenAct->setShortcut(Qt::ALT+Qt::Key_Return);
|
||||
connect(fullScreenAct, SIGNAL(triggered()), this, SLOT(fullScreen()));
|
||||
|
||||
showToolbarStandardAct = new QAction (tr("&Standard"), this);
|
||||
showToolbarStandardAct->setCheckable(true);
|
||||
showToolbarStandardAct->setChecked(true);
|
||||
connect(showToolbarStandardAct, SIGNAL(triggered()), this, SLOT(showToolbarFile()));
|
||||
|
||||
showToolbarRenderAct = new QAction (tr("&Render"), this);
|
||||
showToolbarRenderAct->setCheckable(true);
|
||||
showToolbarRenderAct->setChecked(true);
|
||||
connect(showToolbarRenderAct, SIGNAL(triggered()), this, SLOT(showToolbarRender()));
|
||||
|
||||
showInfoPaneAct= new QAction (tr("Show Info &Pane"), this);
|
||||
showInfoPaneAct->setCheckable(true);
|
||||
connect(showInfoPaneAct, SIGNAL(triggered()), this, SLOT(showInfoPane()));
|
||||
|
||||
|
||||
showTrackBallAct = new QAction (tr("Show &Trackball"), this);
|
||||
showTrackBallAct->setCheckable(true);
|
||||
connect(showTrackBallAct, SIGNAL(triggered()), this, SLOT(showTrackBall()));
|
||||
|
||||
resetTrackBallAct = new QAction (tr("Reset &Trackball"), this);
|
||||
resetTrackBallAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
resetTrackBallAct->setShortcut(Qt::CTRL+Qt::Key_H);
|
||||
connect(resetTrackBallAct, SIGNAL(triggered()), this, SLOT(resetTrackBall()));
|
||||
|
||||
/*showLayerDlgAct = new QAction (QIcon(":/images/layers.png"),tr("Show Layer Dialog"), this);
|
||||
showLayerDlgAct->setCheckable(true);
|
||||
showLayerDlgAct->setChecked(true);
|
||||
connect(showLayerDlgAct, SIGNAL(triggered()), this, SLOT(showLayerDlg()));*/
|
||||
|
||||
|
||||
//////////////Action Menu EDIT /////////////////////////////////////////////////////////////////////////
|
||||
suspendEditModeAct = new QAction (QIcon(":/images/no_edit.png"),tr("Not editing"), this);
|
||||
suspendEditModeAct->setShortcut(Qt::Key_Escape);
|
||||
suspendEditModeAct->setCheckable(true);
|
||||
suspendEditModeAct->setChecked(true);
|
||||
connect(suspendEditModeAct, SIGNAL(triggered()), this, SLOT(suspendEditMode()));
|
||||
|
||||
//////////////Action Menu WINDOWS /////////////////////////////////////////////////////////////////////////
|
||||
windowsTileAct = new QAction(tr("&Tile"), this);
|
||||
connect(windowsTileAct, SIGNAL(triggered()), mdiarea, SLOT(tileSubWindows()));
|
||||
|
||||
windowsCascadeAct = new QAction(tr("&Cascade"), this);
|
||||
connect(windowsCascadeAct, SIGNAL(triggered()), mdiarea, SLOT(cascadeSubWindows()));
|
||||
|
||||
windowsNextAct = new QAction(tr("&Next"), this);
|
||||
connect(windowsNextAct, SIGNAL(triggered()), mdiarea, SLOT(activateNextSubWindow()));
|
||||
|
||||
closeAllAct = new QAction(tr("Close &All Windows"), this);
|
||||
connect(closeAllAct, SIGNAL(triggered()),mdiarea, SLOT(closeAllSubWindows()));
|
||||
|
||||
//////////////Action Menu Filters /////////////////////////////////////////////////////////////////////
|
||||
lastFilterAct = new QAction(tr("Apply filter"),this);
|
||||
lastFilterAct->setShortcutContext(Qt::ApplicationShortcut);
|
||||
lastFilterAct->setShortcut(Qt::CTRL+Qt::Key_L);
|
||||
lastFilterAct->setEnabled(false);
|
||||
connect(lastFilterAct, SIGNAL(triggered()), this, SLOT(applyLastFilter()));
|
||||
|
||||
showFilterScriptAct = new QAction(tr("Show current filter script"),this);
|
||||
showFilterScriptAct->setEnabled(true);
|
||||
connect(showFilterScriptAct, SIGNAL(triggered()), this, SLOT(showFilterScript()));
|
||||
|
||||
//////////////Action Menu Preferences /////////////////////////////////////////////////////////////////////
|
||||
setCustomizeAct = new QAction(tr("&Options..."),this);
|
||||
connect(setCustomizeAct, SIGNAL(triggered()), this, SLOT(setCustomize()));
|
||||
|
||||
//////////////Action Menu About ///////////////////////////////////////////////////////////////////////////
|
||||
aboutAct = new QAction(tr("&About"), this);
|
||||
connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
|
||||
|
||||
aboutPluginsAct = new QAction(tr("About &Plugins"), this);
|
||||
connect(aboutPluginsAct, SIGNAL(triggered()), this, SLOT(aboutPlugins()));
|
||||
|
||||
onlineHelpAct = new QAction(tr("Online &Documentation"), this);
|
||||
connect(onlineHelpAct, SIGNAL(triggered()), this, SLOT(helpOnline()));
|
||||
|
||||
submitBugAct = new QAction(tr("Submit Bug"), this);
|
||||
connect(submitBugAct, SIGNAL(triggered()), this, SLOT(submitBug()));
|
||||
|
||||
onscreenHelpAct = new QAction(tr("On screen quick help"), this);
|
||||
connect(onscreenHelpAct, SIGNAL(triggered()), this, SLOT(helpOnscreen()));
|
||||
|
||||
checkUpdatesAct = new QAction(tr("Check for updates"), this);
|
||||
connect(checkUpdatesAct, SIGNAL(triggered()), this, SLOT(checkForUpdates()));
|
||||
}
|
||||
|
||||
void MainWindow::createToolBars()
|
||||
{
|
||||
mainToolBar = addToolBar(tr("Standard"));
|
||||
mainToolBar->setIconSize(QSize(32,32));
|
||||
mainToolBar->addAction(openAct);
|
||||
mainToolBar->addAction(reloadAct);
|
||||
mainToolBar->addAction(saveAct);
|
||||
/*mainToolBar->addAction(saveSnapshotAct);
|
||||
mainToolBar->addAction(showLayerDlgAct);*/
|
||||
|
||||
renderToolBar = addToolBar(tr("Render"));
|
||||
//renderToolBar->setIconSize(QSize(32,32));
|
||||
renderToolBar->addActions(renderModeGroupAct->actions());
|
||||
renderToolBar->addAction(renderModeTextureAct);
|
||||
renderToolBar->addAction(setLightAct);
|
||||
renderToolBar->addAction(setSelectFaceRenderingAct);
|
||||
renderToolBar->addAction(setSelectVertRenderingAct);
|
||||
|
||||
/*editToolBar = addToolBar(tr("Edit"));
|
||||
editToolBar->addAction(suspendEditModeAct);
|
||||
editToolBar->addSeparator();
|
||||
|
||||
filterToolBar = addToolBar(tr("Action"));
|
||||
|
||||
foreach(MeshEditInterfaceFactory *iEditFactory,PM.meshEditFactoryPlugins())
|
||||
{
|
||||
foreach(QAction* editAction, iEditFactory->actions())
|
||||
{
|
||||
if(!editAction->icon().isNull())
|
||||
{
|
||||
editToolBar->addAction(editAction);
|
||||
} else qDebug() << "action was null";
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::createMenus()
|
||||
{
|
||||
//////////////////// Menu File ////////////////////////////////////////////////////////////////////////////
|
||||
fileMenu = menuBar()->addMenu(tr("&File"));
|
||||
fileMenu->addAction(openAct);
|
||||
fileMenu->addAction(openInAct);
|
||||
fileMenu->addAction(openProjectAct);
|
||||
fileMenu->addAction(closeAct);
|
||||
fileMenu->addAction(reloadAct);
|
||||
fileMenu->addAction(saveAct);
|
||||
fileMenu->addAction(saveAsAct);
|
||||
fileMenu->addAction(saveProjectAct);
|
||||
|
||||
fileMenuNew = fileMenu->addMenu(tr("New"));
|
||||
|
||||
/*fileMenu->addSeparator();
|
||||
fileMenu->addAction(saveSnapshotAct);*/
|
||||
separatorAct = fileMenu->addSeparator();
|
||||
|
||||
for (int i = 0; i < MAXRECENTFILES; ++i) fileMenu->addAction(recentFileActs[i]);
|
||||
updateRecentFileActions();
|
||||
fileMenu->addSeparator();
|
||||
fileMenu->addAction(exitAct);
|
||||
|
||||
//////////////////// Menu Edit //////////////////////////////////////////////////////////////////////////
|
||||
/*editMenu = menuBar()->addMenu(tr("&Edit"));
|
||||
editMenu->addAction(suspendEditModeAct);*/
|
||||
|
||||
//////////////////// Menu Filter //////////////////////////////////////////////////////////////////////////
|
||||
/*filterMenu = menuBar()->addMenu(tr("Fi<ers"));
|
||||
filterMenu->addAction(lastFilterAct);
|
||||
filterMenu->addAction(showFilterScriptAct);
|
||||
filterMenu->addSeparator();
|
||||
filterMenuSelect = filterMenu->addMenu(tr("Selection"));
|
||||
filterMenuClean = filterMenu->addMenu(tr("Cleaning and Repairing"));
|
||||
filterMenuRemeshing = filterMenu->addMenu(tr("Remeshing, simplification and reconstruction"));
|
||||
filterMenuColorize = filterMenu->addMenu(tr("Color Creation and Processing"));
|
||||
filterMenuSmoothing = filterMenu->addMenu(tr("Smoothing, Fairing and Deformation"));
|
||||
filterMenuQuality = filterMenu->addMenu(tr("Quality Measure and computations"));
|
||||
filterMenuNormal = filterMenu->addMenu(tr("Normals, Curvatures and Orientation"));
|
||||
filterMenuLayer = filterMenu->addMenu(tr("Layer and Attribute Management"));
|
||||
filterMenuRangeMap = filterMenu->addMenu(tr("Range Map"));
|
||||
filterMenuPointSet = filterMenu->addMenu(tr("Point Set"));
|
||||
filterMenuSampling = filterMenu->addMenu(tr("Sampling"));
|
||||
filterMenuTexture = filterMenu->addMenu(tr("Texture"));*/
|
||||
|
||||
|
||||
//////////////////// Menu Render //////////////////////////////////////////////////////////////////////////
|
||||
renderMenu = menuBar()->addMenu(tr("&Render"));
|
||||
|
||||
renderModeMenu=renderMenu->addMenu(tr("Render &Mode"));
|
||||
renderModeMenu->addAction(backFaceCullAct);
|
||||
renderModeMenu->addActions(renderModeGroupAct->actions());
|
||||
renderModeMenu->addAction(renderModeTextureAct);
|
||||
renderModeMenu->addAction(setSelectFaceRenderingAct);
|
||||
renderModeMenu->addAction(setSelectVertRenderingAct);
|
||||
|
||||
lightingModeMenu=renderMenu->addMenu(tr("&Lighting"));
|
||||
lightingModeMenu->addAction(setLightAct);
|
||||
lightingModeMenu->addAction(setDoubleLightingAct);
|
||||
lightingModeMenu->addAction(setFancyLightingAct);
|
||||
|
||||
// Color SUBmenu
|
||||
colorModeMenu = renderMenu->addMenu(tr("&Color"));
|
||||
|
||||
colorModeGroupAct = new QActionGroup(this); colorModeGroupAct->setExclusive(true);
|
||||
|
||||
colorModeNoneAct = new QAction(QString("&None"),colorModeGroupAct);
|
||||
colorModeNoneAct->setCheckable(true);
|
||||
colorModeNoneAct->setChecked(true);
|
||||
|
||||
colorModePerMeshAct = new QAction(QString("Per &Mesh"),colorModeGroupAct);
|
||||
colorModePerMeshAct->setCheckable(true);
|
||||
|
||||
colorModePerVertexAct = new QAction(QString("Per &Vertex"),colorModeGroupAct);
|
||||
colorModePerVertexAct->setCheckable(true);
|
||||
|
||||
colorModePerFaceAct = new QAction(QString("Per &Face"),colorModeGroupAct);
|
||||
colorModePerFaceAct->setCheckable(true);
|
||||
|
||||
|
||||
colorModeMenu->addAction(colorModeNoneAct);
|
||||
colorModeMenu->addAction(colorModePerMeshAct);
|
||||
colorModeMenu->addAction(colorModePerVertexAct);
|
||||
colorModeMenu->addAction(colorModePerFaceAct);
|
||||
|
||||
connect(colorModeGroupAct, SIGNAL(triggered(QAction *)), this, SLOT(setColorMode(QAction *)));
|
||||
|
||||
// Shaders SUBmenu
|
||||
shadersMenu = renderMenu->addMenu(tr("&Shaders"));
|
||||
|
||||
renderMenu->addSeparator();
|
||||
|
||||
//////////////////// Menu View ////////////////////////////////////////////////////////////////////////////
|
||||
viewMenu = menuBar()->addMenu(tr("&View"));
|
||||
viewMenu->addAction(fullScreenAct);
|
||||
//viewMenu->addAction(showLayerDlgAct);
|
||||
|
||||
trackBallMenu = viewMenu->addMenu(tr("&Trackball"));
|
||||
trackBallMenu->addAction(showTrackBallAct);
|
||||
trackBallMenu->addAction(resetTrackBallAct);
|
||||
|
||||
logMenu = viewMenu->addMenu(tr("&Info"));
|
||||
logMenu->addAction(showInfoPaneAct);
|
||||
|
||||
toolBarMenu = viewMenu->addMenu(tr("&ToolBars"));
|
||||
toolBarMenu->addAction(showToolbarStandardAct);
|
||||
toolBarMenu->addAction(showToolbarRenderAct);
|
||||
connect(toolBarMenu,SIGNAL(aboutToShow()),this,SLOT(updateMenus()));
|
||||
|
||||
//////////////////// Menu Windows /////////////////////////////////////////////////////////////////////////
|
||||
windowsMenu = menuBar()->addMenu(tr("&Windows"));
|
||||
connect(windowsMenu, SIGNAL(aboutToShow()), this, SLOT(updateWindowMenu()));
|
||||
menuBar()->addSeparator();
|
||||
|
||||
//////////////////// Menu Preferences /////////////////////////////////////////////////////////////////////
|
||||
preferencesMenu=menuBar()->addMenu(tr("&Tools"));
|
||||
preferencesMenu->addAction(setCustomizeAct);
|
||||
|
||||
//////////////////// Menu Help ////////////////////////////////////////////////////////////////
|
||||
helpMenu = menuBar()->addMenu(tr("&Help"));
|
||||
helpMenu->addAction(aboutAct);
|
||||
helpMenu->addAction(aboutPluginsAct);
|
||||
helpMenu->addAction(onlineHelpAct);
|
||||
helpMenu->addAction(onscreenHelpAct);
|
||||
helpMenu->addAction(submitBugAct);
|
||||
helpMenu->addAction(checkUpdatesAct);
|
||||
|
||||
/*fillFilterMenu();
|
||||
fillEditMenu();*/
|
||||
fillRenderMenu();
|
||||
//fillDecorateMenu();
|
||||
}
|
||||
|
||||
//void MainWindow::fillFilterMenu()
|
||||
//{
|
||||
// foreach(MeshFilterInterface *iFilter,PM.meshFilterPlugins())
|
||||
// {
|
||||
// foreach(QAction *filterAction, iFilter->actions())
|
||||
// {
|
||||
// filterAction->setToolTip(iFilter->filterInfo(filterAction));
|
||||
// connect(filterAction,SIGNAL(triggered()),this,SLOT(startFilter()));
|
||||
// int filterClass = iFilter->getClass(filterAction);
|
||||
//
|
||||
// if( (filterClass & MeshFilterInterface::FaceColoring) || (filterClass & MeshFilterInterface::VertexColoring) ) filterMenuColorize->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Selection) filterMenuSelect->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Cleaning ) filterMenuClean->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Remeshing ) filterMenuRemeshing->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Smoothing ) filterMenuSmoothing->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Normal ) filterMenuNormal->addAction(filterAction);
|
||||
// if( (filterClass & MeshFilterInterface::Quality ) || (filterClass & MeshFilterInterface::Measure ) ) filterMenuQuality->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Layer ) filterMenuLayer->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::MeshCreation ) fileMenuNew->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::RangeMap ) filterMenuRangeMap->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::PointSet ) filterMenuPointSet->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Sampling ) filterMenuSampling->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Texture) filterMenuTexture->addAction(filterAction);
|
||||
// // MeshFilterInterface::Generic :
|
||||
// if(filterClass == 0) filterMenu->addAction(filterAction);
|
||||
//
|
||||
// if(!filterAction->icon().isNull())
|
||||
// filterToolBar->addAction(filterAction);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//void MainWindow::fillDecorateMenu()
|
||||
//{
|
||||
// foreach(MeshDecorateInterface *iDecorate,PM.meshDecoratePlugins())
|
||||
// {
|
||||
// foreach(QAction *decorateAction, iDecorate->actions())
|
||||
// {
|
||||
// connect(decorateAction,SIGNAL(triggered()),this,SLOT(applyDecorateMode()));
|
||||
// decorateAction->setToolTip(iDecorate->filterInfo(decorateAction));
|
||||
// renderMenu->addAction(decorateAction);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
void MainWindow::fillRenderMenu()
|
||||
{
|
||||
foreach(MeshRenderInterface *iRender,PM.meshRenderPlugins())
|
||||
{
|
||||
addToMenu(iRender->actions(), shadersMenu, SLOT(applyRenderMode()));
|
||||
}
|
||||
}
|
||||
|
||||
//void MainWindow::fillEditMenu()
|
||||
//{
|
||||
// foreach(MeshEditInterfaceFactory *iEditFactory,PM.meshEditFactoryPlugins())
|
||||
// {
|
||||
// foreach(QAction* editAction, iEditFactory->actions())
|
||||
// {
|
||||
// editMenu->addAction(editAction);
|
||||
//
|
||||
// connect(editAction, SIGNAL(triggered()), this, SLOT(applyEditMode()));
|
||||
// //editActionList.push_back(editAction);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
void MainWindow::loadPlugins()
|
||||
{
|
||||
//PM.loadPlugins();
|
||||
// pluginsDir=QDir(getPluginDirPath());
|
||||
// // without adding the correct library path in the mac the loading of jpg (done via qt plugins) fails
|
||||
// qApp->addLibraryPath(getPluginDirPath());
|
||||
// qApp->addLibraryPath(getBaseDirPath());
|
||||
//
|
||||
// QStringList pluginfilters;
|
||||
//#if defined(Q_OS_WIN)
|
||||
// pluginfilters << "*.dll";
|
||||
//#elif defined(Q_OS_MAC)
|
||||
// pluginfilters << "*.dylib";
|
||||
//#else
|
||||
//#endif
|
||||
// pluginsDir.setNameFilters(pluginfilters);
|
||||
//
|
||||
// qDebug( "Current Plugins Dir: %s ",qPrintable(pluginsDir.absolutePath()));
|
||||
// foreach (QString fileName, pluginsDir.entryList(QDir::Files)) {
|
||||
// QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
|
||||
// QObject *plugin = loader.instance();
|
||||
//
|
||||
// if (plugin) {
|
||||
// MeshFilterInterface *iFilter = qobject_cast<MeshFilterInterface *>(plugin);
|
||||
// if (iFilter)
|
||||
// {
|
||||
//
|
||||
// QAction *filterAction;
|
||||
//
|
||||
// foreach(filterAction, iFilter->actions())
|
||||
// {
|
||||
// //qDebug("Processing action %s",qPrintable(filterAction->text()) );
|
||||
// //qDebug(" (%s)", qPrintable(iFilter->filterInfo(filterAction)) );
|
||||
// iFilter->initGlobalParameterSet(filterAction,defaultGlobalParams);
|
||||
// filterMap[filterAction->text()]=filterAction;
|
||||
// filterAction->setToolTip(iFilter->filterInfo(filterAction));
|
||||
// connect(filterAction,SIGNAL(triggered()),this,SLOT(startFilter()));
|
||||
// int filterClass = iFilter->getClass(filterAction);
|
||||
//
|
||||
// if( (filterClass & MeshFilterInterface::FaceColoring) ||
|
||||
// (filterClass & MeshFilterInterface::VertexColoring) )
|
||||
// filterMenuColorize->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Selection)
|
||||
// filterMenuSelect->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Cleaning )
|
||||
// filterMenuClean->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Remeshing )
|
||||
// filterMenuRemeshing->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Smoothing )
|
||||
// filterMenuSmoothing->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Normal )
|
||||
// filterMenuNormal->addAction(filterAction);
|
||||
// if( (filterClass & MeshFilterInterface::Quality ) ||
|
||||
// (filterClass & MeshFilterInterface::Measure ) )
|
||||
// filterMenuQuality->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Layer )
|
||||
// filterMenuLayer->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::MeshCreation )
|
||||
// fileMenuNew->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::RangeMap )
|
||||
// filterMenuRangeMap->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::PointSet )
|
||||
// filterMenuPointSet->addAction(filterAction);
|
||||
// if(filterClass & MeshFilterInterface::Sampling )
|
||||
// filterMenuSampling->addAction(filterAction);
|
||||
// if (filterClass & MeshFilterInterface::Texture)
|
||||
// filterMenuTexture->addAction(filterAction);
|
||||
// if(filterClass == 0) // MeshFilterInterface::Generic :
|
||||
// filterMenu->addAction(filterAction);
|
||||
//
|
||||
// if(!filterAction->icon().isNull())
|
||||
// filterToolBar->addAction(filterAction);
|
||||
// }
|
||||
// }
|
||||
// MeshIOInterface *iIO = qobject_cast<MeshIOInterface *>(plugin);
|
||||
// if (iIO)
|
||||
// meshIOPlugins.push_back(iIO);
|
||||
//
|
||||
// MeshDecorateInterface *iDecorator = qobject_cast<MeshDecorateInterface *>(plugin);
|
||||
// if (iDecorator){
|
||||
// QAction *decoratorAction;
|
||||
// decoratorActionList+=iDecorator->actions();
|
||||
// foreach(decoratorAction, iDecorator->actions())
|
||||
// {
|
||||
// iDecorator->initGlobalParameterSet(decoratorAction,&defaultGlobalParams);
|
||||
// connect(decoratorAction,SIGNAL(triggered()),this,SLOT(applyDecorateMode()));
|
||||
// decoratorAction->setToolTip(iDecorator->Info(decoratorAction));
|
||||
// renderMenu->addAction(decoratorAction);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// MeshRenderInterface *iRender = qobject_cast<MeshRenderInterface *>(plugin);
|
||||
// if (iRender)
|
||||
// addToMenu(iRender->actions(), shadersMenu, SLOT(applyRenderMode()));
|
||||
///*
|
||||
// MeshEditInterface *iEdit = qobject_cast<MeshEditInterface *>(plugin);
|
||||
// QAction *editAction;
|
||||
// if (iEdit)
|
||||
// foreach(editAction, iEdit->actions())
|
||||
// {
|
||||
// editMenu->addAction(editAction);
|
||||
// if(!editAction->icon().isNull())
|
||||
// editToolBar->addAction(editAction);
|
||||
// connect(editAction,SIGNAL(triggered()),this,SLOT(applyEditMode()));
|
||||
// editActionList.push_back(editAction);
|
||||
// }
|
||||
//*/
|
||||
// MeshEditInterfaceFactory *iEditFactory = qobject_cast<MeshEditInterfaceFactory *>(plugin);
|
||||
// QAction *editAction = 0;
|
||||
// if(iEditFactory)
|
||||
// {
|
||||
// //qDebug() << "Here with filename:" << fileName;
|
||||
//
|
||||
// foreach(editAction, iEditFactory->actions())
|
||||
// {
|
||||
// editMenu->addAction(editAction);
|
||||
// if(!editAction->icon().isNull())
|
||||
// {
|
||||
// editToolBar->addAction(editAction);
|
||||
// } else qDebug() << "action was null";
|
||||
//
|
||||
// connect(editAction, SIGNAL(triggered()), this, SLOT(applyEditMode()));
|
||||
// editActionList.push_back(editAction);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pluginFileNames += fileName;
|
||||
// } else
|
||||
// {
|
||||
// qDebug() << "error loading plugin with filename:" << fileName;
|
||||
// qDebug() << loader.errorString();
|
||||
// }
|
||||
// }
|
||||
// filterMenu->setEnabled(!filterMenu->actions().isEmpty() && mdiarea->activeSubWindow());
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::loadMeshLabSettings()
|
||||
{
|
||||
// I have already loaded the plugins so the default for the plugins are already in.
|
||||
// we just miss the globals default of meshlab itself
|
||||
GLArea::initGlobalParameterSet(& defaultGlobalParams);
|
||||
|
||||
QSettings settings;
|
||||
QStringList klist = settings.allKeys();
|
||||
|
||||
// 1) load saved values
|
||||
for(int ii = 0;ii < klist.size();++ii)
|
||||
{
|
||||
QDomDocument doc;
|
||||
doc.setContent(settings.value(klist.at(ii)).toString());
|
||||
|
||||
QString st = settings.value(klist.at(ii)).toString();
|
||||
QDomElement docElem = doc.firstChild().toElement();
|
||||
|
||||
RichParameter* rpar = NULL;
|
||||
if(!docElem.isNull())
|
||||
{
|
||||
bool ret = RichParameterFactory::create(docElem,&rpar);
|
||||
if (!ret)
|
||||
{
|
||||
qDebug("Warning Ignored parameter '%s' = '%s'. Malformed.", qPrintable(docElem.attribute("name")),qPrintable(docElem.attribute("value")));
|
||||
continue;
|
||||
}
|
||||
if (!defaultGlobalParams.hasParameter(rpar->name))
|
||||
{
|
||||
qDebug("Warning Ignored parameter %s. In the saved parameters there are ones that are not in the HardWired ones. "
|
||||
"It happens if you are running MeshLab with only a subset of the plugins. ",qPrintable(rpar->name));
|
||||
}
|
||||
else currentGlobalParams.addParam(rpar);
|
||||
}
|
||||
}
|
||||
|
||||
// 2) eventually fill missing values with the hardwired defaults
|
||||
for(int ii = 0;ii < defaultGlobalParams.paramList.size();++ii)
|
||||
{
|
||||
qDebug("Searching param[%i] %s of the default into the loaded settings. ",ii,qPrintable(defaultGlobalParams.paramList.at(ii)->name));
|
||||
if (!currentGlobalParams.hasParameter(defaultGlobalParams.paramList.at(ii)->name))
|
||||
{
|
||||
qDebug("Warning! a default param was not found in the saved settings. This should happen only on the first run...");
|
||||
RichParameterCopyConstructor v;
|
||||
defaultGlobalParams.paramList.at(ii)->accept(v);
|
||||
currentGlobalParams.paramList.push_back(v.lastCreated);
|
||||
|
||||
QDomDocument doc("MeshLabSettings");
|
||||
RichParameterXMLVisitor vxml(doc);
|
||||
v.lastCreated->accept(vxml);
|
||||
doc.appendChild(vxml.parElem);
|
||||
QString docstring = doc.toString();
|
||||
QSettings setting;
|
||||
setting.setValue(v.lastCreated->name,QVariant(docstring));
|
||||
}
|
||||
}
|
||||
|
||||
emit dispatchCustomSettings(currentGlobalParams);
|
||||
}
|
||||
|
||||
void MainWindow::addToMenu(QList<QAction *> actionList, QMenu *menu, const char *slot)
|
||||
{
|
||||
foreach (QAction *a, actionList)
|
||||
{
|
||||
connect(a,SIGNAL(triggered()),this,slot);
|
||||
menu->addAction(a);
|
||||
}
|
||||
}
|
||||
|
||||
// this function update the app settings with the current recent file list
|
||||
// and update the loaded mesh counter
|
||||
void MainWindow::setCurrentFile(const QString &fileName)
|
||||
{
|
||||
QSettings settings;
|
||||
QStringList files = settings.value("recentFileList").toStringList();
|
||||
files.removeAll(fileName);
|
||||
files.prepend(fileName);
|
||||
while (files.size() > MAXRECENTFILES)
|
||||
files.removeLast();
|
||||
|
||||
settings.setValue("recentFileList", files);
|
||||
|
||||
foreach (QWidget *widget, QApplication::topLevelWidgets()) {
|
||||
MainWindow *mainWin = qobject_cast<MainWindow *>(widget);
|
||||
if (mainWin) mainWin->updateRecentFileActions();
|
||||
}
|
||||
|
||||
settings.setValue("totalKV", settings.value("totalKV",0).toInt() + (GLA()->mm()->cm.vn)/1000);
|
||||
settings.setValue("loadedMeshCounter",settings.value("loadedMeshCounter",0).toInt() + 1);
|
||||
|
||||
int loadedMeshCounter = settings.value("loadedMeshCounter",20).toInt();
|
||||
int connectionInterval = settings.value("connectionInterval",20).toInt();
|
||||
int lastComunicatedValue = settings.value("lastComunicatedValue",0).toInt();
|
||||
|
||||
if(loadedMeshCounter-lastComunicatedValue>connectionInterval && !myLocalBuf.isOpen())
|
||||
{
|
||||
#if not defined(__DISABLE_AUTO_STATS__)
|
||||
checkForUpdates(false);
|
||||
#endif
|
||||
int congratsMeshCounter = settings.value("congratsMeshCounter",0).toInt();
|
||||
if(loadedMeshCounter > congratsMeshCounter + 100 )
|
||||
{
|
||||
QFile txtFile(":/images/100mesh.html");
|
||||
txtFile.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
QString tttt=txtFile.readAll();
|
||||
// This preference values store when you did the last request for a mail
|
||||
settings.setValue("congratsMeshCounter",loadedMeshCounter);
|
||||
|
||||
/*QDialog *congratsDialog = new QDialog();
|
||||
Ui::CongratsDialog temp;
|
||||
temp.setupUi(congratsDialog);
|
||||
|
||||
temp.buttonBox->addButton("Send Mail", QDialogButtonBox::AcceptRole);
|
||||
temp.congratsTextEdit->setHtml(tttt);
|
||||
congratsDialog->exec();
|
||||
if(congratsDialog->result()==QDialog::Accepted)
|
||||
QDesktopServices::openUrl(QUrl("mailto:p.cignoni@isti.cnr.it?subject=[MeshLab] Reporting Info on MeshLab Usage"));*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::checkForUpdates(bool verboseFlag)
|
||||
{
|
||||
VerboseCheckingFlag=verboseFlag;
|
||||
QSettings settings;
|
||||
int totalKV=settings.value("totalKV",0).toInt();
|
||||
int connectionInterval=settings.value("connectionInterval",20).toInt();
|
||||
settings.setValue("connectionInterval",connectionInterval);
|
||||
int loadedMeshCounter=settings.value("loadedMeshCounter",0).toInt();
|
||||
int savedMeshCounter=settings.value("savedMeshCounter",0).toInt();
|
||||
QString UID=settings.value("UID",QString("")).toString();
|
||||
if(UID.isEmpty())
|
||||
{
|
||||
UID=QUuid::createUuid ().toString();
|
||||
settings.setValue("UID",UID);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG_PHP
|
||||
QString BaseCommand("/~cignoni/meshlab_d.php");
|
||||
#else
|
||||
QString BaseCommand("/~cignoni/meshlab.php");
|
||||
#endif
|
||||
|
||||
#ifdef Q_WS_WIN
|
||||
QString OS="Win";
|
||||
#elif defined( Q_WS_MAC)
|
||||
QString OS="Mac";
|
||||
#else
|
||||
QString OS="Lin";
|
||||
#endif
|
||||
QString message=BaseCommand+QString("?code=%1&count=%2&scount=%3&totkv=%4&ver=%5&os=%6").arg(UID).arg(loadedMeshCounter).arg(savedMeshCounter).arg(totalKV).arg(appVer()).arg(OS);
|
||||
idHost=httpReq->setHost("vcg.isti.cnr.it"); // id == 1
|
||||
bool ret=myLocalBuf.open(QBuffer::WriteOnly);
|
||||
if(!ret) QMessageBox::information(this,"Meshlab",QString("Failed opening of internal buffer"));
|
||||
idGet=httpReq->get(message,&myLocalBuf); // id == 2
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::connectionDone(bool /* status */)
|
||||
{
|
||||
QString answer=myLocalBuf.data();
|
||||
if(answer.left(3)==QString("NEW"))
|
||||
QMessageBox::information(this,"MeshLab Version Checking",answer.remove(0,3));
|
||||
else if (VerboseCheckingFlag) QMessageBox::information(this,"MeshLab Version Checking","Your MeshLab version is the most recent one.");
|
||||
|
||||
myLocalBuf.close();
|
||||
QSettings settings;
|
||||
int loadedMeshCounter=settings.value("loadedMeshCounter",0).toInt();
|
||||
settings.setValue("lastComunicatedValue",loadedMeshCounter);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::submitBug()
|
||||
{
|
||||
QMessageBox mb(QMessageBox::NoIcon,tr("MeshLab"),tr("MeshLab"),QMessageBox::NoButton, this);
|
||||
//mb.setWindowTitle(tr("MeshLab"));
|
||||
QPushButton *submitBug = mb.addButton("Submit Bug",QMessageBox::AcceptRole);
|
||||
mb.addButton(QMessageBox::Cancel);
|
||||
mb.setText(tr("If Meshlab closed in unexpected way (e.g. it crashed badly) and"
|
||||
"if you are able to repeat the bug, please consider to submit a report using the SourceForge tracking system.\n"
|
||||
) );
|
||||
mb.setInformativeText( tr(
|
||||
"Hints for a good, useful bug report:\n"
|
||||
"- Be verbose and descriptive\n"
|
||||
"- Report meshlab version and OS\n"
|
||||
"- Describe the sequence of actions that bring you to the crash.\n"
|
||||
"- Consider submitting the mesh file causing a particular crash.\n"
|
||||
) );
|
||||
|
||||
mb.exec();
|
||||
|
||||
if (mb.clickedButton() == submitBug)
|
||||
QDesktopServices::openUrl(QUrl("http://sourceforge.net/tracker/?func=add&group_id=149444&atid=774731"));
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::wrapSetActiveSubWindow(QWidget* window){
|
||||
QMdiSubWindow* subwindow;
|
||||
subwindow = dynamic_cast<QMdiSubWindow*>(window);
|
||||
if(subwindow!= NULL){
|
||||
mdiarea->setActiveSubWindow(subwindow);
|
||||
}else{
|
||||
qDebug("Type of window is not a QMdiSubWindow*");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,118 +0,0 @@
|
||||
VCGDIR = ../../../vcglib
|
||||
GLEWDIR = ../external/glew-1.5.1
|
||||
#CONFIG += debug_and_release
|
||||
DESTDIR = ../distrib
|
||||
# uncomment to try Eigen
|
||||
# DEFINES += VCG_USE_EIGEN
|
||||
# CONFIG += warn_off
|
||||
INCLUDEPATH *= ../.. \
|
||||
$$VCGDIR \
|
||||
$$GLEWDIR/include
|
||||
DEPENDPATH += $$VCGDIR \
|
||||
$$VCGDIR/vcg \
|
||||
$$VCGDIR/wrap
|
||||
HEADERS = ../common/interfaces.h \
|
||||
mainwindow.h \
|
||||
glarea.h \
|
||||
glarea_setting.h \
|
||||
plugindialog.h \
|
||||
customDialog.h \
|
||||
filterScriptDialog.h \
|
||||
saveSnapshotDialog.h \
|
||||
savemaskexporter.h \
|
||||
changetexturename.h \
|
||||
layerDialog.h \
|
||||
stdpardialog.h \
|
||||
$$VCGDIR/wrap/gui/trackball.h \
|
||||
$$VCGDIR/wrap/gui/trackmode.h \
|
||||
$$VCGDIR/wrap/gl/trimesh.h
|
||||
SOURCES = main.cpp \
|
||||
mainwindow_Init.cpp \
|
||||
mainwindow_RunTime.cpp \
|
||||
glarea.cpp \
|
||||
plugindialog.cpp \
|
||||
customDialog.cpp \
|
||||
filterScriptDialog.cpp \
|
||||
saveSnapshotDialog.cpp \
|
||||
layerDialog.cpp \
|
||||
savemaskexporter.cpp \
|
||||
changetexturename.cpp \
|
||||
stdpardialog.cpp \
|
||||
$$VCGDIR/wrap/gui/trackball.cpp \
|
||||
$$VCGDIR/wrap/gui/trackmode.cpp \
|
||||
glarea_setting.cpp
|
||||
|
||||
FORMS = ui/layerDialog.ui \
|
||||
ui/filterScriptDialog.ui \
|
||||
ui/customDialog.ui \
|
||||
ui/savesnapshotDialog.ui \
|
||||
ui/aboutDialog.ui \
|
||||
ui/renametexture.ui \
|
||||
ui/savemaskexporter.ui \
|
||||
ui/congratsDialog.ui
|
||||
RESOURCES = meshlab.qrc
|
||||
|
||||
# to add windows icon
|
||||
RC_FILE = meshlab.rc
|
||||
|
||||
# ## the xml info list
|
||||
# ## the next time the app open a new extension
|
||||
QMAKE_INFO_PLIST = ../install/info.plist
|
||||
|
||||
# to add MacOS icon
|
||||
ICON = images/meshlab.icns
|
||||
|
||||
# note that to add the file icons on the mac the following line does not work.
|
||||
# You have to copy the file by hand into the meshlab.app/Contents/Resources directory.
|
||||
# ICON += images/meshlab_obj.icns
|
||||
QT += opengl
|
||||
QT += xml
|
||||
QT += network
|
||||
|
||||
# the following line is needed to avoid mismatch between
|
||||
# the awful min/max macros of windows and the limits max
|
||||
win32:DEFINES += NOMINMAX
|
||||
|
||||
# the following line is to hide the hundred of warnings about the deprecated
|
||||
# old printf are all around the code
|
||||
win32-msvc2005:DEFINES += _CRT_SECURE_NO_DEPRECATE
|
||||
win32-msvc2008:DEFINES += _CRT_SECURE_NO_DEPRECATE
|
||||
mac:QMAKE_CXX = g++-4.2
|
||||
|
||||
# Uncomment these if you want to experiment with newer gcc compilers
|
||||
# (here using the one provided with macports)
|
||||
# macx-g++:QMAKE_CXX=g++-mp-4.3
|
||||
# macx-g++:QMAKE_CXXFLAGS_RELEASE -= -Os
|
||||
# macx-g++:QMAKE_CXXFLAGS_RELEASE += -O3
|
||||
|
||||
INCLUDEPATH += . \
|
||||
.. \
|
||||
../../../vcglib \
|
||||
$$GLEWDIR/include
|
||||
CONFIG += stl
|
||||
|
||||
macx:LIBS += ../common/libcommon.dylib
|
||||
macx:QMAKE_POST_LINK ="cp ../common/libcommon* ../distrib/meshlab.app/Contents/MacOS; install_name_tool -change libcommon.1.dylib @executable_path/libcommon.1.dylib ../distrib/meshlab.app/Contents/MacOS/meshlab"
|
||||
|
||||
|
||||
|
||||
|
||||
win32-msvc2005:LIBS += -L../distrib -lcommon
|
||||
win32-msvc2008:LIBS += -L../distrib -lcommon
|
||||
win32-g++:LIBS += -L../distrib -lcommon
|
||||
|
||||
#CONFIG(release,debug | release) {
|
||||
# win32-msvc2005:release:LIBS += -L../common/release -lcommon
|
||||
# win32-msvc2008:release:LIBS += -L../common/release -lcommon
|
||||
# win32-g++:release:LIBS += -L../common/release -lcommon
|
||||
#}
|
||||
|
||||
unix:LIBS += -L../common -lcommon
|
||||
|
||||
# uncomment in your local copy only in emergency cases.
|
||||
# We should never be too permissive
|
||||
# win32-g++:QMAKE_CXXFLAGS += -fpermissive
|
||||
|
||||
# The following define is needed in gcc to remove the asserts
|
||||
win32-g++:DEFINES += NDEBUG
|
||||
CONFIG(debug, debug|release):win32-g++:release:DEFINES -= NDEBUG
|
||||
@ -1,38 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>images/backlines.png</file>
|
||||
<file>images/bbox.png</file>
|
||||
<file>images/cursors/plain.png</file>
|
||||
<file>images/cursors/plain_pan.png</file>
|
||||
<file>images/cursors/plain_trackball.png</file>
|
||||
<file>images/cursors/plain_zoom.png</file>
|
||||
<file>images/eye48.png</file>
|
||||
<file>images/eye_256_splash.png</file>
|
||||
<file>images/flat.png</file>
|
||||
<file>images/flatlines.png</file>
|
||||
<file>images/info.png</file>
|
||||
<file>images/lightoff.png</file>
|
||||
<file>images/lighton.png</file>
|
||||
<file>images/logo.png</file>
|
||||
<file>images/logo_aimatshape.png</file>
|
||||
<file>images/logo_epoch.png</file>
|
||||
<file>images/logo_epoch_2.png</file>
|
||||
<file>images/no_edit.png</file>
|
||||
<file>images/open.png</file>
|
||||
<file>images/points.png</file>
|
||||
<file>images/reload.png</file>
|
||||
<file>images/save.png</file>
|
||||
<file>images/smooth.png</file>
|
||||
<file>images/snapshot.png</file>
|
||||
<file>images/textures.png</file>
|
||||
<file>images/wire.png</file>
|
||||
<file>images/layers.png</file>
|
||||
<file>images/layer_eye_open.png</file>
|
||||
<file>images/layer_eye_close.png</file>
|
||||
<file>images/layer_edit_locked.png</file>
|
||||
<file>images/layer_edit_unlocked.png</file>
|
||||
<file>images/100mesh.html</file>
|
||||
<file>images/selected_face.png</file>
|
||||
<file>images/selected_vert.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@ -1 +0,0 @@
|
||||
IDI_ICON1 ICON DISCARDABLE "images/eye.ico"
|
||||
@ -1,118 +0,0 @@
|
||||
VCGDIR = ../../../vcglib
|
||||
GLEWDIR = ../external/glew-1.5.1
|
||||
#CONFIG += debug_and_release
|
||||
DESTDIR = ../distrib
|
||||
# uncomment to try Eigen
|
||||
# DEFINES += VCG_USE_EIGEN
|
||||
# CONFIG += warn_off
|
||||
INCLUDEPATH *= ../.. \
|
||||
$$VCGDIR \
|
||||
$$GLEWDIR/include
|
||||
DEPENDPATH += $$VCGDIR \
|
||||
$$VCGDIR/vcg \
|
||||
$$VCGDIR/wrap
|
||||
HEADERS = ../common/interfaces.h \
|
||||
mainwindow.h \
|
||||
glarea.h \
|
||||
glarea_setting.h \
|
||||
#plugindialog.h \
|
||||
#customDialog.h \
|
||||
#filterScriptDialog.h \
|
||||
#saveSnapshotDialog.h \
|
||||
#savemaskexporter.h \
|
||||
#changetexturename.h \
|
||||
#layerDialog.h \
|
||||
stdpardialog.h \
|
||||
$$VCGDIR/wrap/gui/trackball.h \
|
||||
$$VCGDIR/wrap/gui/trackmode.h \
|
||||
$$VCGDIR/wrap/gl/trimesh.h
|
||||
SOURCES = main.cpp \
|
||||
mainwindow_Init.cpp \
|
||||
mainwindow_RunTime.cpp \
|
||||
glarea.cpp \
|
||||
#plugindialog.cpp \
|
||||
#customDialog.cpp \
|
||||
#filterScriptDialog.cpp \
|
||||
#saveSnapshotDialog.cpp \
|
||||
#layerDialog.cpp \
|
||||
#savemaskexporter.cpp \
|
||||
#changetexturename.cpp \
|
||||
stdpardialog.cpp \
|
||||
$$VCGDIR/wrap/gui/trackball.cpp \
|
||||
$$VCGDIR/wrap/gui/trackmode.cpp \
|
||||
glarea_setting.cpp
|
||||
|
||||
#FORMS = ui/savesnapshotDialog.ui \
|
||||
# ui/layerDialog.ui \
|
||||
# ui/filterScriptDialog.ui \
|
||||
# ui/customDialog.ui \
|
||||
# ui/aboutDialog.ui \
|
||||
# ui/renametexture.ui \
|
||||
# ui/savemaskexporter.ui \
|
||||
# ui/congratsDialog.ui
|
||||
RESOURCES = meshlab.qrc
|
||||
|
||||
# to add windows icon
|
||||
RC_FILE = meshlab.rc
|
||||
|
||||
# ## the xml info list
|
||||
# ## the next time the app open a new extension
|
||||
QMAKE_INFO_PLIST = ../install/info.plist
|
||||
|
||||
# to add MacOS icon
|
||||
ICON = images/meshlab.icns
|
||||
|
||||
# note that to add the file icons on the mac the following line does not work.
|
||||
# You have to copy the file by hand into the meshlab.app/Contents/Resources directory.
|
||||
# ICON += images/meshlab_obj.icns
|
||||
QT += opengl
|
||||
QT += xml
|
||||
QT += network
|
||||
|
||||
# the following line is needed to avoid mismatch between
|
||||
# the awful min/max macros of windows and the limits max
|
||||
win32:DEFINES += NOMINMAX
|
||||
|
||||
# the following line is to hide the hundred of warnings about the deprecated
|
||||
# old printf are all around the code
|
||||
win32-msvc2005:DEFINES += _CRT_SECURE_NO_DEPRECATE
|
||||
win32-msvc2008:DEFINES += _CRT_SECURE_NO_DEPRECATE
|
||||
mac:QMAKE_CXX = g++-4.2
|
||||
|
||||
# Uncomment these if you want to experiment with newer gcc compilers
|
||||
# (here using the one provided with macports)
|
||||
# macx-g++:QMAKE_CXX=g++-mp-4.3
|
||||
# macx-g++:QMAKE_CXXFLAGS_RELEASE -= -Os
|
||||
# macx-g++:QMAKE_CXXFLAGS_RELEASE += -O3
|
||||
|
||||
INCLUDEPATH += . \
|
||||
.. \
|
||||
../../../vcglib \
|
||||
$$GLEWDIR/include
|
||||
CONFIG += stl
|
||||
|
||||
macx:LIBS += ../common/libcommon.dylib
|
||||
macx:QMAKE_POST_LINK ="cp ../common/libcommon* ../distrib/meshlab.app/Contents/MacOS; install_name_tool -change libcommon.1.dylib @executable_path/libcommon.1.dylib ../distrib/meshlab.app/Contents/MacOS/meshlab"
|
||||
|
||||
|
||||
|
||||
|
||||
win32-msvc2005:LIBS += -L../distrib -lcommon
|
||||
win32-msvc2008:LIBS += -L../distrib -lcommon
|
||||
win32-g++:LIBS += -L../distrib -lcommon
|
||||
|
||||
#CONFIG(release,debug | release) {
|
||||
# win32-msvc2005:release:LIBS += -L../common/release -lcommon
|
||||
# win32-msvc2008:release:LIBS += -L../common/release -lcommon
|
||||
# win32-g++:release:LIBS += -L../common/release -lcommon
|
||||
#}
|
||||
|
||||
unix:LIBS += -L../common -lcommon
|
||||
|
||||
# uncomment in your local copy only in emergency cases.
|
||||
# We should never be too permissive
|
||||
# win32-g++:QMAKE_CXXFLAGS += -fpermissive
|
||||
|
||||
# The following define is needed in gcc to remove the asserts
|
||||
win32-g++:DEFINES += NDEBUG
|
||||
CONFIG(debug, debug|release):win32-g++:release:DEFINES -= NDEBUG
|
||||
@ -1,701 +0,0 @@
|
||||
/****************************************************************************
|
||||
* MeshLab o o *
|
||||
* An extendible mesh processor o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2005, 2006 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
History
|
||||
|
||||
$Log$
|
||||
Revision 1.16 2008/04/16 12:05:51 cignoni
|
||||
option for title of the dialog
|
||||
|
||||
Revision 1.15 2008/01/28 13:02:00 cignoni
|
||||
added support for filters on collection of meshes (layer filters)
|
||||
|
||||
Revision 1.14 2007/11/30 07:19:09 cignoni
|
||||
moved generic dialog to the meshlab base
|
||||
|
||||
Revision 1.13 2007/11/20 18:26:16 ponchio
|
||||
Added enum support for auto dialogs, working.
|
||||
|
||||
Revision 1.12 2007/11/19 17:09:20 ponchio
|
||||
added enum value. [untested].
|
||||
|
||||
Revision 1.11 2007/11/19 15:51:50 cignoni
|
||||
Added frame abstraction for reusing the std dialog mechanism
|
||||
|
||||
Revision 1.10 2007/11/05 13:34:41 cignoni
|
||||
added color and Help
|
||||
|
||||
Revision 1.9 2007/10/02 07:59:44 cignoni
|
||||
New filter interface. Hopefully more clean and easy to use.
|
||||
|
||||
Revision 1.8 2007/03/26 08:25:10 zifnab1974
|
||||
added eol at the end of the files
|
||||
|
||||
Revision 1.7 2007/02/27 23:58:36 cignoni
|
||||
Changed apply/ok into apply/close
|
||||
|
||||
Revision 1.6 2007/01/13 02:02:28 cignoni
|
||||
Changed loadFrameContent to pass the QString not as a reference (to avoid a temp var referencing)
|
||||
|
||||
Revision 1.5 2007/01/11 19:51:46 pirosu
|
||||
fixed bug for QT 4.1.0/dotnet2003
|
||||
removed the request of the window title to the plugin. The action description is used instead.
|
||||
|
||||
Revision 1.4 2007/01/11 10:40:09 cignoni
|
||||
Renamed ambiguous min/max vars
|
||||
|
||||
Revision 1.3 2006/12/27 21:41:41 pirosu
|
||||
Added improvements for the standard plugin window:
|
||||
split of the apply button in two buttons:ok and apply
|
||||
added support for parameters with absolute and percentage values
|
||||
|
||||
Revision 1.2 2006/12/13 21:54:35 pirosu
|
||||
2 updates for the standard plugin window: 1) it recovers its last size when it is undocked and 2) it closes itself when a filter is applied (only if it is floating)
|
||||
|
||||
|
||||
Revision 1.0 2006/12/13 17:37:02 pirosu
|
||||
Added standard plugin window support
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MESHLAB_STDPARDIALOG_H
|
||||
#define MESHLAB_STDPARDIALOG_H
|
||||
|
||||
#include "../common/interfaces.h"
|
||||
#include<QCheckBox>
|
||||
#include<QSpinBox>
|
||||
#include<QTableWidget>
|
||||
#include<QComboBox>
|
||||
#include<QGridLayout>
|
||||
#include<QDockWidget>
|
||||
|
||||
class MeshLabWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MeshLabWidget(QWidget* p,RichParameter* rpar);
|
||||
|
||||
// this one is called by resetValue to reset the values inside the widgets.
|
||||
virtual void resetWidgetValue() = 0;
|
||||
// bring the values from the Qt widgets to the parameter (e.g. from the checkBox to the parameter).
|
||||
virtual void collectWidgetValue() = 0;
|
||||
virtual void setWidgetValue(const Value& nv) = 0;
|
||||
virtual ~MeshLabWidget();
|
||||
|
||||
// called when the user press the 'default' button to reset the parameter values to its default.
|
||||
// It just set the parameter value and then it calls the specialized resetWidgetValue() to update also the widget.
|
||||
void resetValue();
|
||||
// update the parameter with the current widget values and return it.
|
||||
Value& getWidgetValue();
|
||||
|
||||
RichParameter* rp;
|
||||
QLabel* helpLab;
|
||||
signals:
|
||||
void parameterChanged();
|
||||
protected:
|
||||
QGridLayout* gridLay;
|
||||
void InitRichParameter(RichParameter* rpar);
|
||||
};
|
||||
|
||||
class BoolWidget : public MeshLabWidget
|
||||
{
|
||||
QCheckBox* cb;
|
||||
public:
|
||||
BoolWidget(QWidget* p,RichBool* rb);
|
||||
~BoolWidget();
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
};
|
||||
|
||||
|
||||
class LineEditWidget : public MeshLabWidget
|
||||
{
|
||||
protected:
|
||||
QLabel* lab;
|
||||
QLineEdit* lned;
|
||||
public:
|
||||
|
||||
LineEditWidget(QWidget* p,RichParameter* rpar);
|
||||
~LineEditWidget();
|
||||
virtual void collectWidgetValue() = 0;
|
||||
virtual void resetWidgetValue() = 0;
|
||||
virtual void setWidgetValue(const Value& nv) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class IntWidget : public LineEditWidget
|
||||
{
|
||||
public:
|
||||
IntWidget(QWidget* p,RichInt* rpar);
|
||||
~IntWidget(){}
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class FloatWidget : public LineEditWidget
|
||||
{
|
||||
public:
|
||||
FloatWidget(QWidget* p,RichFloat* rpar);
|
||||
~FloatWidget(){}
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class StringWidget : public LineEditWidget
|
||||
{
|
||||
public:
|
||||
StringWidget(QWidget* p,RichString* rpar);
|
||||
~StringWidget(){}
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
};
|
||||
|
||||
//class Matrix44fWidget : public MeshLabWidget
|
||||
//{
|
||||
//public:
|
||||
// Matrix44fWidget(QWidget* p,RichMatrix44f* rpar);
|
||||
//
|
||||
// void collectWidgetValue();
|
||||
// void resetWidgetValue();
|
||||
//};
|
||||
|
||||
/*
|
||||
class FloatListWidget : public MeshLabWidget
|
||||
{
|
||||
public:
|
||||
FloatListWidget(QWidget* p,RichFloatList* rpar);
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
};
|
||||
*/
|
||||
|
||||
/*
|
||||
class OpenFileWidget : public MeshLabWidget
|
||||
{
|
||||
public:
|
||||
OpenFileWidget(QWidget* p,RichOpenFile* rpar);
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
class SaveFileWidget : public MeshLabWidget
|
||||
{
|
||||
public:
|
||||
SaveFileWidget(QWidget* p,RichSaveFile* rpar);
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
};
|
||||
|
||||
|
||||
/// Widget to enter a color.
|
||||
// public QHBoxLayout,
|
||||
class ColorWidget : public MeshLabWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
QPushButton* colorButton;
|
||||
QLabel* colorLabel;
|
||||
QLabel* descLabel;
|
||||
QColor pickcol;
|
||||
|
||||
public:
|
||||
ColorWidget(QWidget *p, RichColor* newColor);
|
||||
~ColorWidget();
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
void initWidgetValue();
|
||||
|
||||
private:
|
||||
void updateColorInfo(const ColorValue& newColor);
|
||||
|
||||
signals:
|
||||
void dialogParamChanged();
|
||||
private slots:
|
||||
void pickColor();
|
||||
};
|
||||
|
||||
|
||||
|
||||
/// Widget to enter a value as a percentage or as an absolute value.
|
||||
/// You have to specify the default value and the range of the possible values.
|
||||
/// The default value is expressed in ABSolute units (e.g. it should be in the min..max range.
|
||||
|
||||
|
||||
//public QGridLayout
|
||||
class AbsPercWidget : public MeshLabWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AbsPercWidget(QWidget *p,RichAbsPerc* rabs);
|
||||
~AbsPercWidget();
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
|
||||
private:
|
||||
void setValue(float val, float minV, float maxV);
|
||||
|
||||
public slots:
|
||||
|
||||
void on_absSB_valueChanged(double newv);
|
||||
void on_percSB_valueChanged(double newv);
|
||||
signals:
|
||||
void dialogParamChanged();
|
||||
|
||||
protected:
|
||||
QDoubleSpinBox *absSB;
|
||||
QDoubleSpinBox *percSB;
|
||||
QLabel* fieldDesc;
|
||||
float m_min;
|
||||
float m_max;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/// Widget to enter a Point3f,
|
||||
/// if at the creation you provide a pointer to a GLArea (the mesh viewing window)
|
||||
/// the widget exposes a button for getting the current view directiont
|
||||
|
||||
//public QHBoxLayout,
|
||||
class Point3fWidget : public MeshLabWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Point3fWidget(QWidget *p, RichPoint3f* rpf, QWidget *gla);
|
||||
~Point3fWidget();
|
||||
QString paramName;
|
||||
vcg::Point3f getValue();
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
|
||||
public slots:
|
||||
void getPoint();
|
||||
void setValue(QString name, vcg::Point3f val);
|
||||
signals:
|
||||
void askViewDir(QString);
|
||||
void askViewPos(QString);
|
||||
void askSurfacePos(QString);
|
||||
void askCameraPos(QString);
|
||||
|
||||
protected:
|
||||
QLineEdit * coordSB[3];
|
||||
QComboBox *getPoint3Combo;
|
||||
QPushButton *getPoint3Button;
|
||||
QLabel* descLab;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//public QGridLayout,
|
||||
class DynamicFloatWidget : public MeshLabWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DynamicFloatWidget(QWidget *p, RichDynamicFloat* rdf);
|
||||
~DynamicFloatWidget();
|
||||
|
||||
float getValue();
|
||||
void setValue(float val, float minV, float maxV);
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
|
||||
public slots:
|
||||
void setValue(int newv);
|
||||
void setValue();
|
||||
void setValue(float newValue);
|
||||
|
||||
signals:
|
||||
//void valueChanged(int mask);
|
||||
void dialogParamChanged();
|
||||
|
||||
protected:
|
||||
QLineEdit *valueLE;
|
||||
QSlider *valueSlider;
|
||||
QLabel* fieldDesc;
|
||||
float minVal;
|
||||
float maxVal;
|
||||
int mask;
|
||||
private :
|
||||
float intToFloat(int val);
|
||||
int floatToInt(float val);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class ComboWidget : public MeshLabWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
QComboBox *enumCombo;
|
||||
QLabel *enumLabel;
|
||||
public:
|
||||
ComboWidget(QWidget *p, RichParameter* rpar);
|
||||
~ComboWidget();
|
||||
void Init(QWidget *p,int newEnum, QStringList values);
|
||||
virtual void collectWidgetValue() = 0;
|
||||
virtual void resetWidgetValue() = 0;
|
||||
virtual void setWidgetValue(const Value& nv) = 0;
|
||||
|
||||
int getIndex();
|
||||
void setIndex(int newEnum);
|
||||
|
||||
signals:
|
||||
void dialogParamChanged();
|
||||
};
|
||||
|
||||
/// Widget to select an entry from a list
|
||||
|
||||
//public QHBoxLayout
|
||||
class EnumWidget : public ComboWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EnumWidget(QWidget *p, RichEnum* rpar);
|
||||
~EnumWidget(){};
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
|
||||
//returns the number of items in the list
|
||||
int getSize();
|
||||
};
|
||||
|
||||
|
||||
/// Widget to select a Layer the current one
|
||||
class MeshWidget : public ComboWidget
|
||||
{
|
||||
private:
|
||||
MeshDocument *md;
|
||||
int defaultMeshIndex;
|
||||
public:
|
||||
MeshWidget(QWidget *p, RichMesh* defaultMesh);
|
||||
~MeshWidget(){};
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
|
||||
MeshModel * getMesh();
|
||||
void setMesh(MeshModel * newMesh);
|
||||
};
|
||||
|
||||
class OpenFileWidget : public MeshLabWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
OpenFileWidget(QWidget *p, RichOpenFile* rdf);
|
||||
~OpenFileWidget();
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
void setWidgetValue(const Value& nv);
|
||||
|
||||
protected:
|
||||
QLineEdit* filename;
|
||||
QPushButton* browse;
|
||||
QString fl;
|
||||
QLabel* descLab;
|
||||
|
||||
|
||||
signals:
|
||||
void dialogParamChanged();
|
||||
|
||||
private:
|
||||
void updateFileName(const FileValue& file);
|
||||
private slots:
|
||||
void selectFile();
|
||||
};
|
||||
/*
|
||||
class QVariantListWidget : public MeshLabWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QVariantListWidget(QWidget *parent, QList<QVariant> &values);
|
||||
|
||||
//get the values listed in this widget
|
||||
QList<QVariant> getList();
|
||||
|
||||
//set the values this widget lists
|
||||
void setList(QList<QVariant> &values);
|
||||
|
||||
public slots:
|
||||
//add a new row for input at the end
|
||||
void addRow();
|
||||
|
||||
//remove the last row of the table widget
|
||||
void removeRow();
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
|
||||
private:
|
||||
QTableWidget *tableWidget;
|
||||
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
//public QVBoxLayout
|
||||
class GetFileNameWidget : public MeshLabWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GetFileNameWidget(QWidget *parent, QString &defaultString, bool getOpenFileName, QString fileExtension = QString("*.*"));
|
||||
|
||||
~GetFileNameWidget();
|
||||
|
||||
//set the values this widget lists
|
||||
QString getFileName();
|
||||
|
||||
//set the name to be something else
|
||||
void setFileName(QString newName);
|
||||
|
||||
public slots:
|
||||
//add a new row for input at the end
|
||||
void launchGetFileNameDialog();
|
||||
|
||||
void collectWidgetValue();
|
||||
void resetWidgetValue();
|
||||
private:
|
||||
|
||||
//open or save filename
|
||||
bool _getOpenFileName;
|
||||
|
||||
//label to display the current value of _filename
|
||||
QLabel *fileNameLabel;
|
||||
|
||||
//button to launch the get filename dialog
|
||||
QPushButton *launchFileNameDialogButton;
|
||||
|
||||
//the filename colected by the fileName dialog
|
||||
QString _fileName;
|
||||
|
||||
//the extension of the files to look for
|
||||
QString _fileExtension;
|
||||
|
||||
};
|
||||
*/
|
||||
|
||||
/*---------------------------------*/
|
||||
|
||||
/*
|
||||
This class is used to automatically create a frame from a set of parameters.
|
||||
it is used mostly for creating the main dialog of the filters, but it is used also
|
||||
in the creation of the additional saving options, post and pre opening processing
|
||||
and for general parameter setting in edit plugins (e.g. look at the aligment parameters)
|
||||
*/
|
||||
class StdParFrame : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
StdParFrame(QWidget *p, QWidget *gla=0);
|
||||
|
||||
void loadFrameContent(RichParameterSet &curParSet,MeshDocument *mdPt = 0);
|
||||
void loadFrameContent(RichParameter* par,MeshDocument *mdPt = 0);
|
||||
|
||||
// The curParSet that is passed must be 'compatible' with the RichParameterSet that have been used to create the frame.
|
||||
// This function updates the RichParameterSet used to create the frame AND fill also the passed <curParSet>
|
||||
void readValues(RichParameterSet &curParSet);
|
||||
void resetValues(RichParameterSet &curParSet);
|
||||
|
||||
void toggleHelp();
|
||||
|
||||
QVector<MeshLabWidget *> stdfieldwidgets;
|
||||
QVector<QLabel *> helpList;
|
||||
|
||||
QWidget *gla; // used for having a link to the glarea that spawned the parameter asking.
|
||||
~StdParFrame();
|
||||
signals:
|
||||
|
||||
void dynamicFloatChanged(int mask);
|
||||
void parameterChanged();
|
||||
};
|
||||
|
||||
|
||||
|
||||
// This class provide a modal dialog box for asking a generic parameter set
|
||||
// It can be used by anyone needing for some values in a structred form and having some integrated help
|
||||
class GenericParamDialog: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GenericParamDialog(QWidget *p, RichParameterSet *_curParSet, QString title=QString(), MeshDocument *_meshDocument = 0);
|
||||
~GenericParamDialog();
|
||||
|
||||
RichParameterSet *curParSet;
|
||||
StdParFrame *stdParFrame;
|
||||
|
||||
void createFrame();
|
||||
|
||||
public slots:
|
||||
void getAccept();
|
||||
void toggleHelp();
|
||||
|
||||
//reset the values on the gui back to the ones originally given to the dialog
|
||||
void resetValues();
|
||||
|
||||
private:
|
||||
MeshDocument *meshDocument;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// This is the dialog used to ask parameters for the MeshLab filters.
|
||||
// This dialog is automatically configurated starting from the parameter asked by a given filter.
|
||||
// It can handle dynamic parameters that modify only partially a given mesh.
|
||||
|
||||
class MainWindow;
|
||||
class MeshlabStdDialog : public QDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MeshlabStdDialog(QWidget *p);
|
||||
~MeshlabStdDialog();
|
||||
|
||||
void clearValues();
|
||||
void createFrame();
|
||||
void loadFrameContent(MeshDocument *mdPt=0);
|
||||
|
||||
bool showAutoDialog(MeshFilterInterface *mfi, MeshModel *mm, MeshDocument * md, QAction *q, MainWindowInterface *mwi, QWidget *gla=0);
|
||||
bool isDynamic();
|
||||
|
||||
private slots:
|
||||
void applyClick();
|
||||
void closeClick();
|
||||
void resetValues();
|
||||
void toggleHelp();
|
||||
void togglePreview();
|
||||
void applyDynamic();
|
||||
void changeCurrentMesh(int meshInd);
|
||||
|
||||
public:
|
||||
QFrame *qf;
|
||||
StdParFrame *stdParFrame;
|
||||
QAction *curAction;
|
||||
MeshModelState meshState;
|
||||
MeshModelState meshCacheState;
|
||||
QCheckBox *previewCB;
|
||||
|
||||
void closeEvent ( QCloseEvent * event );
|
||||
|
||||
int curmask;
|
||||
MeshModel *curModel;
|
||||
MeshDocument * curMeshDoc;
|
||||
MeshFilterInterface *curmfi;
|
||||
MainWindowInterface *curmwi;
|
||||
QWidget * curgla;
|
||||
RichParameterSet curParSet;
|
||||
RichParameterSet prevParSet;
|
||||
bool validcache;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//QWidget* parent parameter says to the class who will destroy the MeshLabWidget object that it had created
|
||||
//RichWidgetConstructor shouldn't destroy anything
|
||||
|
||||
class RichWidgetInterfaceConstructor : public Visitor
|
||||
{
|
||||
public:
|
||||
RichWidgetInterfaceConstructor(QWidget* parent):lastCreated(NULL),par(parent){}
|
||||
|
||||
void visit(RichBool& pd) {lastCreated = new BoolWidget(par,&pd);};
|
||||
void visit(RichInt& pd) {lastCreated = new IntWidget(par,&pd);};
|
||||
void visit(RichFloat& pd){lastCreated = new FloatWidget(par,&pd);};
|
||||
void visit(RichString& pd){lastCreated = new StringWidget(par,&pd);};
|
||||
void visit(RichMatrix44f& /*pd*/){assert(0);/*TO BE IMPLEMENTED*/ /*lastCreated = new Matrix44fWidget(par,&pd);*/};
|
||||
void visit(RichPoint3f& pd){lastCreated = new Point3fWidget(par,&pd,reinterpret_cast<StdParFrame*>(par)->gla);};
|
||||
void visit(RichColor& pd){lastCreated = new ColorWidget(par,&pd);};
|
||||
void visit(RichAbsPerc& pd){lastCreated = new AbsPercWidget(par,&pd);};
|
||||
void visit(RichEnum& pd){lastCreated = new EnumWidget(par,&pd);};
|
||||
void visit(RichFloatList& /*pd*/){assert(0);/*TO BE IMPLEMENTED*/ /*lastCreated = new FloatListWidget(par,&pd);*/};
|
||||
void visit(RichDynamicFloat& pd){lastCreated = new DynamicFloatWidget(par,&pd);};
|
||||
void visit(RichOpenFile& pd){lastCreated = new OpenFileWidget(par,&pd);};
|
||||
void visit(RichSaveFile& /*pd*/){assert(0);/*TO BE IMPLEMENTED*/ /*lastCreated = new SaveFileWidget(par,&pd);*/};
|
||||
void visit(RichMesh& pd){lastCreated = new MeshWidget(par,&pd);};
|
||||
|
||||
~RichWidgetInterfaceConstructor() {}
|
||||
|
||||
void setParentWidget(QWidget* parent) {par = parent;}
|
||||
MeshLabWidget* lastCreated;
|
||||
private:
|
||||
QWidget* par;
|
||||
|
||||
};
|
||||
|
||||
class RichParameterToQTableWidgetItemConstructor : public Visitor
|
||||
{
|
||||
public:
|
||||
RichParameterToQTableWidgetItemConstructor(/*QListWidget* widlst*/):/*lst(widlst),*/lastCreated(NULL){}
|
||||
|
||||
void visit(RichBool& pd);
|
||||
void visit(RichInt& pd);
|
||||
void visit(RichFloat& pd);
|
||||
void visit(RichString& pd);
|
||||
void visit(RichMatrix44f& /*pd*/){assert(0);};
|
||||
void visit(RichPoint3f& pd);
|
||||
void visit(RichColor& pd);
|
||||
void visit(RichAbsPerc& pd);
|
||||
void visit(RichEnum& pd);
|
||||
void visit(RichFloatList& /*pd*/){assert(0);};
|
||||
void visit(RichDynamicFloat& pd);
|
||||
void visit(RichOpenFile& pd);
|
||||
void visit(RichSaveFile& /*pd*/){assert(0);};
|
||||
void visit(RichMesh& /*pd*/){assert(0);};
|
||||
|
||||
/*QListWidget* lst;*/
|
||||
QTableWidgetItem* lastCreated;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||