00001
00002
00004
00005 #if !defined(AFX_TFLOWDATA1_H__0A8471CF_B829_41FA_BCB1_A097AC101727__INCLUDED_)
00006 #define AFX_TFLOWDATA1_H__0A8471CF_B829_41FA_BCB1_A097AC101727__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012 #include "TKoo3d.h"
00013 #include <stdio.h>
00014 #include "TGeometryData.h"
00015
00016
00018
00024 class TFlowData
00025 {
00026 private:
00027 float* dataMax;
00028 float* dataMin;
00029 float velMin;
00030 float velMax;
00031 float** data;
00032 TGeometryData* geometryData;
00034
00043 int transToArrayOffset(int x, int y, int z)
00044 {
00045 return x+y*geometryData->getResX()+z*geometryData->getResX()*geometryData->getResY();
00046 }
00047 public:
00048
00050
00055 float getVelMax();
00057
00062 float getVelMin();
00064
00072 float getDataMax(int dataSet)
00073 {
00074 if (dataSet==-3)
00075 return getVelMax();
00076 return dataMax[dataSet];
00077 }
00079
00087 float getDataMin(int dataSet)
00088 {
00089 if (dataSet==-3)
00090 return getVelMin();
00091 return dataMin[dataSet];
00092 }
00094
00104 float getDataAtSample(int dSet, int x, int y, int z)
00105 {
00106 if (dSet==-3)
00107 return (TKoo3d<float> (data[0][transToArrayOffset(x,y,z)],data[1][transToArrayOffset(x,y,z)],data[2][transToArrayOffset(x,y,z)])).betrag();
00108
00109 return data[dSet][transToArrayOffset(x,y,z)];
00110 }
00112
00120 TFlowData(TGeometryData* geom,QString& fileName);
00121 virtual ~TFlowData();
00122
00123 };
00124
00125 #endif // !defined(AFX_TFLOWDATA1_H__0A8471CF_B829_41FA_BCB1_A097AC101727__INCLUDED_)