RayTracing
mainwindow.h
См. документацию.
00001 #ifndef MAINWINDOW_H
00002 #define MAINWINDOW_H
00003 #include <math.h>
00004 #include "Serial.h"
00005 #include "Light.h"
00006 #include "Sphere.h"
00007 #include "Thor.h"
00008 #include "Ray.h"
00009 
00010  #include <QMainWindow>
00011 
00012  class QAction;
00013  class QMenu;
00014  class QVBoxLayout;
00015  class QHBoxLayout;
00016  class QLabel;
00017  class QLayout;
00018 
00025  class MainWindow : public QMainWindow
00026  {
00027      Q_OBJECT
00028 
00029  public:
00031      MainWindow();
00033      ~MainWindow();
00034 
00035 
00036  public slots:
00038      void SerializeInXml();
00040      void SerializeInBin();
00042      void LoadFromXml();
00044      void LoadFromBin();
00046      void exit();
00047 
00048 
00049  public:
00051      void createActions();
00053      void createMenus();
00055      void createStatusBar();
00057      void makeFigures();
00059      void makeLights(); 
00061      void Paint();
00063      void AntiAliasing();
00064 
00068      bool Serializing(Serializer *Serial);
00076      void wash(QImage *Temp,int koef1, int koef2, int N, double* wind, bool a);
00077 
00087      float countMinDist(Vector3D temp, int *numObj, const bool b1, const bool b2, const bool b3, const bool b4, const bool b5);
00094      Vector3D countLites(Vector3D Dist, Vector3D Color, Vector3D SpeColor, Light Light0);
00097      void keyPressEvent(QKeyEvent* pe);
00100      void wheelEvent(QWheelEvent* pe);
00103      void mousePressEvent(QMouseEvent* pe);
00106      void mouseMoveEvent(QMouseEvent* pe);
00109      void mouseReleaseEvent(QMouseEvent * pe);
00110 
00112      QWidget *window;
00114      QLabel *labelIm;
00116      QPixmap *image;
00118      QImage *curImage;
00120      Vector3D **RGBCol;
00122      QPoint ptrMousePosition;
00124      Mater Material1;
00126      Mater Material2;
00128      Mater Material3;
00130      Sphere Sphere1;
00132      Sphere Sphere2;
00134      Thor Thor1;
00136      Thor Thor2;
00138      Thor Thor3;
00140      Light Light1;
00142      Light Light2;
00144      Vector3D CamPos;
00146      int Wid;
00148      int Hey;
00150      bool AntiAl;
00151 
00153      QVBoxLayout *mainLayout;
00154 
00156      QMenu *fileMenu;
00158      QAction *XMLLAct;
00160      QAction *BinLAct;
00162      QAction *exitAct;
00164      QAction *XMLSAct;
00166      QAction *BinSAct;
00167  };
00168 
00169  #endif