00001
00002
00004
00005 #if !defined(AFX_TFLOWDISPLAYWIDGET_H__6DC64E07_61EC_40FC_BD47_61325CF9D686__INCLUDED_)
00006 #define AFX_TFLOWDISPLAYWIDGET_H__6DC64E07_61EC_40FC_BD47_61325CF9D686__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012 #include <qgl.h>
00013
00014 #include "TKamera.h"
00015 #include "TFlowModel.h"
00016 #include "parameter.h"
00017 #include "TStreamLine.h"
00018 #include "TDropLayer.h"
00019
00021
00027 class TFlowDisplayWidget : public QGLWidget
00028 {
00029 #define TEX_RES 128
00030 private:
00031 int layerC;
00032 int mPressX;
00033 TKamera kam;
00034 TFlowModel* model;
00035 int firstArrowPlotList;
00036 int firstStreamLineList;
00037
00038 TKoo3d<float> tester;
00039
00040
00041
00042 bool bgVisible;
00043 bool dropVisible;
00044 bool streamLVisible;
00045 bool glryphVisible;
00046
00047
00048
00049
00050
00051 TLinkedList <TKoo3d<float> >* userDefStream;
00052 TStreamLines* streamLines;
00053 TDropLayer* dropLayer;
00054
00055 void generateArrowPlot(int layerCount);
00056 void drawLine(TKoo3d<float> direction, TKoo3d<float> pos, QColor color);
00057 void drawArrow1(TKoo3d<float> direction, TKoo3d<float> pos, QColor color);
00058 void drawArrow2(TKoo3d<float> direction, TKoo3d<float> pos, QColor color);
00059 protected:
00061 void mouseReleaseEvent(QMouseEvent* e);
00063
00066 void mouseMoveEvent (QMouseEvent* e);
00068
00078 GLubyte* generateTexMapping(int width, int height, int* dataSets,int time);
00080 void mousePressEvent(QMouseEvent* e);
00082 void keyPressEvent (QKeyEvent* e);
00083 public:
00085
00095 static QColor interpolateColor(QColor& min, QColor& max, float pos);
00097 bg_parameter backParams;
00099 g_parameter glyphParams;
00101 st_parameter streamParams;
00103 int mouseButt;
00105 bool mousePressed;
00106 int mPressY;
00107 void resizeGL(int w, int h);
00109
00119 TFlowDisplayWidget(g_parameter& glyph, bg_parameter& backg, st_parameter& streaml,TFlowModel* mod,QWidget* parent=0, const char* name = 0);
00120 virtual ~TFlowDisplayWidget();
00121 void initializeGL();
00122 void paintGL();
00123
00124 };
00125
00126 #endif // !defined(AFX_TFLOWDISPLAYWIDGET_H__6DC64E07_61EC_40FC_BD47_61325CF9D686__INCLUDED_)