00001 #ifndef STREAMLINEGRID_H
00002 #define STREAMLINEGRID_H
00003
00004 #include "Streamline.h"
00005
00006 #include <vector>
00007 #include "vec3.h"
00008
00009 using namespace std;
00010
00012 class StreamlineGrid
00013 {
00014 friend class StreamLine;
00015
00016 public:
00017 StreamlineGrid(int, int, int);
00018 ~StreamlineGrid();
00019
00020 StreamLine* getNextLine();
00021
00022 void addStreamLine(StreamLine*);
00023
00024 void clear();
00025
00026 void changeDTest(float);
00027 void changeDSep(int);
00028
00029 float getDTest() { return this->dTest; };
00030 int getDSep() { return this->dSep; };
00031
00032 private:
00033 int dSep;
00034 float dTest;
00035
00036 float maxDistanceCheck;
00037
00038 int dimX;
00039 int dimY;
00040
00041 int cellsX;
00042 int cellsY;
00043
00044 vector<vector<vec3>*> cells;
00045 vector<StreamLine*> streamLines;
00046
00047 bool checkDistances(const vec3, float);
00048 void addSample(const vec3);
00049 };
00050
00051 #endif