00001 #include <vtkConeSource.h>
00002 #include <vtkPolyDataMapper.h>
00003 #include <vtkRenderWindow.h>
00004 #include <vtkLoopSubdivisionFilter.h>
00005 #include <vtkTriangleFilter.h>
00006 #include <vtkActorCollection.h>
00007 #include <vtkPolyData.h>
00008 #include <vtkRenderWindowInteractor.h>
00009 #include <vtkInterpolatingSubdivisionFilter.h>
00010 #include <vtkLinearSubdivisionFilter.h>
00011 #include <vtkButterflySubdivisionFilter.h>
00012 #include <vtkActor.h>
00013
00014 #include <qmainwindow.h>
00015 #include <qvbox.h>
00016 #include <qmenubar.h>
00017 #include <qaction.h>
00018 #include <qfiledialog.h>
00019 #include <qpushbutton.h>
00020 #include <qmessagebox.h>
00021 #include <qpainter.h>
00022 #include <qimage.h>
00023 #include <qradiobutton.h>
00024 #include <qtabbar.h>
00025 #include <qstatusbar.h>
00026 #include <qwidget.h>
00027 #include <qlabel.h>
00028 #include <qprogressbar.h>
00029 #include <qslider.h>
00030 #include <qbuttongroup.h>
00031 #include <qcombobox.h>
00032 #include <qlabel.h>
00033 #include <qcolor.h>
00034 #include <qspinbox.h>
00035 #include <qcheckbox.h>
00036 #include <qlineedit.h>
00037 #include <qapplication.h>
00038
00039 #include "vtk3DSOurImporter.h"
00040 #include "vtkCatmullClarkFilter.h"
00041
00042 #include "renderwindowinteractor.h"
00043
00045
00046 class MainWindow : public QMainWindow
00047 {
00048 Q_OBJECT
00049 private:
00051 RenderWindowInteractor *interactor;
00053 int subdiv;
00055 QString fileName;
00057 QString SaveFile;
00059 vtkInterpolatingSubdivisionFilter *filter1;
00061 vtkApproximatingSubdivisionFilter *filter2;
00063 vtk3DSOurImporter *importer;
00064
00065
00067 QSpinBox *noOfSubdivisions;
00069 QRadioButton *triangle;
00071 QRadioButton *quad;
00073 QRadioButton *loop;
00075 QRadioButton *linear;
00077 QRadioButton *butterfly;
00079 QRadioButton *cc;
00081 QLabel *lsubdiv;
00082
00083 public:
00085 void init(void);
00086 public slots:
00088 void openFile();
00090 void saveFile();
00092 void newSubdivision(void);
00093 };