Changed OpenMesh directory structure

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@106 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2009-04-30 12:41:50 +00:00
parent 6b48ca6090
commit ea844d6788
310 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,72 @@
// #ifdef _MSC_VER
// # pragma warning(disable: 4267 4311)
// #endif
#include <iostream>
#include <fstream>
#include <OpenMesh/Tools/Utils/getopt.h>
//#include <OpenMesh/Apps/VDProgMesh/Streaming/Client/ClientMainWindow.hh>
#include <OpenMesh/Apps/VDProgMesh/Streaming/Client/VDPMClientViewerWidget.hh>
//#include <OpenMesh/Apps/VDProgMesh/Streaming/Client/PropertyWidget.hh>
//#include <OpenMesh/Apps/VDProgMesh/Streaming/Client/OutputWidget.hh>
#include <QString>
#include <QApplication>
#include <QGLWidget>
int main(int argc, char **argv)
{
// OpenGL check
QApplication::setColorSpec( QApplication::CustomColor );
QApplication app(argc,argv);
if ( !QGLFormat::hasOpenGL() ) {
std::cerr << "This system has no OpenGL support.\n";
return -1;
}
//
int c;
int port = -1;
std::string bmesh = "";
std::string sname = "localhost";
while ( (c=getopt(argc, argv, "b:p:s:"))!=-1 )
{
switch(c)
{
case 'b': bmesh = optarg; break;
case 's': sname = optarg; break;
case 'p': { std::istringstream istr(optarg); istr >> port; } break;
}
}
// create widget
VDPMClientViewerWidget* w =
new VDPMClientViewerWidget(0, "VDPMClientViewer");
if (port == -1)
w->connectToServer( sname );
else
w->connectToServer( sname, port );
w->resize(800, 800);
// app.setMainWidget(w);
w->show();
w->openBaseMesh( bmesh );
// print usage info
std::cout << "\n\n"
<< "Press Minus : Coarsen mesh\n"
<< " Plus : Refine mesh\n"
<< " Home : Coarsen down to base mesh\n"
<< " End : Refine up to finest mesh\n"
<< "\n";
return app.exec();
}