C:/Projekte/C++/FlowVIS_107/src/FlowGeometry.h

Go to the documentation of this file.
00001 #ifndef FLOWGEOMETRY_H
00002 #define FLOWGEOMETRY_H
00003 
00004 #include "common.h"
00005 
00006 
00007 class FlowGeometry
00008 {
00009   friend class FlowData;
00010 
00011         private:
00012 
00014     bool isFlipped;
00015 
00017                 int dim[2];
00018 
00020                 vec3 boundaryMin;
00021                 vec3 boundaryMax;
00022                 vec3 boundarySize;
00023 
00025                 vec3* geometryData;
00026 
00028                 vec3* normGeometryData;
00029 
00030 /* gv Obsolete?
00032                 int getVtx(int x, int y);
00034                 int getVtxX(int vtxID);
00036                 int getVtxY(int vtxID);
00037 
00039                 int getXYvtx(vec3 pos);
00040 */
00041 
00042   public:
00043 
00045     bool getIsFlipped();
00046 
00048     vec3 getPos( int vtxID );
00049 
00051     float getPosX( int vtxID );
00052 
00054     float getPosY( int vtxID );
00055 
00057     vec3 getNormPos( int vtxID );
00058 
00059 
00060   private:
00061 
00063     //bool isFlipped;
00064 
00066     int getNearestVtx(vec3 pos);
00067 
00069     int binarySearch( float searchValue, int begin, int end, int dimension );
00070     int binarySearch2( float searchValue, int begin, int end, int dimension ); // TEST
00071 
00073     //vec3 interpolate( vec3 pos, int* cell, FlowData* data );
00074     bool interpolate( vec3 pos, int* cell, FlowData* data, vec3 *interpolatedValue );
00075 
00076     // gv TEST: print coords of grid-points to log-file
00077     void printGridPoints();
00078 
00080     float getCurrentSearchValue( int index, int dimension );
00081 
00082 
00083   public:
00084 
00086                 FlowGeometry();
00087 
00089                 ~FlowGeometry();
00090 
00092                 bool getInterpolationAt_old(vec3 pos, int* vtxID, float* coef);
00093 
00095     bool getInterpolationAt( vec3 pos, vec3 *velocityValue, FlowData* data );
00096 
00098                 bool readFromFile(char* header, FILE* fp, bool bigEndian);
00099 
00100 
00101                 //remember that our grids are curvilinear and only 2D
00102 
00104                 int getDimX();
00105 
00107                 int getDimY();
00108 
00110                 int getDimZ();
00111 
00113                 float getMinX();
00114 
00116                 float getMaxX();
00117 
00119                 float getMinY();
00120 
00122                 float getMaxY();
00123 
00124 /*  gv Obsolete?
00126                 int getRightNeigh(int vtxID);
00128                 int getTopNeigh(int vtxID);
00130                 int getLeftNeigh(int vtxID);
00132                 int getBottomNeigh(int vtxID);
00133 */
00134 
00136                 vec3 normalizeCoords(vec3 pos);
00137 
00139                 vec3 unNormalizeCoords(vec3 pos);
00140 };
00141 
00142 #endif

Generated on Mon Jan 21 14:50:12 2008 for VisLU by  doxygen 1.5.4