/
streamplot.h
108 lines (51 loc) · 1.57 KB
/
streamplot.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#ifndef __streamplot_h
#define __streamplot_h
#include "asxp_arrays.h"
#include "pointlist.h"
#include "pointraster.h"
#include "streamline.h"
#include <list>
class OrPointClassifier: public PointClassifier {
public:
OrPointClassifier(PointClassifier* pcf_aa, PointClassifier* pcf_ba);
virtual ~OrPointClassifier() {};
virtual int operator()(double x, double y);
PointClassifier* pcf_a;
PointClassifier* pcf_b;
};
class PrastPointClassifier: public PointClassifier {
public:
PrastPointClassifier(Pointraster & prasta);
virtual ~PrastPointClassifier() {};
virtual int operator()(double x, double y);
Pointraster & prast;
};
class Streamplot {
public:
static constexpr double d_default = 10;
Streamplot(Array3d_double* vf1a, Array3d_double* vf2a, int xmaxa, int ymaxa, double da,
Scale xrast_to_xa, Scale yrast_to_ya, Scale x_to_xrasta, Scale y_to_yrasta,
PointClassifier* is_boundarya);
void set_mode(int modea);
void init_queue();
void compute_stream_field(double xseed, double yseed, bool init_comp);
void compute_d_fringe(Streamline & curr_streaml, double d, Pointraster & prast, Point2DList & curr_fringe);
void prast_update(Point2DList & plist);
void compute_stream_field_CGAL();
Array3d_double* vf1;
Array3d_double* vf2;
int xmax, ymax;
double d_main;
Scale xrast_to_x;
Scale yrast_to_y;
Scale x_to_xrast;
Scale y_to_yrast;
double h;
PointClassifier* is_boundary;
Pointraster prast;
Point2DList debug_points;
int mode;
std::list<Streamline> streaml_queue;
std::list<Streamline> streaml_res;
};
#endif