00001 #pragma once
00002 #include "Texture.h"
00003 #include "StreamlineObj.h"
00004 #include <vector>
00005 #include "Streamlines.h"
00006
00008
00013 class IntegrationMethod
00014 {
00015 public:
00025 IntegrationMethod(Streamlines* stream, Texture* gridtexture, Texture* texture, float mapwidth, float mapheight,float dsep, float dtest);
00029 virtual ~IntegrationMethod(void);
00030
00031 virtual void integrate(StreamlineObj* startpos, float stepsize, int steps)=0;
00032
00033 std::vector<StreamlineObj*> values;
00034 std::vector<std::vector<std::vector<StreamlineObj*>>> map;
00035 protected:
00045 vec3 doIntegrate(vec3 value, std::vector<std::vector<float>> b, std::vector<float> c, int n, float stepsize);
00046
00058 vec3 doIntegrate(vec3 newValue6, float stepsize, float dsep, float dtest, bool forward, int lastindex, bool update);
00071 vec3 doIntegrate(vec3 newValue6, float stepsize, float dsep, float dtest, bool forward, int lastindex);
00083 vec3 doIntegrate(vec3 newValue6, float stepsize, float dsep, float dtest, bool forward);
00093 vec3 doIntegrate(vec3 newValue6, float stepsize, float dsep, float dtest);
00094
00101 void updateMap(StreamlineObj* value, StreamlineObj* pvalue, float dtest);
00102
00103 Texture* m_gridtexture;
00104 Texture* m_texture;
00105
00106 float dsep;
00107 float dtest;
00108
00109 Streamlines* m_streams;
00110
00111 friend bool collision(StreamlineObj* point, std::vector<std::vector<std::vector<StreamlineObj*>>> map, float mapwidth, float mapheight ,float dist,float dtest);
00112 };