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

Data.h

Go to the documentation of this file.
00001 // Data.h: Schnittstelle für die Klasse CFlowData.
00002 //
00004 
00005 #if !defined(AFX_DATA_H__06CF6D58_D772_418F_B76A_57B810306DC7__INCLUDED_)
00006 #define AFX_DATA_H__06CF6D58_D772_418F_B76A_57B810306DC7__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 
00013 #include "misc.h"
00014 class CGlobalState;
00015 
00016 
00020 class CFlowData  
00021 {
00022 public:
00023 
00024         CFlowData(CGlobalState *state);
00025         virtual ~CFlowData();
00026         //load files into structure GeneralGrid
00027         bool LoadData(CString gridfile, CString datafile);
00028 
00029         bool LoadData();
00030         
00031         float Absolut(float value);
00032 
00033         //Resample GeneralGrid to orthogonalized (evenly spaced) grid
00034         bool ResampleData(float stepLength);
00035 
00036 
00037         //Bilinear interpolation of vectordata
00038         bool InterpolateDataFromGeneralGrid(Vec3f pos, Vec3f &result, float* additionalData);
00039 
00040 
00041         bool InterpolateVec2fDataFromGeneralGrid(Vec2f pos, Vec2f &result);
00042 
00043 /******************** TODO **********************
00044         //Interpolate additional data from GeneralGrid
00045         bool InterpolateAdditionalDataFromGeneralGrid(Vec3f pos, Vec3f[] &result);
00046 ******************** TODO **********************/
00047 
00048         //merge
00049         bool InterpolateVec2fNORMDataFromGeneralGrid(Vec2f pos, Vec2f &result);
00050         bool InterpolateVec2fNORMDataFromGeneralGrid(Vec2f pos, Vec2f &result, float vecLength);
00051 
00052         bool IsLoaded();
00053         void normalizeVec( Vec2f &vec, float &setLength);
00054         void normalizeVec( Vec2f &vec );
00055         //merge end
00056 
00057 public:
00058         // data as loaded from the files
00059         GeneralGrid generalGrid;
00060         // resampled data
00061         OrthoGrid orthoGrid;
00062         
00063         // number of additional datasets
00064         int numOfSets;
00065         // number of timesteps (for timedependent data)
00066         int numOfSteps;
00067         // time between two timesteps
00068         int timeStep;
00069         
00070         // minimum position of dataset
00071         float minXpos;
00072         float minYpos;
00073         // maximum position of dataset
00074         float maxXpos;
00075         float maxYpos;
00076         // maximum of vectors
00077         float maxXvec;
00078         float maxYvec;
00079 
00080         // max(maxXpos-minXpos,maxYpos-minYpos)
00081         float maxLength;
00082 
00083         //minimum difference between two gridpoints
00084         float minXStepLength;
00085         float minYStepLength;
00086 
00087         //range for additionaldata 1&2
00088         float addData1Min;
00089         float addData2Min;
00090         float addData1Max;
00091         float addData2Max;
00092         
00093 
00094 private:
00095         
00096         //cleanups
00097         void DeleteGeneralGrid();
00098         void DeleteOrthoGrid();
00099         CGlobalState *state;
00100 
00101         bool DataFilesAllLoaded;
00102         
00103 
00104 };
00105 
00106 #endif // !defined(AFX_DATA_H__06CF6D58_D772_418F_B76A_57B810306DC7__INCLUDED_)

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