Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

FlowVizView.h

Go to the documentation of this file.
00001 // FlowVizView.h : Schnittstelle der Klasse CFlowVizView
00002 //
00004 
00005 #if !defined(AFX_FLOWVIZVIEW_H__A3C03A08_E08D_401D_BACE_EA205B2D5642__INCLUDED_)
00006 #define AFX_FLOWVIZVIEW_H__A3C03A08_E08D_401D_BACE_EA205B2D5642__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 //#include "stdafx.h"
00019 
00020 // OpenGL Headers
00021 
00022 
00023 #include <gl/gl.h>
00024 #include <gl/glu.h>
00025 #include <math.h> 
00026 #include "TriangleGlyph.h"
00027 #include "Glyph_BackColor.h"
00028 #include "Glyph.h"
00029 #include "GlobalState.h"
00030 #include "Data.h"
00031 #include <windows.h>
00032 
00033 #include "Camera.h"
00034 
00035 
00036 
00037 #include "ColorCoding.h"
00038 #include "ColorCoding_RGB.h"
00039 #include "ColorCoding_RGB_flat.h"
00040 #include "ColorCoding_Yellow2Red.h"
00041 #include "ColorCoding_Verticity.h"
00042 
00043 
00047 class CFlowVizView : public CView
00048 {
00049 
00050         
00051 
00052 protected: // Nur aus Serialisierung erzeugen
00053 
00054         
00055         
00056 
00057     HDC         m_hgldc;                // GDI Device Context
00058     HGLRC       m_hglrc;                // Rendering Context
00059         BOOL SetPixelformat(HDC hdc);
00060         void ReSizeGLScene(int width, int height);
00061         void GetGLInfo();
00062         
00063         // Switch between different drawing styles
00064         int DrawGLScene(void);
00065         
00066         int InitGL(void); //xq
00067         // Mouse Move 
00068         int mouseOldx;
00069         int mouseOldy;
00070         int mouseOldz;
00071 
00072         Rect brushingRectangle;
00073         Rect legendRectangle;
00074         Rect upperLegendcolorRect;
00075         Rect lowerLegendcolorRect;
00076         Rect middleLegendcolorRect;
00077 
00078         float xScatterPlotOffset;
00079         float yScatterPlotOffset;
00080         float scalefactorScatterPlot;
00081 
00082         int width;
00083         int height;
00084 
00085         CString m_StatusBarBuffer;
00086 
00087         LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
00088         // handle mouse events
00089         void MouseProc(UINT message, WPARAM wParam, LPARAM lParam);
00090 
00091         CFlowVizView();
00092         DECLARE_DYNCREATE(CFlowVizView)
00093 
00094 // Attribute
00095 public:
00096         //retrive document
00097         CFlowVizDoc* GetDocument();
00098 
00099 
00100 // Operationen
00101 public:
00102 
00103 // Überladungen
00104         // Vom Klassenassistenten generierte Überladungen virtueller Funktionen
00105         //{{AFX_VIRTUAL(CFlowVizView)
00106         public:
00107         virtual void OnDraw(CDC* pDC);  // überladen zum Zeichnen dieser Ansicht
00108         virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00109         protected:
00110         //}}AFX_VIRTUAL
00111 
00112 
00113         bool CalcMousePositionInDatagrid(int x, int y, Vec2f *result);
00114 
00115 
00116 
00117 // Implementierung
00118 public:
00119         virtual ~CFlowVizView();
00120 #ifdef _DEBUG
00121         virtual void AssertValid() const;
00122         virtual void Dump(CDumpContext& dc) const;
00123 #endif
00124 
00125 protected:
00126 
00127         bool DrawGLGlyph();
00128         bool DrawGLScatterPlot();
00129         bool DrawGLRectangle(Rect *rectangle);
00130         bool DrawGLRectangle(Rect *rectangle,colorRGBA col, bool frame);
00131         bool DrawGLBackground();
00132         bool DrawGLLegend();
00133 
00134         bool DrawGLStreamLines();
00135 
00136         
00137         bool PointIsInRectangle(Vec2f *point, Rect *rectangle);
00138         Rect CalcBrushingRect();
00139 
00140 
00141         // globalState pointer (globalState is constructed and deleted by CFlowVizDoc)
00142         CGlobalState *globalState;
00143 // Generierte Message-Map-Funktionen
00144 protected:
00145         //{{AFX_MSG(CFlowVizView)
00146         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00147         afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00148         afx_msg void OnDestroy();
00149         afx_msg void OnSize(UINT nType, int cx, int cy);
00150         //}}AFX_MSG
00151         DECLARE_MESSAGE_MAP()
00152 };
00153 
00154 #ifndef _DEBUG  // Testversion in FlowVizView.cpp
00155 inline CFlowVizDoc* CFlowVizView::GetDocument()
00156    { return (CFlowVizDoc*)m_pDocument; }
00157 #endif
00158 
00160 
00161 //{{AFX_INSERT_LOCATION}}
00162 // Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.
00163 
00164 #endif // !defined(AFX_FLOWVIZVIEW_H__A3C03A08_E08D_401D_BACE_EA205B2D5642__INCLUDED_)

Generated on Thu Jan 23 04:30:11 2003 for FlowVis- vector field in 2D by doxygen1.3-rc2