glarea.h
Go to the documentation of this file.
00001 #ifndef CG_RENDERAREA_H
00002 #define CG_RENDERAREA_H
00003 
00004 #include <iostream>
00005 
00006 #include <QtOpenGL/QGLWidget>
00007 
00008 #include <vcg/space/box3.h>
00009 #include <wrap/gui/trackball.h>
00010 #include <vcg/complex/algorithms/create/ball_pivoting.h>
00011 #include "cmesh.h"
00012 
00013 
00014 //#include "mls_surface.h"
00015 //#include "advancing.h"
00016 
00017 using namespace tri;
00018 using namespace trimesh;
00019 class GLArea : public QGLWidget {
00020     Q_OBJECT
00021 
00022 public:               
00023                   
00024     GLArea(QWidget *parent = 0);
00025     bool smooth;
00026    
00027 public slots:         
00028     
00029     bool loadModel(const QString &file);
00030     void addFace();
00031     void add10Faces();
00032     void add100Faces();
00033     void add1000Faces();
00034     void addAll();
00035     void setTot(int n) { tot = n; }
00036     void addTot();
00037     
00038     void open();
00039     void save();
00040     void setRadius(double _radius) {
00041       radius = _radius;
00042     }
00043     void viewSmooth(bool on);
00044 
00045 protected:
00046     int tot;      
00047           
00048     float radius;
00049     vcg::Box3f box;
00050     CMesh mesh;
00051 //    Pivot<CMesh> *pivot;
00052     Pivot<CMesh> *pivot;
00053     vcg::Trackball trackball;
00054 
00055     void init(QString file, float radius);          
00056     void draw();
00057              
00058 
00059     void initializeGL();
00060     void resizeGL(int w, int h);
00061     void paintGL();
00062 
00063     void wheelEvent(QWheelEvent *e);
00064     void mouseMoveEvent(QMouseEvent *e);
00065     void mousePressEvent(QMouseEvent *e);
00066     void mouseReleaseEvent(QMouseEvent *e);        
00067     void keyReleaseEvent ( QKeyEvent * e );
00068 
00069 };
00070 
00071 #endif


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:31:26